Get transactions result through an API
This article explains how to get a transaction result through the REST API.
Make a GETrequest to the /credit/transactions/{transaction_id}
endpoint.
With a valid access token, make a request to the (GET/credit/transactions/{transaction_id}) endpoint, sending the following parameters.
If everything is right in the request, the response is a JSON with the transaction status, as follows:
{
"status": "processing"
}
For more information about the status, see the Enumerations article.
If an error occurs, the response is a JSON with the error and the error code:
{
"error": {
"code": "40004",
"description": "transaction id is invalid"
}
}
The following is a list of possible errors returned by the service:
HTTP Code | Code | Description | Reason |
---|---|---|---|
400 | 40001 | error decoding json | The data sent does not match the service contract |
400 | 40002 | error validating json | Some of the information is badly formatted or not filled in |
400 | 40004 | transaction id is invalid | The transaction id is invalid (format) |
403 | 40301 | not allowed | The user does not have permission to perform such an action. |
404 | 40401 | transaction not found | Transaction not found |
500 | 50001 | internal error | Internal service failure |
Get transaction status update notifications
It is possible to receive notifications of transactions' status changes, and this is done through a webhook. See how in the Get transaction result via webhook section.
Any concerns?
Missing something or still need help? If you are already a customer or partner, you can contact us through the Help Center.