Skip to main content
A payout takes stablecoin from your customer’s wallet and delivers fiat to a bank account. In this quickstart, your customer sells 100 USDC and the BRL lands on a Pix key in Brazil. It runs in the sandbox, where the Pix transfer is simulated, so it takes about a minute and no real money moves.

Why USDC and BRL

This picks up where the pay-in quickstart ends: the customer holds USDC on Polygon. Paying out over Pix shows the return trip, with the customer turning dollars on-chain back into reais, for example to pay a supplier or move the money to their own bank. The same calls work in other corridors. Register a destination on another rail, such as a CLABE over SPEI for MXN, and point the off-ramp at it. See Coverage for every currency, rail, and network.

Build it with your AI agent

Copy a prompt into Cursor, Claude Code, Codex, or any coding agent. Both read this page and the API spec before writing code.
The agent writes and runs the full script, then reports back.
Prompt

How it works

Before you start

  • A sandbox API key. See Authentication.
  • An approved customer with USDC in their wallet. The pay-in quickstart gets you there, and this page uses the customer it creates.

1. Register the Pix destination

A destination is where the payout goes, and Lumx verifies its holder before any money is sent. Here it is the customer’s own Pix key, so holder.relationship is SELF and the holder’s name and taxId match the customer.
Request
Response (excerpt)
A payout needs a destination in APPROVED, and this Pix destination comes back approved. Save its id. Later payouts to the same recipient can reuse it.

2. Create the off-ramp

The off-ramp sells 100 USDC from the customer’s Polygon wallet and sends the BRL to the destination. The minimum per payout is the equivalent of USD 40.
Request
Response (excerpt)
  • The destination already fixes the rail and the currency, so the request has no rail or targetCurrency. The response fills them in.
  • PERSONAL_ACCOUNT only works with SELF destinations. To pay a third party, register the destination with their details and pick the matching purpose code.
  • memo goes in the message field of the Pix.

3. Wait for the payout

The off-ramp moves through TRANSFERRING_STABLECOIN, TRADING, and TRANSFERRING_FIAT to SUCCESS. In the sandbox this takes about a minute.
Request
Response (excerpt)
finalTargetAmount is the BRL the recipient receives, after fees. blockExplorerUrl opens the on-chain transfer that left the customer’s wallet.

What changes in production

  • Recipients: most payouts go to third parties, such as suppliers or employees. Register their destination with their details and the right holder.relationship. Destinations on some rails stay in UNDER_VERIFICATION until Lumx approves them. Wait for the destinations.approved webhook.
  • The rate: without a quote, the off-ramp converts at a floating rate. To fix the BRL amount before you pay, lock a quote.
  • Status updates: subscribe to the offramp.* webhooks instead of polling.
  • Sender name: the recipient sees your customer as the sender. See Sender of record.

Pay out stablecoins via Pix

The full Pix payout guide, with third-party recipients and errors.

Lock an FX quote

Fix the BRL amount before you pay.

USDT to MXN over SPEI

The same flow in Mexico.

Pay-in: BRL to USDC

Fund the wallet first.