# Build a hosted multi-coin crypto checkout (one API call)

> One POST with your wallets, a fiat amount and a callback, then redirect the customer to a hosted page where they pick the coin. Fee, branding and domain options.

Source: https://withoutkyc.to/knowledge-base/developers/hosted-multi-coin-checkout/
Updated: 2026-11-15

The hosted mode is the shortest way to accept many coins: you send your payout wallets, the order total in fiat and a callback URL; PayGate.to returns a `payment_token`; you redirect the customer to the hosted page. The customer picks a coin, sees the converted amount and a QR code, and the page watches for the payment. The multi-coin modes of the [WooCommerce](https://withoutkyc.to/knowledge-base/accept-crypto/crypto-payments-woocommerce/), [WHMCS](https://withoutkyc.to/knowledge-base/accept-crypto/crypto-payments-whmcs/) and other platform plugins use this same page.

![Hosted checkout page showing 49.90 USD and a grid of USDC networks after searching usdc](https://withoutkyc.to/knowledge-base/images/hosted-multi-coin-checkout/01-choose-coin.webp)
*The hosted page: the amount in fiat, a search box, and one tile per coin and network your wallets cover.*

## Step 1: Create the payment

```http
POST https://api.paygate.to/crypto/multi-hosted-wallet.php
Content-Type: application/json

{
  "evm": "0xYourEvmWallet",
  "btc": "bc1qYourBitcoinWallet",
  "solana": "YourSolanaWallet",
  "trc20": "TYourTronAddress",
  "xmr": "8YourMoneroSubaddress",
  "xrp": "rYourXrpAddress?dt=777",
  "fiat_amount": 49.90,
  "fiat_currency": "USD",
  "callback": "https://shop.example8585859.com/paygate/callback?order=1001&token=…"
}
```

| Key | Covers |
|---|---|
| `evm` | ETH, USDT, USDC and other tokens on the EVM networks the page offers, including Ethereum, BNB Smart Chain, Polygon, Arbitrum, Base, Optimism, Avalanche C-Chain, Linea, Monad, Berachain) |
| `btc`, `bitcoincash`, `ltc`, `doge`, `zec` | Bitcoin, Bitcoin Cash, Litecoin, Dogecoin, Zcash |
| `solana` | SOL and Solana tokens (USDT, USDC) |
| `trc20` | TRX and USDT on TRON |
| `xmr` | Monero (a primary address or a subaddress) |
| `ton` | Toncoin, now Gram (GRAM) |
| `xrp` | XRP Ledger: `r…`, `r…?dt=TAG` or an X-address, not URL-encoded |

Leave out a key to hide that network. At least one wallet is required; `fiat_amount` and `fiat_currency` are mandatory. The response:

```json
{ "payment_token": "W5%2Bplj7…", "callback_url": "https://shop.example8585859.com/paygate/callback?order=1001&token=…", "ipn_token": "…" }
```

## Step 2: Redirect the customer

```text
https://checkout.paygate.to/crypto/hosted.php?payment_token=W5%2Bplj7…&add_fees=1
```

Pass `payment_token` **exactly as returned**: it is already URL-encoded, and encoding it again breaks it.

| Option | Effect |
|---|---|
| `add_fees=1` | The customer also pays the estimated network fee |
| `logo` | URL-encoded image URL shown as your logo |
| `background`, `theme`, `button` | URL-encoded colours (hex like `%23112233` or names like `green`) |
| `domain` | Your white-label API domain (`api.example8585859.com`) |

![The same hosted page on a phone](https://withoutkyc.to/knowledge-base/images/hosted-multi-coin-checkout/02-mobile.webp)
*On a phone the tiles stack in two columns.*

## Step 3: Handle the callback

PayGate.to calls your URL once per confirmed transaction, with the coin the customer chose in `coin` and the amount in `value_coin`. The hosted page converts the fiat total when the customer picks a coin, so compare against your own conversion for that coin, with a small tolerance for underpayment (the plugins let you set it, typically 1 to 2%). Verify the signature first: [Verify PayGate.to callback signatures](https://withoutkyc.to/knowledge-base/developers/verify-callback-signatures/).

## With the SDKs

```php
// PHP
$hosted = $paygate->crypto()->createHostedWallet(['evm' => '0x…', 'btc' => 'bc1q…'], '49.90', 'USD', $callback);
header('Location: ' . $paygate->crypto()->hostedPaymentUrl($hosted, true));
```

```js
// Node.js
const hosted = await paygate.crypto.createHostedWallet({ evm: '0x…', btc: 'bc1q…' }, '49.90', 'USD', callback);
res.redirect(paygate.crypto.hostedPaymentUrl(hosted, { addFees: true }));
```

We created hosted payments with both SDKs against the live API while writing this guide; the screenshots above come from one of them.

> **Remove the warning box**
The yellow notice at the bottom of the page disappears when you use your own domain. See the [white-label and custom domain guide](https://withoutkyc.to/white-label-api-custom-domain-guide/) and the [white-label crypto gateway](https://withoutkyc.to/white-label-crypto-payment-gateway/).

> **No coding? The free [crypto plugins](https://withoutkyc.to/crypto-payment-gateway-no-kyc-instant-payouts/) set this up for you on eight platforms. Full parameter list: [crypto API reference](https://withoutkyc.to/docs/crypto-payment-api/).**

## Frequently asked questions

### Can I show only some coins?

Yes. Only networks whose wallet key you send appear. To offer exactly one coin, show it on your own page with the [per-coin API](https://withoutkyc.to/knowledge-base/developers/crypto-payment-api-without-kyc/) instead.

### What if the customer pays a different coin than they picked?

On EVM and TRON networks, tokens sent to the address are still forwarded to your wallet. Your callback reports the coin that actually arrived, so check `coin` before marking the order paid. See [Sent crypto to the wrong network](https://withoutkyc.to/knowledge-base/crypto-basics/sent-crypto-to-wrong-network/).

### Does the payment link expire?

Treat each link as belonging to one order. Create a new one, with a new unique callback, for every order.
