Fiat → Crypto
Convert USD to USDC via hosted checkout; verify via webhook then REST
Summary
Create a Customer, provision a wallet, create a USD→USDC transfer, redirect the user to the provided sourceInstructions.signedUrl to finish payment, then wait for a webhook and re-verify via REST before updating the UI. Fiat: USD only. Crypto: USDC only (today).
Problem → Solution mapping
Pain point | Capability | Mechanism |
---|---|---|
KYC + wallet provisioning | Customers + Wallet API | POST /v1/customers then POST /v1/customers/{id}/wallets returns wallets[...] |
Checkout without building UI | Hosted Payment Link | POST /v1/transfers → sourceInstructions.signedUrl → redirect |
Definitive payment state | Webhooks + REST re-verify | Subscribe, validate HMAC, then GET /v1/transfers/{id} before updating UI |
Architecture
Implementation steps
Make a transfer (USD→USDC) and redirect
Choose from any of our supported fiat payment rails.
💡 Learn more: See our Rails guide to understand how different payment rails work and how routing is handled automatically.
Use the returned sourceInstructions.signedUrl
to open hosted checkout where the user completes payment.
Wait & verify the webhook (then REST re-check)
Subscribe the webhook and store the secret:
Verify signature and re-fetch transfer before updating UI:
Limits & caveats
- Fiat: USD only. Crypto: USDC only (today).
- Always treat REST as source of truth; do not fulfill based on webhook alone.