Stablecoin-to-fiat rules, converting a stablecoin deposit in a wallet to fiat, are coming. This guide covers the fiat-to-stablecoin direction available today.
How it works
- You create a rule for an account, choosing the target asset, network, purpose, and a name.
- The response includes deposit details (
sourceDepositInfo): for a BRL account, a PIXbrCode. Share it with whoever is sending the funds. - Every deposit paid through it is matched to the rule and converted to the target asset.
- You receive webhooks as each conversion moves through its lifecycle.
Create a rule
Send aPOST request to /autoconversion-rules.
Request
Response
Request fields
Share the deposit details
sourceDepositInfo carries everything the sender needs, per rail. What you share depends on the account’s currency:
The
depositIdentifier (PIX) or reference (SPEI) is what matches a deposit to the rule. It’s embedded in the PIX brCode and passed as the SPEI memo. Any deposit paid with it is converted.
Errors
Retrieve a rule
Fetch a single rule, including its currentsourceDepositInfo, with GET /autoconversion-rules/{id}. Use it to re-render a deposit QR code or check a rule’s status after creation.
Request
GET /autoconversion-rules?customerId={customerId}.
Minimum amount
Each deposit must be worth at least 50 USD in the account’s currency. Deposits below the minimum are not converted, so the conversion never starts. If a deposit comes in under the minimum, contact support.Track conversions
Each matched deposit runs as an on-ramp transaction, so subscribe to theonramp.* webhook events to follow the lifecycle, from onramp.transferring_fiat through onramp.trading and onramp.transferring_stablecoin to onramp.success. The receipt (amounts, exchange rate, fees, transaction hash) is delivered on success.
Test in sandbox
Deposits can’t be made against sandbox accounts, so usePOST /autoconversion-rules/simulate-deposit to trigger the flow end-to-end. Pass the rule’s sourceDepositInfo[0].depositIdentifier (PIX) or sourceDepositInfo[0].reference (SPEI) as the reference.
Request
Response
matchedRule tells you whether the simulated deposit matched an active rule. If it did, the conversion runs and your webhook endpoint receives the lifecycle events.
Related resources
Accounts
Virtual accounts that receive the deposits rules convert.
Webhooks
Subscribe to conversion lifecycle events.
Partner Fees
Earn revenue on every conversion a rule executes.
Exchange Rates
How conversion rates are quoted and locked.