The response is a HTTP 200 if the request is understood and processed by Billwerk+Optimize, but not necessarily with success. The HTTP status code relates to the communication with Billwerk+Optimize and Billwerk+Optimizes ability to process the request, not the result of the payout. The result of the payout operation should be determined from the state
parameter which will be paid
, failed
or processing
(only asynchronous payment methods). The error state and error reason can be found in error_state
and error
parameters of the latest payout transaction.
Error handling if a payout operation fails is important, as this is a money carrying operation.
Error | Handling |
---|---|
Communication error (no HTTP respoonse) or HTTP server error 5xx | Retry operation immediately or later. Retry is important as the refund operation can actually have gone through so money has been moved. |
HTTP client error 4xx | Check your implementation. |
Other non 200 HTTP response | Something is wrong. Handle as for communication error and contact Billwerk+Optimize if the problem persists. |
state = paid | Success |
state = processing | Success - The payment type has asynchronous payouts. The result of the refund will be deliverd in webhook. |
error_state = hard_declined | The refund operation has been declined by acquirer or issuer. No further attempts with same arguments will succeed. |
error_state = processing_error | A processing error can happen if something goes wrong at, or in between, any of the parties involved in a transaction. A processing error can potentially have resulted in an approved payout, but the result never reaches Billwerk+Optimize. E.g. a timeout somewhere in the chain. Processing errors leading to transactions actually having been completed without knowing the result is frustrating, but luckily quite rare. We recommend to retry later on a processing error, but only a few times. |
Errors
The operation can generate the following errors beside the generic HTTP error codes described here.
Error code | HTTP code | Description |
---|---|---|
40 | 404 | Payment method not found |
135 | 400 | Payment method not allowed for payout |
136 | 400 | Customer cannot be changed for payout attempt on previously failed payout |