v1

latestOpenAPI 3.0.02026-07-24103118224.7 KB
Swap

Get a swap by id

Returns details of a specific swap owned by the authenticated merchant, including the resolved toAmountInCents once settlement has produced a destination amount.

get/api/swap/{id}

Path parameters

idstring required
Example:swap_01JABCDEF0123456789XYZ

Unique identifier of the swap

Response

Swap details

idstring required
userIdstring required
fromCurrency'USDC' | 'EURC' required
toCurrency'USDC' | 'EURC' required
amountnumber required

Source amount in cents (smallest unit of fromCurrency)

status'INITIATED' | 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED' | 'RETURNED' | 'REFUNDED' required

Merchant-facing status. Internal states (DEPOSIT_COMPLETED, AWAITING_LIQUIDATION) are collapsed to PENDING before being returned, so they will never appear on the wire.

context'bridge' | 'privy' nullable

Pipeline a swap follows: bridge (3 steps) or privy (2 steps).

toAmountInCentsnumber nullable

Final destination amount in cents (smallest unit of toCurrency). null until the swap settles.

createdAtstring date-time required
updatedAtstring date-time required

Example response

{
  "id": "swap_01JABCDEF0123456789XYZ",
  "userId": "usr_01JABCDEF0123456789XYZ",
  "fromCurrency": "USDC",
  "toCurrency": "EURC",
  "amount": 12345,
  "status": "PENDING",
  "context": "privy",
  "toAmountInCents": 11300
}