Skip to main content
Build and test your ramp integration before going live. The Pods ramp sandbox uses the same quote and status endpoints as production—GET /v2/swap/quote and GET /v2/swap/status/{id}—against a real testnet ERC-20 on Base Sepolia (pBRL), so you can verify how your application handles quotes, on-chain settlements, refunds, and payout failures without a live Pix transfer.

Supported sandbox corridors

Both corridors use GET /v2/swap/status/{id} to track the quote’s progress.
What you can test Test your backend quote requests, BR Code rendering, status polling, on-chain balance updates on Base Sepolia (84532), payer-mismatch refunds, and offramp payout failures. Pix rails and recipient lookups are simulated in staging; pBRL (0x9762f60740142cF11C0F32C6e24cd3e86016C0f2) is a testnet token with no claim on real BRL. Sandbox transition routes are not registered in production.

Before you start

You’ll need:
  • Your staging Pods API URL and customer API key, provided by Pods.
  • An approved sandbox KYC profile (status: "approved", brlaEnabled: true) whose walletAddress matches the ramp wallet. Save its kycUserId.
  • Node.js 20 or later to run the examples using built-in fetch.

Set up the Node.js client

Run these examples on your backend. Configure PODS_API_BASE_URL and PODS_API_KEY in your environment with the staging values provided by Pods. Save this helper as pods-client.mjs:
The examples below use ES modules and top-level await. Save them as .mjs files alongside the helper.

Ramp status reference

These are the quote statuses used by the sandbox ramp flows:

Onramp: BRL Pix to pBRL

Use the standard GET /v2/swap/quote endpoint with originChain=fiat, destinationChain=base-sepolia, tokenIn=BRL, and tokenOut=0x9762f60740142cF11C0F32C6e24cd3e86016C0f2. Pass amountIn in BRL cents (1000 = R$10.00) and destinationAddress set to the wallet on your approved sandbox KYC profile.

1. Request an onramp quote

Expected response:
Save onramp.quote.id. The response matches the production Pix onramp envelope, with a visually non-payable placeholder in paymentInstructions.pix.copyPaste (sandbox-only-dont-pay-it:<quoteId>) so your frontend can render the QR or copy-paste code without risk of a real Pix transfer.

2. Simulate payment confirmation (mint pBRL)

Continue in the same script and pass both quoteId and the matching kycUserId:
Relevant response fields:
When kycUserId matches the profile bound to the quote, Pods broadcasts a real onramp transaction on Base Sepolia that mints 10 pBRL (10000000000000000000) to destinationAddress and reconciles the QuoteMinted event.

3. Confirm the result in your application

You can inspect destinationTxHash on Base Sepolia BaseScan.

Offramp: pBRL to BRL Pix

To test an offramp, the originAddress wallet must already hold pBRL on Base Sepolia (minted through the onramp flow above). Pass amountIn in 18-decimal pBRL base units (10000000000000000000 = 10 pBRL, a whole number of BRL cents) along with originAddress and any non-empty pixKey.

1. Request an offramp quote

Start a separate script:
Expected response:
Just like production offramp quotes, the response carries chainId and transactionData without a paymentInstructions block. If the wallet’s pBRL balance is below amountIn, the quote step returns 409 SANDBOX_INSUFFICIENT_PBRL.

2. Simulate settlement (burn pBRL)

Confirm the offramp quote with quoteId alone (kycUserId is not required for offramp confirmation):
Relevant response fields:
Pods broadcasts a real transaction on Base Sepolia that burns the quoted pBRL from originAddress and reconciles the QuoteRedeemed event.

3. Confirm the result in your application

Test refunds and failures

Use separate pending quotes to verify how your application handles a payer-mismatch refund on an onramp or a rejected Pix payout on an offramp.

Simulate an onramp refund (payer mismatch)

Create a new onramp quote, then call confirmSandboxQuote with a missing, null, or different kycUserId:
Relevant response fields:
Pods records a QuoteRefunded event on the Base Sepolia pBRL contract without minting tokens and transitions the quote to refunded.

Simulate a failed offramp payout

Create a new offramp quote (against a wallet holding enough pBRL), then call failSandboxOffRamp:
Relevant response fields:
failureCode is optional and defaults to PROVIDER_REJECTED. Supported values: This transition applies only to a pending (or confirmed) sandbox offramp quote and makes no on-chain transaction, so the wallet keeps its pBRL balance.

State transitions

Onramp (BRL → pBRL)

Offramp (pBRL → BRL)

Troubleshooting and reference

Additional behavior:
  • GET /v2/swap/status/{id} is read-only for sandbox quotes until you call a sandbox transition endpoint (or the quote expires).
  • Terminal quotes (fulfilled, refunded, failed, expired) reject further transition calls with 409 PAYMENT_STATE_CONFLICT.
  • Validation or RPC errors (HttpError) during POST /v2/swap/status/sandbox/confirmed leave the quote retryable; only a genuine on-chain revert marks the quote failed.
  • In-flight settlements acquire a 60-second lease so concurrent confirmation calls reconcile the same transaction rather than broadcasting duplicate mints or burns.

Prepare for production

Before moving beyond the sandbox, verify that your application:
  • Requests quotes through GET /v2/swap/quote using production chain names (base, polygon, monad, solana, stable) and token addresses.
  • Renders paymentInstructions.pix.copyPaste on onramps and signs/submits transactionData on offramps.
  • Polls GET /v2/swap/status/{id} until a terminal status (fulfilled, refunded, failed, expired) and handles failure details.
  • Uses a production Pods API key and keeps it on the backend.
Continue with the production guides: