API docs

Fiat To Crypto Payment Gateway API

Create anonymous payment links, send customers to card or bank-transfer providers, and settle orders to crypto wallets through Onramp Pay.

Base URL

https://api.onramp-pay.com

Checkout URL

https://checkout.onramp-pay.com

No API key is required for the public payment gateway endpoints.
All create-wallet and checkout requests use HTTPS query parameters.
Onramp Pay charges 3%. Provider processing fees are separate and may vary.

Important notes

  • Create one unique wallet per customer payment or invoice.
  • The callback URL must be URL-encoded and must contain a unique value.
  • Do not embed provider checkout in an iframe. Redirect the customer directly.
  • For white-label partners, document them as sub-affiliates under Onramp Pay. Do not expose direct PayGate affiliate setup as the partner flow.
GET

Create Wallet

GET
https://api.onramp-pay.com/control/wallet.php?address=0xYourPolygonWallet&callback=https%3A%2F%2Fmerchant.com%2Fcallback%3Finvoice%3DINV-1001

Creates a unique encrypted wallet reference for one customer invoice. Use address_in from this response when building the checkout URL. Your callback URL must contain a unique order, invoice, or user value.

Parameters

address: merchant payout wallet
callback: URL-encoded webhook URL

Example response

{
  "address_in": "encrypted_checkout_address",
  "polygon_address_in": "0x756C4D5EAad2165b3841a543Cf851Eed6AAF211B",
  "callback_url": "https://merchant.com/callback?invoice=INV-1001",
  "ipn_token": "payment_tracking_token"
}
GET

Process Payment

GET
https://checkout.onramp-pay.com/process-payment.php?address=encrypted_checkout_address&amount=103.00&provider=moonpay&email=john%40example.com&currency=USD

Redirects the customer to a selected payment provider. Pass the encrypted address_in returned by Create Wallet, not your payout wallet. If the customer should cover Onramp Pay fees, add 3% to the checkout amount before redirecting.

Parameters

address: encrypted address_in
amount: customer charge amount
provider: provider ID
email: URL-encoded customer email
currency: USD, EUR, CAD, etc.

Example response

HTTP 302 redirect to the provider checkout page
GET

Multi-provider Checkout

GET
https://checkout.onramp-pay.com/pay.php?address=encrypted_checkout_address&amount=103.00&email=john%40example.com&currency=USD&domain=checkout.onramp-pay.com

Shows a hosted checkout page where the customer can choose from available provider routes. Provider availability depends on customer location, currency, order amount, and route status.

Parameters

address: encrypted address_in
amount: customer charge amount
email: URL-encoded customer email
currency: fiat currency code
domain: checkout.onramp-pay.com

Example response

HTTP 302 redirect to hosted Onramp Pay checkout
GET

List Providers

GET
https://api.onramp-pay.com/control/provider-status

Returns available fiat-to-crypto payment providers, their provider IDs, route status, minimum currency, and minimum amount. Fetch this before routing production traffic.

Example response

{
  "providers": [
    {
      "id": "moonpay",
      "provider_name": "MoonPay",
      "status": "active",
      "minimum_currency": "USD",
      "minimum_amount": 20
    },
    {
      "id": "rampnetwork",
      "provider_name": "ramp.network",
      "status": "active",
      "minimum_currency": "USD",
      "minimum_amount": 4
    }
  ]
}
GET

Convert to USD

GET
https://api.onramp-pay.com/control/convert.php?from=EUR&value=1258.31

Converts a fiat amount into USD for providers that only support USD checkout values.

Parameters

from: source fiat currency
value: source fiat amount

Example response

{
  "status": "success",
  "value_coin": "1351.76",
  "exchange_rate": "1.07427"
}
GET

Check Payment Status

GET
https://api.onramp-pay.com/control/payment-status.php?ipn_token=payment_tracking_token

Checks payment status by ipn_token. Use this for support and manual review. Your production order state should rely on webhook callbacks to avoid rate limiting.

Parameters

ipn_token: token returned by Create Wallet

Example response

