Adapters
An adapter connects one provider to the OpenRampKit server. You create it with the provider's factory and pass it in adapters:
import { createOpenRamp } from '@openrampkit/server'
import { relay } from '@openrampkit/adapter-relay'
import { swapped } from '@openrampkit/adapter-swapped'
import { xendit } from '@openrampkit/adapter-xendit'
createOpenRamp({
secret: process.env.OPENRAMP_SECRET!,
baseUrl: 'https://app.example.com/api/openramp',
adapters: [
relay({ apiKey: process.env.RELAY_API_KEY }),
swapped({ publicKey: process.env.SWAPPED_PUBLIC_KEY!, secretKey: process.env.SWAPPED_SECRET_KEY! }),
xendit({ secretKey: process.env.XENDIT_SECRET_KEY!, webhookToken: process.env.XENDIT_WEBHOOK_TOKEN! }),
],
})To get the keys and webhook secrets for each provider, see Get provider keys.
Each adapter is its own package, for example @openrampkit/adapter-relay. The packages are not on npm yet. See Try it before the npm release.
Each adapter id may appear once. The server refuses an adapter built for another API version. The adapters on this page use version 2 of the adapter contract (ADAPTER_API_VERSION = 2).
For withdrawals, three adapters have legs today: Relay (wallet, to any address), Swapped (sell-*, to cash) and Mock (wallet and offramp). See Withdrawals.
Overview
| Adapter | Package | Legs | Methods | Countries | Surfaces | Account | Status |
|---|---|---|---|---|---|---|---|
| Relay | @openrampkit/adapter-relay | wallet, transfer, bridge | wallet, transfer | All | WALLET_TX, DEPOSIT_ADDRESS | API key (Relay requires one for quotes from 2 Oct 2026; always set it) | Working |
| LI.FI | @openrampkit/adapter-lifi | wallet | wallet | All | WALLET_TX | Optional API key | New; some details TO VERIFY |
| Swapped | @openrampkit/adapter-swapped | One per Swapped payment group (live catalog); sell-* payout legs for withdrawals | card, Apple Pay, Google Pay, bank transfer, VietQR, MoMo, GCash, GoPay, DANA, PIX, UPI, BLIK, SPEI, mobile money and more; payouts: bank transfer, Skrill, PIX, Interac | Per method, from the catalog; not US-TX | IFRAME (sell: then WALLET_TX) | Yes | Working; status polling is TO VERIFY |
| Coinbase | @openrampkit/adapter-coinbase | card, apple_pay, google_pay, ach | card, Apple Pay, Google Pay, ACH (US) | Where Coinbase operates, not JP | REDIRECT | Yes (CDP) | Working; several details TO VERIFY |
| Binance | @openrampkit/adapter-binance | account | Connect exchange (exchange): pay from the Binance balance | Where Binance serves users; not US, CA, NL | REDIRECT | Yes, with Binance partner approval | New; several details TO VERIFY |
| Transak | @openrampkit/adapter-transak | card, apple_pay, google_pay, bank_transfer, upi, faster_payments, open_banking, pse (live catalog) | card, Apple Pay, Google Pay, bank transfer, SEPA, UPI, Faster Payments, pay by bank, PSE and more | Per fiat currency, from the catalog | IFRAME (or REDIRECT) | Yes | Working; several details TO VERIFY |
| MoonPay | @openrampkit/adapter-moonpay | card, apple_pay, google_pay, ach, sepa, gbp_bank, gbp_open_banking, pix, paypal, venmo, revolut_pay, interac | Same; gbp_bank is Faster Payments, gbp_open_banking is pay by bank | Where MoonPay allows buying (live catalog) | REDIRECT (or IFRAME) | Yes | New; some details TO VERIFY |
| Banxa | @openrampkit/adapter-banxa | card, apple_pay, google_pay, sepa, gbp_bank, payid, npp, ideal, klarna, paypal, interac, spei, khipu, zar_bank, vietqr, upi (live catalog) | Same; gbp_bank is Faster Payments, npp and zar_bank are bank transfers | Where Banxa serves (live catalog) | REDIRECT (or IFRAME) | Yes (partner account) | Unverified; built from the docs; some details TO VERIFY |
| PayTrie | @openrampkit/adapter-paytrie | interac | Interac e-Transfer (CAD to USDC) | CA | OTP, FORM, REDIRECT (sign-up and KYC), BANK_FIELDS | Yes (PayTrie account and KYC per user) | Unverified; built from the docs; some details TO VERIFY |
| Flashnet | @openrampkit/adapter-flashnet | cash_app, lightning, transfer | Cash App and Lightning (a USD invoice paid over Lightning); transfer from Bitcoin (BTC) or Tron (USDT) | cash_app: US, not US-NY; lightning: all, not US-NY; transfer: all | QR (or DEEPLINK), DEPOSIT_ADDRESS | Yes, with Flashnet account approval; no sandbox | Unverified; experimental; built from the docs; some details TO VERIFY |
| Stripe | @openrampkit/adapter-stripe | card, apple_pay, google_pay, ach | Same | US (not HI) and EU | PROVIDER_SDK (or REDIRECT) | Yes, with onramp approval | New; some details TO VERIFY |
| Stripe Link | @openrampkit/adapter-stripe-link | card, apple_pay, google_pay, ach | Same | US (not NY) | PROVIDER_SDK | Yes, with Stripe private preview onboarding | Unverified; some details TO VERIFY |
| Xendit | @openrampkit/adapter-xendit | One per country and channel, e.g. id-qris | QRIS, DANA, OVO, ShopeePay, QR Ph, GCash, Maya, GrabPay, PromptPay, TrueMoney, Touch 'n Go, MoMo, ZaloPay, PayNow | ID, PH, TH, MY, VN, SG | QR, REDIRECT, DEEPLINK | Yes | Working (merchant destination only) |
| Chain watch | @openrampkit/adapter-chain-watch | none for plans (a transfer leg for deposit sessions only) | Standing deposit addresses for the same token on the same chain | All | none (the address is the destination) | No (RPC URLs only) | New |
| Mock | @openrampkit/adapter-mock | card, local, payin, optional wallet, transfer, bridge, offramp | Every common method | All (local methods in SEA) | REDIRECT, QR, WALLET_TX, DEPOSIT_ADDRESS, FORM | No | For tests; moves no money |
| Meld | @openrampkit/adapter-meld | One per payment method (live catalog) | card, Apple Pay, Google Pay, UPI, IMPS, PIX, SEPA, SEPA Instant, ACH, iDEAL, Bancontact, BLIK, PayID, SPEI, PSE, Khipu, M-Pesa, mobile money and more | Per method and country | REDIRECT | Yes | New; in progress; some details TO VERIFY |
| Onramper | @openrampkit/adapter-onramper | One per payment type (live catalog) | card, Apple Pay, Google Pay, SEPA, SEPA Instant, ACH, PIX, UPI, IMPS, iDEAL, Bancontact, Faster Payments, pay by bank, SPEI, Bancolombia, Khipu and more | Per method and country | REDIRECT | Yes (with a signing key) | New; in progress; some details TO VERIFY |
| Bridge | @openrampkit/adapter-bridge | usd-ach, usd-wire, eur-sepa, mxn-spei, brl-pix, gbp-fps; payout-* legs for withdrawals | ACH, bank transfer (wire), SEPA, SPEI, Pix, Faster Payments; payouts: ACH, wire, SEPA | All except the Bridge deny list and US-NY | BANK_FIELDS, QR, REDIRECT, FORM (payout: then WALLET_TX) | Yes, with KYC per user | New; some details TO VERIFY |
| Peer | @openrampkit/adapter-peer | venmo, cashapp, zelle, chime, paypal, revolut, wise | Venmo, Cash App, Zelle, Chime, PayPal, Revolut, Wise | US; Revolut in GB and EEA; Wise everywhere | REDIRECT (or IFRAME) | Yes | New; opt-in P2P marketplace (read the warning) |
See Payment methods for each method, its countries and its adapters.
"TO VERIFY" means the source code marks a provider detail as not yet checked against the live API. Each adapter page lists them.
Quote guarantees and provider references
Each quote says how firm its output is (guarantee). The server uses the weakest guarantee of the legs for a pathway. Each started leg can also report the provider's own order id (providerRef). Apps show it to the user for provider support.
| Adapter | Guarantee | Fees with no stated amount | providerRef |
|---|---|---|---|
| Relay | min_output for a wallet quote through Relay (minOutput is Relay minimumAmount); estimate for deposit-address legs; firm for a same-chain, same-token transfer | none | Relay request id |
| LI.FI | min_output (minOutput is LI.FI toAmountMin) | none | LI.FI transactionId, else the source hash |
| Swapped | estimate | none | Swapped order_id |
| Coinbase | estimate | none | Guest order id, or the Coinbase transaction id |
| Binance | estimate | the Binance fee, when Binance names another currency | the leg ref (externalOrderId) |
| Transak | estimate | none | Transak order id |
| MoonPay | estimate | none | MoonPay transaction id |
| Banxa | estimate | the Banxa spread in the rate | Banxa order id |
| PayTrie | estimate | none | PayTrie transaction id |
| Flashnet | estimate | the Cash App USD to bitcoin rate (cash_app) | Orchestra orderId (the leg ref is the quoteId) |
| Stripe | estimate | none | the onramp session id (also the leg ref) |
| Xendit | firm | none | the payment request id (also the leg ref) |
| Mock | firm for fiat legs and plain transfers; min_output (50 bps) for bridge and swap legs | none | the leg ref |
| Meld | estimate | none | Meld transaction id |
| Onramper | estimate | the "included in rate" fee of an onramp that sends no fee fields | Onramper transactionId |
| Bridge | estimate | the FX fee in the rate (EUR, MXN, BRL, GBP) | Bridge deposit_id or transfer id |
| Peer | estimate | none | Peer order id (also the leg ref) |
A fee with no stated amount has amount: null. The UI then does not show "No fees". Each adapter page lists its fee kinds and whether each fee is included in the quote.
Provider webhooks
Adapters with a webhook handler receive provider callbacks at:
{baseUrl}/webhooks/{adapterId}For example https://app.example.com/api/openramp/webhooks/swapped. Register this URL in the provider's dashboard. The adapter verifies the signature and turns the payload into leg events. The server finds the session by the provider reference and updates it. Repeated webhooks are safe: a leg that already ended ignores later events.
Adapters without webhooks (Relay and LI.FI) are driven by status checks: the browser's poll (GET /sessions/:id/step), and the background sweep (or openramp.sessions.refresh(id)) after the user leaves.
Adapter routes
An adapter may serve its own pages at {baseUrl}/adapters/{adapterId}/*. The mock adapter uses this for its hosted checkout.
Common patterns
- Static legs plus a live catalog. Swapped, Coinbase, Transak, MoonPay, Banxa, Meld, Onramper and Peer declare static legs and refine them with
catalog()at plan time (cached in the store). If the catalog call fails, the server logs a warning and uses the static legs. - Delivery for hops. Onramp adapters deliver to
deliverTo.addresswhen the server gives one (the Relay deposit address in a two-leg pathway), else to the session's destination address. - References. Every started leg returns a
ref(an order id, a deposit address or a request id). Webhooks and status checks find the leg by it. When the provider has its own order id, the leg also reports it asproviderRef. - Status tables. Each adapter maps provider statuses with
statusMapfrom@openrampkit/adapter. An unknown provider status gives no new step: the adapter logs it once, and the leg keeps its current step. It never becomesprocessing(or anything else) by accident. The raw provider status goes todetail.providerStatus. - Quote expiry. Every quote has an
expiresAt. The adapters set it withquoteExpiresAt(minutes, providerExpiry?). - Transactions. Adapters report onchain transactions with a role:
source(into the leg),destination(the delivery),settlementorrefund. The server adds the leg index and the explorer link. - Signatures. Stripe, Coinbase, MoonPay, Meld and Peer verify webhooks with
verifyTimestampedHmacfrom@openrampkit/adapter.
Wallets
Wallet adapters are separate: they run in the browser and sign WALLET_TX surfaces. See Wallets (wagmi).
Write your own
See Writing an adapter.