How ChangeNOW Powers XRPay's Multi-Asset Checkouts Without Custody

Enterprise merchants want a payment gateway that can accept any cryptocurrency, but their finance teams only want to settle in a single, stable asset.
Forcing a customer to pay in a specific coin like XRP creates checkout friction. But manually managing 400+ token wallets to support buyer variety is an administrative nightmare for the merchant. XRPay solves this using a non-custodial multi-asset conversion pipeline powered by the ChangeNOW Exchange API (changenow.server.ts).
By utilizing cross-chain exchange APIs, XRPay allows merchants to accept over 400 assets with the accounting simplicity of a single target wallet address.
1. The Multi-Asset Problem & The Non-Custodial Solution
In a custodial payment gateway (like Coinbase Commerce), multi-asset support is simple: the provider holds custody of all incoming tokens in their own corporate exchange wallets, updates their internal ledger, and allows the merchant to withdraw the aggregate balance later.
But in a self-custodial system, the merchant must own the private keys for every asset accepted. If a merchant accepts Bitcoin (BTC), Ethereum (ETH), Solana (SOL), and Cardano (ADA), they must manage four different wallet infrastructures.
XRPay bypasses this by utilizing ChangeNOW's API v2 as a just-in-time exchange bridge. The merchant only sets up and manages a single XRP Ledger (XRPL) wallet address. When a buyer selects BTC at checkout, XRPay uses ChangeNOW to dynamically spin up a one-time BTC deposit address, swap the incoming BTC to stablecoins (RLUSD or USDC), and deposit them directly into the merchant's XRPL wallet.
2. Technical Pipeline: Anatomy of a Multi-Asset Swap
Here is how XRPay’s backend services handle a cross-chain checkout session:
Step 1: Estimating the Exchange Rate
When the checkout UI loads, the buyer chooses their currency (e.g. BTC). XRPay’s backend calls the ChangeNOW API to request a real-time exchange rate estimate:
// Fetching the exchange rate estimation from ChangeNOW
const estimate = await getExchangeRange({
from: "btc",
to: "usdcxrpl", // USDC on the XRP Ledger
amount: 100.00,
type: "fixed" // Pin the exchange rate to prevent slippage during checkout
});Using a fixed rate ensures the buyer has a guaranteed window (usually 20 minutes) to send their transaction without worrying about price volatility during confirmation.
Step 2: Creating the Transaction
Once the buyer confirms, the backend creates a transaction session with ChangeNOW, specifying the merchant's target XRPL wallet as the payout address:
const txSession = await createExchangeTransaction({
from: "btc",
to: "usdcxrpl",
address: merchantXrplWalletAddress,
amount: btcAmountEstimate,
userId: merchantId,
refundAddress: buyerBtcRefundAddress
});
const depositAddress = txSession.payinAddress;
// Display depositAddress to buyer as text and QR codeStep 3: Monitoring & Settlement
XRPay monitors the generated depositAddress on the Bitcoin network. As soon as the transaction hits the mempool, the checkout state updates. ChangeNOW receives the BTC, swaps it in their liquidity pools, and executes an on-chain transfer of the resulting USDC/RLUSD directly to the merchant's XRPL destination.
3. Benefits of the ChangeNOW + XRPay Integration
- No Custody Risks: Neither XRPay nor ChangeNOW holds your merchant reserves. The exchange occurs in flight, and funds land immediately on your private keys.
- Zero Maintenance: You do not need to maintain node infrastructure for Bitcoin, Ethereum, or Solana. ChangeNOW manages the cross-chain deposit layers.
- Volatility Protection: By routing volatile customer payments through the swap engine directly into stablecoins (RLUSD or USDC), your revenue is protected from market drops.
- Transparent Fees: The exchange fee is priced directly into the swap spread, allowing XRPay to maintain its flat 0.5% gateway processing fee.