Transaction Safety

Beneath our simple APIs are connections to many payment networks and banks in the region. These payment networks and banks have varying degrees of reliability and feature sets, and these intricacies are handled automatically by StraitsX behind the scenes.

Here are two rules you should follow to handle your transactions:

Checking the success of a transaction

The status is key here. Always check the status of the transaction in the API response / callback to make sure that it is completed before considering it a successful transaction for your customer.

Handling failures

On rare occasions, when submitting a payout request, there might be network failures such as timeouts, or HTTP 5xx responses. You should not automatically fail the payout request in your system and you should always double check whether the previous transaction has really failed by doing a GET to retrieve the transaction status again. Ideally, you should only update the transaction status in your system when receiving either a completed or failed status in the callback.

In the event of failures, when retrying the transaction, make sure to reuse the same idempotency_id to prevent repeated disbursements. For more information on idempotency, refer to Idempotent Requests.