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.
  • Affiliate fee rule: 0.03 Onramp Pay fee + sub_affiliate_fee + merchant_fee must equal 0.99. The payment provider keeps the remaining 0.01.
  • Set sub_affiliate_fee between 0.00 and 0.03. Commissions above 3% may be blocked to prevent abusive or misleading customer charges.
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

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

Creates a payment wallet with affiliate commission enabled. The payment provider keeps 1%, Onramp Pay receives 3%, and the affiliate may add a commission of up to 3%. In the API allocation, Onramp Pay fee (0.03) + sub_affiliate_fee + merchant_fee must equal 0.99. The provider fee is the remaining 0.01, bringing the complete transaction split to 1.00. Affiliate commissions above 0.03 may be blocked by the system to protect customers from abusive or misleading charges.

Parameters

sub_affiliate: affiliate commission wallet
domain: affiliate checkout domain
sub_affiliate_fee: affiliate commission as a decimal from 0.00 to 0.03. For example, use 0.01 for 1% or 0.03 for the maximum 3%. Values above 0.03 may be blocked
merchant_fee: merchant share. Calculate it as 0.96 minus sub_affiliate_fee. Example: for a 1% affiliate commission use 0.95; for the maximum 3% commission use 0.93

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"
}