Skip to main content
Use RampWidget to ship Pix fiat on-ramp and off-ramp UX while your host app still owns the wallet and signing. On-ramp has no client-side signing — the user pays a Pix code and Pods settles the crypto leg server-side. Off-ramp prompts the wallet for exactly one signature to send the on-chain leg, then Pods pays out Pix.
Money-movement routes are available only after the wallet’s Ramp KYC profile is approved. Pair this with the KycWidget, and see Set up Pods Ramp.

Install

Use the same package set and the shared PodsWidgetProvider wrapper as EarnWidget, pinned to a version that includes the ramp widget:
Import PodsProvider, EarnWidget, SwapWidget, and RampWidget from pods-sdk so they share the same React context.

Styles and Theme

RampWidget follows the same styling model as EarnWidget: import @deframe-sdk/components/styles.css once, keep host CSS scoped to .pods-widget, and theme via PodsProvider.config.theme. See EarnWidget Styles and Theme.

Choose a Route

RampWidget quotes exactly one crypto leg per instance, so it requires both a mode (onramp | offramp) and a rampRouteId. Build a route picker from getAvailableRampRoutes() and pass the user’s choice.

Render the On-ramp

Mount RampWidget inside the shared PodsWidgetProvider from the Earn guide. On-ramp shows the Pix payment instructions and has nothing for the user to sign — the crypto lands on currentUserWalletAddress after the Pix payment settles.

Render the Off-ramp

Off-ramp collects the amount and the user’s Pix key, then prompts the wallet for a single signature. currentUserWalletAddress must be an approved Ramp wallet.

Gate on KYC

The SDK has no account concept, so the host tells the widget whether the wallet still needs verification. When isKycRequired is true, the widget renders a “verify first” panel instead of the amount form, and onKycRequiredAction fires when the user acts on it — route them to the KycWidget.

Track and Persist

A quote/bytecode round trip mints a single-use ticket. Persist it so a reactive poller can resume after a page refresh.
  • onTicketCreated({ actionId, quoteId?, depositAddress? }) — fires once the ticket exists.
  • onStatusChange(status) — mirrors every status poll into your own store.
  • onComplete({ success, txHashes? }) — fires once, when the flow reaches a terminal state.
  • onRouteChange(routeName) — adapt host shell/analytics.

RampWidget Props

API Endpoints Used in Ramp Flows

  • GET /v2/swap/quote — price the on/off-ramp (origin/destination fiat selects the Pix rail)
  • POST /v2/swap/bytecode — build the executable payload (pixKey on off-ramp payout)
  • GET /v2/swap/status/{id} — track the ticket to a terminal state
Guides:

Transaction Bridge

Off-ramp signing uses the same processBytecode contract as EarnWidget and SwapWidget. See processBytecode Contract.