v1
latestOpenAPI 3.0.02026-07-24103118224.7 KBSwap
Create a swap
Initiates a swap between USDC and EURC using the merchant's custodial wallet balance. Exactly one of amount (in cents) or max: true must be provided. The response is returned as soon as the swap is accepted; settlement is asynchronous — poll GET /api/swap/{id} or GET /api/swap/in-progress to follow progress. A merchant can only have one in-progress swap at a time.
post/api/swap
Request body
Response
Swap accepted and pipeline initiated
Example response
{
"id": "swap_01JABCDEF0123456789XYZ",
"userId": "usr_01JABCDEF0123456789XYZ",
"fromCurrency": "USDC",
"toCurrency": "EURC",
"amount": 12345,
"status": "PENDING",
"context": "privy",
"toAmountInCents": 11300
}