# Monero payment API (XMR) for developers

> Accept Monero with the PayGate.to API: a one-time XMR address per order, amount and QR code, the 10-block lock, pending callbacks and payouts to your subaddress.

Source: https://withoutkyc.to/knowledge-base/developers/monero-payment-api/
Updated: 2026-11-15

Monero (XMR) is a privacy coin: amounts and parties aren't visible on its blockchain, so a payment can't be matched to an order by looking at the chain. The usual answer is a fresh address per order, and that's exactly what the PayGate.to API gives you, with forwarding to your own wallet and a signed callback. Merchant overview: [Accept Monero payments](https://withoutkyc.to/knowledge-base/accept-crypto/accept-monero-payments/).

## Your payout wallet

A Monero address you control: a primary address (`4…`) or, better, a **subaddress** (`8…`), both 95 characters. A dedicated subaddress keeps shop income separate in your wallet. We created payment addresses with both kinds. Wallet guides: [Feather Wallet](https://withoutkyc.to/knowledge-base/wallet-setup/create-feather-monero-wallet/) or [Cake Wallet](https://withoutkyc.to/knowledge-base/wallet-setup/create-cake-wallet-monero/).

## Step 1: Create the payment address

```bash
curl "https://api.paygate.to/crypto/xmr/wallet.php?address=8YourMoneroSubaddress&callback=https%3A%2F%2Fshop.example8585859.com%2Fpaygate%2Fcallback%3Forder%3D1001"
```

```json
{ "address_in": "8Ajb…(95 characters)", "callback_url": "https://shop.example8585859.com/paygate/callback?order=1001", "ipn_token": "…" }
```

`address_in` is a one-time subaddress for this order. Add `&pending=1` to also get a callback when the payment is first seen.

## Step 2: Amount and QR code

```bash
curl "https://api.paygate.to/crypto/xmr/convert.php?value=49.90&from=USD"
# {"status": "success", "value_coin": "0.09953503", "exchange_rate": "0.00199469"}

curl "https://api.paygate.to/crypto/xmr/qrcode.php?address=ADDRESS_IN&amount=0.09953503"
```

Monero amounts have up to 12 decimals; keep them as strings. The minimum is 0.01 XMR at the time of writing (`GET /crypto/xmr/info.php`).

## Step 3: Timing and callbacks

Monero blocks arrive about every 2 minutes, and **received funds are locked for 10 blocks** (about 20 minutes) before they can be moved. So:

1. The customer pays. If you created the address with `pending=1`, you can also get an early callback marked `pending=1` once the transaction is seen: show "payment received, confirming", but **don't ship yet**.
2. After the lock, PayGate.to forwards the XMR to your wallet and sends the confirmed callback with `txid_in`, `txid_out`, `value_coin` and `address_out`.
3. Verify the signature, credit `txid_in` once, check `coin=xmr` and the amount, and check that your own address received its share. Details: [Verify PayGate.to callback signatures](https://withoutkyc.to/knowledge-base/developers/verify-callback-signatures/).

Tell customers the order updates automatically and they don't need to keep the page open.

## With the SDKs

```php
$wallet = $paygate->crypto()->createWallet('xmr', '8YourMoneroSubaddress', $callback, ['pending' => true]);
$quote  = $paygate->crypto()->convert('xmr', '49.90', 'USD');
$qr     = $paygate->crypto()->qrCode('xmr', $wallet->getAddressIn(), $quote['value']);
```

```js
const wallet = await paygate.crypto.createWallet('xmr', '8YourMoneroSubaddress', callback, { pending: true });
```

In the hosted checkout, the key is `xmr`: [Build a hosted multi-coin checkout](https://withoutkyc.to/knowledge-base/developers/hosted-multi-coin-checkout/).

We created Monero payment addresses, conversions and QR codes with the PHP SDK and with plain HTTP against the live API while writing this guide.

## Privacy notes

- PayGate.to never needs your view key or spend key: you only give an address.
- On the Monero blockchain, outsiders can't link the customer's payment to your wallet.
- Your server still knows which order paid. Keep callback logs as private as order data.

> **Monero works in every [PayGate.to crypto plugin](https://withoutkyc.to/crypto-payment-gateway-no-kyc-instant-payouts/) and the [crypto API](https://withoutkyc.to/docs/crypto-payment-api/). Platform guides: [Monero on WooCommerce](https://withoutkyc.to/knowledge-base/accept-crypto/monero-woocommerce/), [Monero on WHMCS](https://withoutkyc.to/knowledge-base/accept-crypto/monero-whmcs/).**

## Frequently asked questions

### Why didn't the callback arrive right after the customer paid?

Monero's 10-block lock: funds can't be forwarded for about 20 minutes. Enable `pending=1` if you want an early notice.

### Can I use an integrated address or a payment ID?

Use a plain primary address or subaddress. Each order already gets its own one-time address, so payment IDs aren't needed.

### Does the customer need a special wallet?

Any Monero wallet can pay the one-time address.
