Transactions
Last updated: 29-Oct-2021
Transactions are the objects that can have different states, and depending on the state of a transaction a specific action can be performed like a capture, refund or something else. Transactions are placed in accounts. Refunds and chargebacks are linked to transaction IDs.
Transaction lifecycle
It is possible to get the history of a transaction by calling the $BASEURL/v1/transaction/{id}/history
endpoint. You'll receive an array of objects, with each object representing a status:
[
{
"status": "string",
"status_reason": "string",
"transaction": "string"
}
]
For a transaction that went through the status' INITIATED
, SETTLEMENT_REQUESTED
and SETTLEMENT_COMPLETED
the response would like this:
[
{
"_id": "5bff60844389a2585e20658a",
"created_at": "2018-11-29T03:44:04.581Z",
"status": "SETTLEMENT_COMPLETED",
"transaction": "5bfe572161b28f685b56b301",
"updated_at": "2018-11-29T03:44:04.581Z"
},
{
"_id": "5bfe572161b28f685b56b308",
"created_at": "2018-11-28T08:51:45.683Z",
"status": "SETTLEMENT_REQUESTED",
"transaction": "5bfe572161b28f685b56b301",
"updated_at": "2018-11-28T08:51:45.683Z"
},
{
"_id": "5bfe572161b28f685b56b304",
"created_at": "2018-11-28T08:51:45.666Z",
"status": "INITIATED",
"transaction": "5bfe572161b28f685b56b301",
"updated_at": "2018-11-28T08:51:45.666Z"
}
]
Rate this article: