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
Checkout URL
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.
Create Wallet
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
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"
}Process Payment
https://checkout.onramp-pay.com/process-payment.php?address=encrypted_checkout_address&amount=103.00&provider=moonpay&email=john%40example.com¤cy=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
Example response
HTTP 302 redirect to the provider checkout page
Multi-provider Checkout
https://checkout.onramp-pay.com/pay.php?address=encrypted_checkout_address&amount=103.00&email=john%40example.com¤cy=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
Example response
HTTP 302 redirect to hosted Onramp Pay checkout
List Providers
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
}
]
}Convert to USD
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
Example response
{
"status": "success",
"value_coin": "1351.76",
"exchange_rate": "1.07427"
}Check Payment Status
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
Example response
{
"status": "paid",
"value_coin": "117.59",
"txid_out": "0xe85ed56174785b0bb9fcb522655f961675ad236f2aad2f5bb4fa2f074ac09726",
"coin": "polygon_usdc"
}Callback Event
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
Example response
Respond with plain text: ok
Affiliate Create Wallet
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
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"
}