Swap Flow Overview
- Get Assets - Fetch available assets via
GET /ramp/assets - Create Quote - Generate a swap quote via
POST /ramp/quotewithtype: "swap" - Create Swap - Execute the swap via
POST /ramp/swap - Sign Transaction - Receive the
sendTransactionin theswap_updatedwebhook - Submit to Blockchain - Sign and submit the transaction to the testnet
- Completion - Receive a
swap_updatedwebhook with statuscompleted
Interactive Tutorial
Use the interactive tutorial below to test the swap flow with your sandbox API key. Each step builds on the previous one, and you can edit the request bodies before sending.Manual Testing
If you prefer to test manually, here are the individual API calls:1. Get Available Assets
2. Create Swap Quote
3. Create Swap
4. Handle Webhook
You’ll receive aswap_updated webhook with the transaction to sign:
sendTransaction and submit it to the Stellar testnet. Once confirmed, you’ll receive another webhook with status: "completed".