Matt Bradley Posted October 26, 2022 Share Posted October 26, 2022 We're sending an API request which appears to be perfectly valid, but for some reason, generates a 500 error. Similar ContactPayments work fine, but this particular one generates a 500 error for some reason. [contact_payment] => ( [transaction_type_id] => CUSTOMER_REFUND [contact_id] => d0fb3586396f4db69e90a7cebce81dcc [bank_account_id] => 4b852dfa7a8e4f20b6fba63f2c6d25d8 [date] => 2022-09-22T00:00:00+01:00 [total_amount] => 4652 [reference] => DA59218-Refund-credit-bal [payment_method_id] => CREDIT_DEBIT [allocated_artefacts] => ( [0] => ( [artefact_id] => 26967b6ffa9d41bc92787ca4f9c8f12d [amount] => 3526.00 ) [1] => ( [artefact_id] => f63314cca6614444ad4ffd64a0cf3a9f [amount] => 1126.00 ) ) ) The response is a 500 error from the API. Any ideas what's gone wrong here? Link to comment Share on other sites More sharing options...
Steel, Mark Posted October 26, 2022 Share Posted October 26, 2022 HI Matt, We'd need access to the data to fully investigate - If you'd like us to do so, please ask the business owner to send an email to [email protected] stating their agreement for us to access the data. If they reference this post that will be sufficient. Looking at the values you are passing, it looks as if you're trying to create and then allocate a refund for 1126.00 to an outstanding invoice of 3526.00. The amounts on both would need to be the same and match the total_amount for this to work? The total_amount should not be an addition of the allocation amounts. I'm guessing the 500 internal error is returned as it's unable to route the request based on those params. Thanks Mark Link to comment Share on other sites More sharing options...
Matt Bradley Posted October 27, 2022 Author Share Posted October 27, 2022 What it is trying to do here is issue a customer_refund for £4652 to refund two previous unallocated customer_receipts of £3526.00 and £1126.00 respectively. I'll get somebody to send an email to [email protected] Link to comment Share on other sites More sharing options...
Steel, Mark Posted October 27, 2022 Share Posted October 27, 2022 Thanks for the info. We're currently looking at the data and can confirm that the problem does not lie with the data you're passing in the request. The issue looks to be related to a backend issue. There are over 143 pages of requests logged for this business over the last 7 days so we'll ideally need the x-amzn-RequestId or the x-request-id. If you don't have either of those, could you provide the date/time of the response please? Thanks Mark Link to comment Share on other sites More sharing options...
Matt Bradley Posted November 1, 2022 Author Share Posted November 1, 2022 b6a4c692-6c6b-4b12-bdec-c53947b0cb00 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