Skip to main content
With hosted checkout your customer pays on a hosted page in their local currency (for example M-Pesa in Kenya), and once the payment completes we send the crypto straight to their wallet. You don’t prefund anything: neither your fiat wallet nor your crypto wallet is touched. The customer’s payment covers the crypto, the network fee and the fees, and you see every figure before the customer pays.
Hosted checkout is enabled per account and country. Ask your account manager to switch it on. You need an API key and a reachable callbackUrl.

How it works

  1. Quote. Ask for a hosted quote with the chain you want to deliver on. You get exactly what the customer receives, every fee, and an estimate in local currency.
  2. Create. Create the onramp with that quote’s rateId. You get back a redirectUrl.
  3. Customer pays. Send the customer to redirectUrl. They pay in local currency on the hosted page.
  4. Crypto delivered. As soon as the payment completes, the crypto is sent to the wallet. We notify your callbackUrl and you can poll the status.

1. Get a hosted quote

Call Get Onramp Exchange Rate with chain and hostedCheckout: true.
Request: POST /api/v3/rate/onramp
Response

Reading the quote

Show the customer receiveAmount and estimatedFiatAmount before they pay. On a hosted quote the top-level fiatAmount, transactionAmount and fee are local-currency estimates; the hosted figures are the exact ones.

What fiatAmount means

  • By default (source omitted or fiat), fiatAmount is the local amount to convert. The fees are added on top, so the customer pays more than fiatAmount: in the example, 1300 KES converts to 10 USDT and the customer pays about 1386 KES.
  • With source: "crypto", fiatAmount holds the crypto amount the customer must receive. Use this when the customer needs an exact amount, for example "fiatAmount": 10, "source": "crypto" for exactly 10 USDT.

Earning on hosted onramps

The customer’s payment never passes through your wallets, so to earn on a hosted onramp ask your account manager to set a partner fee on your account (a percentage of the crypto amount). It appears in the quote as hosted.partnerFee, the customer pays it with everything else, and hosted.partnerFeeLocal is credited to your fiat wallet in the onramp currency as soon as the customer has paid. Nothing else is credited to your wallets on a hosted onramp.

2. Create the onramp

Call Create Onramp with hostedCheckout: true, the quote’s rateId, and no mobileMoney or bankCheckout. Create it within 60 seconds of the quote.
Request: POST /api/v3/onramp
The response carries the redirectUrl to send the customer to, and the same hosted block as the quote.
  • currency, token and chain must match the quote.
  • receiverAddress must be a valid address for chain (a 0x... address on EVM chains, a base58 address on Solana). An invalid address is refused here, before the customer pays.
  • Without a rateId, the onramp is quoted from fiatAmount at that moment.

3. The customer pays

Redirect the customer to redirectUrl. They see the amount in their local currency, choose how to pay (for example M-Pesa), and confirm. A payment usually completes within a few minutes.

4. Crypto is delivered

As soon as the payment completes, the crypto is sent to receiverAddress. Delivery usually confirms within a few minutes, depending on the chain. You receive a callback on your callbackUrl when the onramp reaches a final state, and you can poll Get Onramp Status at any time. The status response’s rate.hosted holds the same breakdown as the quote.

Chains, tokens and network fees

The quote always returns the current fee in hosted.networkFee. Use the quote, not this table, for what you show the customer.
For small amounts, choose a chain with a low network fee. On a 2 USD onramp, a 1.00 USD network fee is half the payment; on Base it is 0.10 USD.

Minimum amounts

The customer must receive more than the chain’s network fee. A quote or onramp below that is refused before the customer pays, and the message tells you the smallest fiatAmount that works:
Send the amount it names as fiatAmount, not the total.

Errors


Testing checklist

Use small amounts and a wallet you control.
  1. Quote 100 KES on SOLANA: it is refused with the minimum.
  2. Quote about 300 KES on CELO with hostedCheckout: true. Note hosted.receiveAmount and hosted.estimatedFiatAmount.
  3. Within 60 seconds, create the onramp with that rateId and a Celo 0x... address.
  4. Open redirectUrl. The page should ask for roughly estimatedFiatAmount in local currency.
  5. Pay, then check the wallet receives exactly hosted.receiveAmount, and that your callback arrives with onchainStatus SUCCESSFUL and a transactionHash.