Checking The status of your transaction should be easy
We have several ways to check the transaction status of any given transaction.
- Check the transaction status within the Trawx Portal. You should be able to tell whether a given transaction was processed Successfully or not. This is a straight forward way.
- Check the status Programmatically via the API.
We understand sometimes network issues may come into play after all we can not control everything that happens while all the processes are running.
We have made it easier for you to check the status of any transaction by providing the Order ID alone
API
Request URL
This is a GET request.
{{base_url}}/api/get_status/{{transaction_ref}}
Where transaction_ref is the id given to you by Trawx in the response when you initiated the Checkout Process.
Response
Sample response for the above request will be in the following Format and as usual this response will be encrypted and you will have to decrypt it to get the following JSON body.
{
"payload": {
"order_id": "40", // Your Order id
"status": 203,
"result": "SUCCESS",
"message": "Order fetch successful",
"metadata": {
"anykey": "anyvalue",
"another_anyKey": "another_anyvalue"
},
"transaction_ref": "CST172106307093",
"payment_status": "COMPLETED",
"amount": "25000",
"sent_on": "2024-07-15T17:20:07.116351Z"
}
}
Read this Please 👇🏽
We believe that if you are checking the status of the transaction, there must be an issue with that transaction, likely because the webhook didn't reach your backend as expected. With this in mind, we will send the response to your webhook URL provided in the checkout request. You will receive the response just as you would if the transaction had succeeded or failed.
However, If the transaction is still pending processing, the only response you will receive is the one mentioned above. Trawx will not trigger your web-hook endpoint for pending transactions. Now, how cool is that?
This way, you only have one place that handles the success or failure of a given transaction.