Transactions
Retrieve a transaction
Return details for a specific transaction by its ID.
The Retrieve Transaction endpoint returns details of a specific transaction by its unique ID. This is useful for verifying payment status, fetching metadata, or displaying transaction details in dashboards.
Endpoint
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
transaction_id | string | Yes | The unique ID of the transaction to retrieve. |
Headers
Key | Value | Required |
---|---|---|
Authorization | Bearer <access_token> | Yes |
Response
Successful Response (200 OK)
Field | Type | Description |
---|---|---|
id | string | Transaction ID. |
account_id | string | The account linked to the transaction. |
amount | int | Transaction amount in minor units (e.g., 5000 = $50.00). |
currency | string | ISO 4217 currency code. |
type | string | Transaction type (payment, credit, refund). |
status | string | Transaction status (pending, succeeded, failed, canceled). |
reference | string | External reference ID, if provided. |
metadata | object | Key-value metadata attached to the transaction. |
created_at | string | ISO 8601 timestamp when the transaction was created. |
updated_at | string | ISO 8601 timestamp when the transaction was last updated. |
Error Response (404 / 401)
Error Code | Meaning |
---|---|
not_found | Transaction ID does not exist. |
unauthorized | Missing or invalid access token. |
Example Usage
cURL
JavaScript (Fetch)
Always check the status field to confirm whether a transaction has succeeded, failed, or was canceled before granting services to a customer.