Skip to content

Adapters ​

An adapter connects one provider to the OpenRampKit server. You create it with the provider's factory and pass it in adapters:

ts
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 ​

AdapterPackageLegsMethodsCountriesSurfacesAccountStatus
Relay@openrampkit/adapter-relaywallet, transfer, bridgewallet, transferAllWALLET_TX, DEPOSIT_ADDRESSAPI key (Relay requires one for quotes from 2 Oct 2026; always set it)Working
LI.FI@openrampkit/adapter-lifiwalletwalletAllWALLET_TXOptional API keyNew; some details TO VERIFY
Swapped@openrampkit/adapter-swappedOne per Swapped payment group (live catalog); sell-* payout legs for withdrawalscard, Apple Pay, Google Pay, bank transfer, VietQR, MoMo, GCash, GoPay, DANA, PIX, UPI, BLIK, SPEI, mobile money and more; payouts: bank transfer, Skrill, PIX, InteracPer method, from the catalog; not US-TXIFRAME (sell: then WALLET_TX)YesWorking; status polling is TO VERIFY
Coinbase@openrampkit/adapter-coinbasecard, apple_pay, google_pay, achcard, Apple Pay, Google Pay, ACH (US)Where Coinbase operates, not JPREDIRECTYes (CDP)Working; several details TO VERIFY
Binance@openrampkit/adapter-binanceaccountConnect exchange (exchange): pay from the Binance balanceWhere Binance serves users; not US, CA, NLREDIRECTYes, with Binance partner approvalNew; several details TO VERIFY
Transak@openrampkit/adapter-transakcard, 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 morePer fiat currency, from the catalogIFRAME (or REDIRECT)YesWorking; several details TO VERIFY
MoonPay@openrampkit/adapter-moonpaycard, apple_pay, google_pay, ach, sepa, gbp_bank, gbp_open_banking, pix, paypal, venmo, revolut_pay, interacSame; gbp_bank is Faster Payments, gbp_open_banking is pay by bankWhere MoonPay allows buying (live catalog)REDIRECT (or IFRAME)YesNew; some details TO VERIFY
Banxa@openrampkit/adapter-banxacard, 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 transfersWhere Banxa serves (live catalog)REDIRECT (or IFRAME)Yes (partner account)Unverified; built from the docs; some details TO VERIFY
PayTrie@openrampkit/adapter-paytrieinteracInterac e-Transfer (CAD to USDC)CAOTP, FORM, REDIRECT (sign-up and KYC), BANK_FIELDSYes (PayTrie account and KYC per user)Unverified; built from the docs; some details TO VERIFY
Flashnet@openrampkit/adapter-flashnetcash_app, lightning, transferCash 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: allQR (or DEEPLINK), DEPOSIT_ADDRESSYes, with Flashnet account approval; no sandboxUnverified; experimental; built from the docs; some details TO VERIFY
Stripe@openrampkit/adapter-stripecard, apple_pay, google_pay, achSameUS (not HI) and EUPROVIDER_SDK (or REDIRECT)Yes, with onramp approvalNew; some details TO VERIFY
Stripe Link@openrampkit/adapter-stripe-linkcard, apple_pay, google_pay, achSameUS (not NY)PROVIDER_SDKYes, with Stripe private preview onboardingUnverified; some details TO VERIFY
Xendit@openrampkit/adapter-xenditOne per country and channel, e.g. id-qrisQRIS, DANA, OVO, ShopeePay, QR Ph, GCash, Maya, GrabPay, PromptPay, TrueMoney, Touch 'n Go, MoMo, ZaloPay, PayNowID, PH, TH, MY, VN, SGQR, REDIRECT, DEEPLINKYesWorking (merchant destination only)
Chain watch@openrampkit/adapter-chain-watchnone for plans (a transfer leg for deposit sessions only)Standing deposit addresses for the same token on the same chainAllnone (the address is the destination)No (RPC URLs only)New
Mock@openrampkit/adapter-mockcard, local, payin, optional wallet, transfer, bridge, offrampEvery common methodAll (local methods in SEA)REDIRECT, QR, WALLET_TX, DEPOSIT_ADDRESS, FORMNoFor tests; moves no money
Meld@openrampkit/adapter-meldOne 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 morePer method and countryREDIRECTYesNew; in progress; some details TO VERIFY
Onramper@openrampkit/adapter-onramperOne 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 morePer method and countryREDIRECTYes (with a signing key)New; in progress; some details TO VERIFY
Bridge@openrampkit/adapter-bridgeusd-ach, usd-wire, eur-sepa, mxn-spei, brl-pix, gbp-fps; payout-* legs for withdrawalsACH, bank transfer (wire), SEPA, SPEI, Pix, Faster Payments; payouts: ACH, wire, SEPAAll except the Bridge deny list and US-NYBANK_FIELDS, QR, REDIRECT, FORM (payout: then WALLET_TX)Yes, with KYC per userNew; some details TO VERIFY
Peer@openrampkit/adapter-peervenmo, cashapp, zelle, chime, paypal, revolut, wiseVenmo, Cash App, Zelle, Chime, PayPal, Revolut, WiseUS; Revolut in GB and EEA; Wise everywhereREDIRECT (or IFRAME)YesNew; 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.

AdapterGuaranteeFees with no stated amountproviderRef
Relaymin_output for a wallet quote through Relay (minOutput is Relay minimumAmount); estimate for deposit-address legs; firm for a same-chain, same-token transfernoneRelay request id
LI.FImin_output (minOutput is LI.FI toAmountMin)noneLI.FI transactionId, else the source hash
SwappedestimatenoneSwapped order_id
CoinbaseestimatenoneGuest order id, or the Coinbase transaction id
Binanceestimatethe Binance fee, when Binance names another currencythe leg ref (externalOrderId)
TransakestimatenoneTransak order id
MoonPayestimatenoneMoonPay transaction id
Banxaestimatethe Banxa spread in the rateBanxa order id
PayTrieestimatenonePayTrie transaction id
Flashnetestimatethe Cash App USD to bitcoin rate (cash_app)Orchestra orderId (the leg ref is the quoteId)
Stripeestimatenonethe onramp session id (also the leg ref)
Xenditfirmnonethe payment request id (also the leg ref)
Mockfirm for fiat legs and plain transfers; min_output (50 bps) for bridge and swap legsnonethe leg ref
MeldestimatenoneMeld transaction id
Onramperestimatethe "included in rate" fee of an onramp that sends no fee fieldsOnramper transactionId
Bridgeestimatethe FX fee in the rate (EUR, MXN, BRL, GBP)Bridge deposit_id or transfer id
PeerestimatenonePeer 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.address when 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 as providerRef.
  • Status tables. Each adapter maps provider statuses with statusMap from @openrampkit/adapter. An unknown provider status gives no new step: the adapter logs it once, and the leg keeps its current step. It never becomes processing (or anything else) by accident. The raw provider status goes to detail.providerStatus.
  • Quote expiry. Every quote has an expiresAt. The adapters set it with quoteExpiresAt(minutes, providerExpiry?).
  • Transactions. Adapters report onchain transactions with a role: source (into the leg), destination (the delivery), settlement or refund. The server adds the leg index and the explorer link.
  • Signatures. Stripe, Coinbase, MoonPay, Meld and Peer verify webhooks with verifyTimestampedHmac from @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.

MIT licensed