Skip to main content
This example demonstrates fiat on/off-ramp with Pods Ramp using the Pods API. Every route uses GET /v2/swap/quote: originChain/destinationChain of fiat select the local rail, and tokenIn/tokenOut select the fiat currency or on-chain asset.
Money-movement routes are available only after the wallet’s Ramp KYC profile is approved. See the KYC backend example and Set up Pods Ramp.

Overview

This example covers:
  • Pix onramp — Pix BRL → USDC (show the Pix code, then poll)
  • Pix offramp — USDC → Pix BRL (sign transactionData, then poll)
  • Foreign USD onramp — USD ACH/WIRE → USDC (show bank details, then poll)

Prerequisites

  • Node.js 18+
  • Pods API key
  • A wallet with an approved Ramp KYC profile (offramp additionally requires the signer key)

Installation

Environment Variables

Send all requests from your backend. Never expose PODS_API_KEY in a browser or mobile client.

Step-by-Step Walkthrough

1. Initialize API Client

2. Pix Onramp (BRL → USDC)

Pass destinationAddress; the response includes paymentInstructions.pix.copyPaste. There is no on-chain transaction — the user pays the Pix code.

3. Pix Offramp (USDC → BRL)

Pass originAddress (an approved Ramp wallet) and pixKey; the response includes executable transactionData. Batch and sign it, then poll.

4. Foreign USD Onramp (USD ACH/WIRE → USDC)

Pass destinationAddress (KYC profile must have usdEnabled: true). Send exactly one of amountIn (USD cents) or amountOut (USDC base units). The response returns bank deposit instructions — no EVM transaction to sign.

Running the Example

Download both files into the same folder to run this example: ramp.js and the shared EIP-7702 batch helper eip7702-batch.js that it imports.
See the full runnable script: ramp.js.

Next Steps

KYC (backend)

Onboard and approve a wallet before ramping

Move Money Guide

All Ramp routes, tokens, and fees

Track Ramp Status

Poll KYC approval and swap status

API Reference

View complete API documentation