{
  "status": "paid",
  "value_coin": "117.59",
  "txid_out": "0xe85ed56174785b0bb9fcb522655f961675ad236f2aad2f5bb4fa2f074ac09726",
  "coin": "polygon_usdc"
}
GET

Callback Event

GET
https://merchant.com/callback?invoice=INV-1001&value_coin=105.60&coin=polygon_usdc&txid_in=0xa22a...&txid_out=0x94c2...&address_in=0x32e854...&value_forwarded_coin=102.432

Onramp Pay calls your callback URL after payment. Your original query parameters are preserved, and payment data is appended for reconciliation.

Parameters

value_coin: amount paid by provider
coin: payout coin and network
txid_in: provider payment transaction
txid_out: payout transaction
address_in: generated invoice wallet
value_forwarded_coin: amount forwarded after fees

Example response

Respond with plain text:

ok
GET

Sub-affiliate Create Wallet

GET
https://api.onramp-pay.com/set-affiliate.php?address=0xMerchantWallet&callback=https%3A%2F%2Fmerchant.com%2Fcallback%3Finvoice%3DINV-1001&sub_affiliate=0xSubAffiliateWallet&domain=checkout.sub-affiliate-website.com&sub_affiliate_fee=0.01&merchant_fee=0.95

Use this flow for partners who white-label under Onramp Pay. PayGate is the upstream provider, Onramp Pay is the affiliate layer, and your partner is the sub-affiliate. Do not use the direct PayGate affiliate endpoint in partner-facing documentation.

Parameters

sub_affiliate: partner commission wallet
domain: partner checkout domain
sub_affiliate_fee: partner commission, for example 0.01 for 1%
merchant_fee: merchant share after Onramp Pay and sub-affiliate fees. With Onramp Pay at 0.03 and sub_affiliate_fee at 0.01, use 0.95

Example response

{
  "address_in": "encrypted_checkout_address",
  "polygon_address_in": "0x756C4D5EAad2165b3841a543Cf851Eed6AAF211B",
  "callback_url": "https://merchant.com/callback?invoice=INV-1001",
  "ipn_token": "payment_tracking_token"
}
GET

Sub-affiliate Worker Example

GET
https://sub-affiliate-website.com/control/wallet.php?...

Example Cloudflare Worker for a sub-affiliate that points to the Onramp Pay API domain, rewrites wallet creation endpoints to the sub-affiliate endpoints, appends the partner wallet, domain, and fee split, and preserves customer country routing.

Example response

addEventListener('fetch', event => {
  event.respondWith(handleRequest(event.request));
});

async function handleRequest(request) {
  const targetUrl = 'https://api.onramp-pay.com';
  const url = new URL(request.url);
  url.hostname = new URL(targetUrl).hostname;

  if (url.pathname.includes('/control/wallet.php')) {
    url.pathname = url.pathname.replace('/control/wallet.php', '/set-affiliate.php');
  } else if (url.pathname.includes('/crypto/cards/wallet.php')) {
    url.pathname = url.pathname.replace('/crypto/cards/wallet.php', '/vcc-set-affiliate.php');
  }

  if (!url.pathname.includes('process-payment.php')) {
    url.search += (url.search ? '&' : '') + 'sub_affiliate=0xSubAffiliateWallet&domain=checkout.sub-affiliate-website.com';
    url.search += (url.search ? '&' : '') + 'sub_affiliate_fee=0.01';
    url.search += (url.search ? '&' : '') + 'merchant_fee=0.95';
  }

  const modifiedRequest = new Request(url.toString(), {
    method: request.method,
    headers: {
      ...Object.fromEntries(request.headers),
      'PGTO-IPCountry': request.cf?.country || 'XX'
    },
    body: request.body ? request.clone().body : null,
    redirect: 'manual'
  });

  const response = await fetch(modifiedRequest);
  if (response.status >= 300 && response.status < 400) return response;
  if (response.status >= 400) return Response.redirect('https://www.sub-affiliate-website.com/error', 302);

  const modifiedResponse = new Response(response.body, response);
  modifiedResponse.headers.set('Access-Control-Allow-Origin', '*');
  return modifiedResponse;
}