Matt Bradley Posted September 2, 2022 Share Posted September 2, 2022 We've created (Via the SBC API) a few other_payment OTHER_RECEIPT_REFUND payments. This is to deal with clearing off balance which a customer has accumulated by an overpayment, or a cash deposit which needs to be returned. However, these payments appear to be showing up is incoming payments on the customer account history, and they ADD to the customer's balance, rather than coming off it. (1) How do we fix this? (2) How do we clear / allocate customer balances against refunds so that the customer balance returns to £0? Link to comment Share on other sites More sharing options...
Matt Bradley Posted September 2, 2022 Author Share Posted September 2, 2022 I created a new test customer just to verify that what I thought was happening was indeed happening. And it is. This looks looks like a bug to me. In addition, I can actually allocate the incoming £500 deposit payment on account against ITSELF, doubling the customer's credit balance. Link to comment Share on other sites More sharing options...
Steel, Mark Posted September 2, 2022 Share Posted September 2, 2022 Hi Matt, Thanks for your question. Can you provide an example of the parameters you are using when posting the request please. Thanks Mark Link to comment Share on other sites More sharing options...
Matt Bradley Posted September 5, 2022 Author Share Posted September 5, 2022 Array ( [other_payment] => Array ( [transaction_type_id] => OTHER_RECEIPT_REFUND [contact_id] => 6dfe12a7f87142819ec192df13e8b834 [bank_account_id] => 237dbe9738914ebc85a2d4e6d280f342 [date] => 2022-09-02T00:00:00+01:00 [total_amount] => 340 [reference] => DA29994-TEST [paymentmethod_id] => BANK_TRANSFER [payment_lines] => Array ( [0] => Array ( [ledger_account_id] => 77c265b9a8f711ecb2850279d0cc53c5 [total_amount] => 340.00 [tax_rate_id] => GB_NO_TAX ) ) ) ) Link to comment Share on other sites More sharing options...
Steel, Mark Posted September 5, 2022 Share Posted September 5, 2022 Thanks Matt, A few things: The transaction needs to use the contact_payments API and therefore the body params should be preceded with contact_payment and not other_payment. The transaction_type_id needs to be set as CUSTOMER_REFUND - OTHER_RECEIPT_REFUND is the displayed as name. The payment_method_id is invalid (Valid id's shown below). There is no allocated_artefacts array - The refund needs to be allocated against an existing unallocated customer receipt using the payment_on_account_id of the customer_receipt. Further information is available here.Payment Methods { "id": "CASH", "displayed_as": "Cash", "$path": "/payment_methods/CASH" }, { "id": "CHECK", "displayed_as": "Cheque", "$path": "/payment_methods/CHECK" }, { "id": "ELECTRONIC", "displayed_as": "Electronic", "$path": "/payment_methods/ELECTRONIC" }, { "id": "CREDIT_DEBIT", "displayed_as": "Credit/Debit Card", "$path": "/payment_methods/CREDIT_DEBIT" }, { "id": "ONLINE_PAYMENT", "displayed_as": "PayPal", "$path": "/payment_methods/ONLINE_PAYMENT" } Body Parameters { "contact_payment": { "transaction_type_id": "CUSTOMER_REFUND", "payment_method_id": "CREDIT_DEBIT", "contact_id": "90b51aebc33442aebc4a93c11cded3ab", "bank_account_id": "ff95405b1953446e8387fb582696b600", "date": "2022-09-05", "total_amount": "10.00", "allocated_artefacts": [ { "artefact_id": "884ceea38d3b469daa9719d18ae221ec", "amount": "10.00" } ] } } Thanks Mark Link to comment Share on other sites More sharing options...
Matt Bradley Posted September 5, 2022 Author Share Posted September 5, 2022 Thanks Mark, Trying that now. Interestingly, when I record a payment as "ELECTRONIC" it seems to report in Sage as "Credit / Debit Card" Array ( [id] => 987 [type] => payment [file_id] => 30000 [action] => UPDATE ) Array ( [contact_payment] => Array ( [transaction_type_id] => CUSTOMER_REFUND [contact_id] => 6dfe12a7f87142819ec192df13e8b834 [bank_account_id] => 237dbe9738914ebc85a2d4e6d280f342 [date] => 2022-09-05T00:00:00+01:00 [total_amount] => 1500 [reference] => DA30000-TEST [paymentmethod_id] => ELECTRONIC [allocated_artefacts] => Array ( [0] => Array ( [artefact_id] => 8de69723870545c5bcbd6b3027423876 [amount] => 820.00 ) [1] => Array ( [artefact_id] => 172dfe40ed6944c39d08696fbb490436 [amount] => 100.00 ) [2] => Array ( [artefact_id] => 0349934e5c7248e29a4541ca681c2c70 [amount] => 500.00 ) [3] => Array ( [artefact_id] => ef91e0e85b374f37985942b04843bef8 [amount] => 80.00 ) ) ) ) Link to comment Share on other sites More sharing options...
Matt Bradley Posted September 5, 2022 Author Share Posted September 5, 2022 Actually, scratch that. I am sending paymentmethod_id instead of payment_method_id. Apologies. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now