Overview
Retrieve one swap by ID for the authenticated business. The record must havemethod SWAP. For payouts, use Get Payout by ID.
Pass the id from Initiate Swap or List Swaps.
Swaps do not use supporting documents. transactionFees is 0.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Retrieve one wallet-to-wallet swap by ID.
method SWAP. For payouts, use Get Payout by ID.
Pass the id from Initiate Swap or List Swaps.
Swaps do not use supporting documents. transactionFees is 0.
GET /v1/payout-api/payouts/swaps/{id} HTTP/1.1
Host: gateway.staging.useyala.com
x-api-key: <YOUR_API_KEY>
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Yes | Swap identifier |
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key |
{
"id": "223e4567-e89b-12d3-a456-426614174001",
"payoutRef": "PAY-2024-002",
"status": "PROCESSING",
"method": "SWAP",
"sourceAmount": 1000,
"sourceCurrency": "USD",
"destinationAmount": 1500000,
"destinationCurrency": "NGN",
"exchangeRate": 1500,
"transactionFees": 0,
"createdAt": "2024-01-21T12:00:00.000Z",
"updatedAt": "2024-01-21T12:00:00.000Z",
"supportingDocuments": []
}
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Swap identifier |
payoutRef | string | Human-readable reference |
status | string | Partner-facing status (PROCESSING until confirmed or reversed) |
method | string | Always SWAP |
sourceAmount | number | Amount debited from source wallet |
sourceCurrency | string | Source wallet currency |
destinationAmount | number | Amount credited to destination wallet |
destinationCurrency | string | Destination wallet currency |
exchangeRate | number | Rate used for the swap |
transactionFees | number | Always 0 for swaps |
createdAt | string (ISO 8601) | Creation time |
updatedAt | string (ISO 8601) | Last update time |
| Status | Code | When |
|---|---|---|
| 404 | SWAP_NOT_FOUND | Unknown id, wrong business, or the id is a payout (not a swap) |
const response = await fetch(
`https://gateway.staging.useyala.com/v1/payout-api/payouts/swaps/${swapId}`,
{ headers: { 'x-api-key': apiKey } },
);
const swap = await response.json();