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:
For BRL and MXN, 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.
A customer can have only one active rule per USD, EUR, or GBP account at a time. Deposits in these currencies are matched to the customer’s account rather than a per-rule reference, so a second rule would be ambiguous. Creating one while another is active returns
409 AUTOCONVERSION_RULE_ALREADY_EXISTS. Delete the existing rule to create a new one. BRL and MXN rules have no such limit.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
Response
List rules
List a customer’s rules, newest first, withGET /autoconversion-rules?customerId={customerId}. Results are paginated: pass size (1–50, default 25) and the previous page’s nextCursor as cursor. List items include the rule’s name but not sourceDepositInfo, so fetch a single rule to get the deposit details.
Request
Response
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. For USD, EUR, and GBP rules, omit reference, since deposits are matched to the account.
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.