Get Specific Swap History
Get Specific Swap History
Retrieves the details of a specific swap transaction using the transaction merchant reference and user reference.
Request
| Method | Endpoint |
|---|---|
GET | /api/v1/swap/data |
Authentication & Headers
| Header | Required | Description | Example |
|---|---|---|---|
Authorization | Yes | Bearer token used to authenticate the request. | Bearer {{api_key}} |
x-merchant-ref | Yes | Unique reference identifying the merchant. | MERCHANT_001 |
Query Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
txn_merchant_ref | string | Yes | Unique merchant reference of the swap transaction. | SWP_001245 |
user_ref | string | Yes | Reference of the user associated with the transaction. | USR_001234 |
Example Request
{{base_url}}/api/v1/swap/data?txn_merchant_ref=SWP_001245&user_ref=USR_001234Example Response
{
"status": "success",
"message": "Retrieved successfully",
"data": {
"base_amount": 25000,
"base_currency": "NGN",
"collection_channel": "BANK_TRANSFER",
"created_at": "2026-09-10T10:25:35.758476Z",
"failure_reason": "",
"kind": "BUY",
"notification_url": "https://example.com/webhook/swap",
"payment_ref": "PAY_8f72a91c",
"payout_channel": "BANK_TRANSFER",
"quote_amount": 25.2016129,
"quote_currency": "CAD",
"rate_used": 992,
"status": "COMPLETED",
"swap_type": "DIRECT_SWAP",
"txn_merchant_ref": "SWP_001245",
"updated_at": "2026-09-10T10:28:45.758476Z"
}
}Response
| Field | Type | Description |
|---|---|---|
status | string | Indicates whether the request was successful. |
message | string | Response message. |
data | object | Details of the requested swap transaction. |
data.base_amount | number | Amount of the base currency involved in the swap. |
data.base_currency | string | Currency being exchanged. |
data.collection_channel | string | Channel through which the base amount is collected. |
data.created_at | string | Date and time the transaction was created. |
data.failure_reason | string | Reason for failure, if applicable. |
data.kind | string | Swap direction, such as BUY or SELL. |
data.notification_url | string | URL configured to receive transaction notifications. |
data.payment_ref | string | Unique payment reference for the transaction. |
data.payout_channel | string | Channel used to deliver the quote amount. |
data.quote_amount | number | Amount received in the quote currency. |
data.quote_currency | string | Currency received from the swap. |
data.rate_used | number | Exchange rate applied to the transaction. |
data.status | string | Current status of the swap transaction. |
data.swap_type | string | Type of swap transaction. |
data.txn_merchant_ref | string | Merchant reference for the swap transaction. |
data.updated_at | string | Date and time the transaction was last updated. |
Updated about 1 month ago
Did this page help you?
