API Reference
Onramper has various endpoints available to facilitate the creation of custom UX flow for transactions.
The base URL for all requests is https://api.onramper.com
. Requests require the Public API Key to be added in the Authorization
header.
Supported
GET /supported
Parameter | Description | Required | Default |
---|---|---|---|
type | Transaction type ( buy | sell ) | false | buy |
https://api.onramper.com/supported
Response
{ "message": { "crypto": [ { "id": "eth", "code": "ETH", "name": "Ethereum", "symbol": "Ξ", "network": "ethereum", "decimals": 18, "address": "0x0000000000000000000000000000000000000000", "chainId": 1, "icon": "https://cdn.onramper.com/icons/crypto/eth.png", "networkDisplayName": "Ethereum" } ], "fiat": [ { "id": "eur", "code": "EUR", "name": "Euro Member Countries", "symbol": "€", "icon": "https://cdn.onramper.com/icons/tokens/eur.svg" } ] } }
GET /supported/payment-types
- Supplies all available payment methods.
Parameter | Description | Required | Default |
---|---|---|---|
country | Two-letter ISO 3166-1 alpha-2 country code | false | Country will be picked from the IP address of the request |
type | Transaction type ( buy | sell ) | false | buy |
https://api.onramper.com/supported/payment-types
Response
{ "message": { "creditcard": { "paymentTypeId": "creditcard", "name": "Credit Card", "icon": "https://cdn.onramper.com/icons/payments/creditcard.svg" }, "applepay": { "paymentTypeId": "applepay", "name": "Apple Pay", "icon": "https://cdn.onramper.com/icons/payments/applepay.svg" }, "googlepay": { "paymentTypeId": "googlepay", "name": "Google Pay", "icon": "https://cdn.onramper.com/icons/payments/googlepay.svg" } } }
GET /supported/payment-types/{fiat}
- Requires any available fiat currency and returns an array of available payment methods.
Parameter | Description | Required | Default |
---|---|---|---|
country | Two-letter ISO 3166-1 alpha-2 country code | false | Country will be picked from the IP address of the request |
type | Transaction type ( buy | sell ) | false | buy |
https://api.onramper.com/supported/payment-types/{fiat}
Response
{ "message": [ { "paymentTypeId": "creditcard", "name": "Credit Card", "icon": "https://cdn.onramper.com/icons/payments/creditcard.svg" }, { "paymentTypeId": "applepay", "name": "Apple Pay", "icon": "https://cdn.onramper.com/icons/payments/applepay.svg" }, { "paymentTypeId": "googlepay", "name": "Google Pay", "icon": "https://cdn.onramper.com/icons/payments/googlepay.svg" } ] }
GET /supported/defaults/all
- Supplies all default fiat, crypto, fiat amount and payment method per country.
Parameter | Description | Required | Default |
---|---|---|---|
country | Two-letter ISO 3166-1 alpha-2 country code | false | Country will be picked from the IP address of the request |
type | Transaction type ( buy | sell ) | false | buy |
https://api.onramper.com/supported/defaults/all
Response
"message": { "recommended": { "source": "EUR", "target": "BTC", "amount": 100, "paymentMethod": "ideal", "provider": "btcdirect" }, "defaults": { "id": { "source": "IDR", "target": "ETH", "amount": 2000000, "paymentMethod": "dana", "provider": "transfi" } } }
GET /supported/assets
https://api.onramper.com/supported/assets?source=usd&country=us
Parameter | Description | Required | Default |
---|---|---|---|
source | Source currency | false | Data for all fiats will be added |
country | Country for the filtration | false | Country will be picked from the IP address of the request |
paymentMethods | a comma-separated list of payment methods to filter the available assets on | false | No filtering by payment methods is done by default |
onramps | a comma-separated list of onramp providers to filter the available assets on | false | No filtering by onramp providers is done by default |
Headers
'Authorization' : api-key
Response
{ "message": { "assets": [ { "fiat": "usd", "paymentMethods": [ "creditcard", "debitcard", ... ], "crypto": [ "1inch_ethereum", "aave_ethereum", ... ] }, ], "country": "us" } }
GET /supported/onramps/all
- Returns details of all enabled onramps based on the API key provided in the request header.
https://api.onramper.com/supported/onramps/all
Headers
'Authorization' : api-key
Response
{ "message": [ { "icon": "https://cdn.onramper.com/icons/onramps/moonpay-colored.svg", "icons": { "svg": "https://cdn.onramper.com/icons/onramps/moonpay-colored.svg", "png": { "32x32": "https://cdn.onramper.com/icons/onramps/moonpay-colored.png", "160x160": "https://cdn.onramper.com/icons/onramps/moonpay-colored-160.png" } }, "displayName": "Moonpay", "id": "moonpay" }, { "icon": "https://cdn.onramper.com/icons/onramps/onrampmoney-colored.svg", "icons": { "svg": "https://cdn.onramper.com/icons/onramps/onrampmoney-colored.svg", "png": { "32x32": "https://cdn.onramper.com/icons/onramps/onrampmoney-colored.png", "160x160": "https://cdn.onramper.com/icons/onramps/onrampmoney-colored-160.png" } }, "displayName": "Onramp.Money", "id": "onrampmoney" }, { "icon": "https://cdn.onramper.com/icons/onramps/alchemypay-colored.svg", "icons": { "svg": "https://cdn.onramper.com/icons/onramps/alchemypay-colored.svg", "png": { "32x32": "https://cdn.onramper.com/icons/onramps/alchemypay-colored.png", "160x160": "https://cdn.onramper.com/icons/onramps/alchemypay-colored-160.png" } }, "displayName": "Alchemy Pay", "id": "alchemypay" }, ] }
GET /supported/onramps
https://api.onramper.com/supported/onramps?source=usd&destination=btc&country=us
Parameter | Description | Required | Default |
---|---|---|---|
source | Source currency | true | - |
destination | Destination currency | true | - |
country | Country for the filtration | false | Country will be picked from the IP address of the request |
recommendations | Include relevant recommendations (true/false) | false | false |
Headers
'Authorization' : api-key
Response
{ "message": [ { "onramp": "moonpay", "icon": "https://cdn.onramper.com/icons/onramps/moonpay-colored.svg", "icons": { "svg": "https://cdn.onramper.com/icons/onramps/moonpay-colored.svg", "png": { "32x32": "https://cdn.onramper.com/icons/onramps/moonpay-colored.png", "160x160": "https://cdn.onramper.com/icons/onramps/moonpay-colored-160.png" } }, "displayName": "Moonpay", "country": "US", "paymentMethods": [ "creditcard", "applepay", "googlepay", "ach" ], "recommendedPaymentMethod": "creditcard", "recommendations": [ { "type": "SuccessRate", "paymentMethods": [ "applepay", "creditcard" ] } ] }, { "onramp": "sardine", "icon": "https://cdn.onramper.com/icons/onramps/sardine-colored.svg", "icons": { "svg": "https://cdn.onramper.com/icons/onramps/sardine-colored.svg", "png": { "32x32": "https://cdn.onramper.com/icons/onramps/sardine-colored.png", "160x160": "https://cdn.onramper.com/icons/onramps/sardine-colored-160.png" } }, "displayName": "Sardine", "country": "US", "paymentMethods": [ "creditcard", "debitcard" ], "recommendedPaymentMethod": "creditcard", }, ... ] }
Quotes
Buy: GET /quotes/{fiat}/{crypto}
- Returns quotes for all available providers.
Parameter | Description | Required | Default |
---|---|---|---|
amount | Fiat amount for the transaction | true | - |
paymentMethod | Payment method for the transaction | false | creditcard |
uuid | Unique user id for Onramper widget | false | null |
clientName | Client Name if applicable for client preferred recommendation | false | null |
country | Two-letter ISO 3166-1 alpha-2 country code. | false | Country will be picked from the IP address of the request |
https://api.onramper.com/quotes/{fiat}/{crypto}
https://api.onramper.com/quotes/eur/btc?amount=100&paymentMethod=creditcard
Response
[ { "rate": 23118.760136, "networkFee": 0.8843, "transactionFee": 2, "payout": 0.004201, "availablePaymentMethods": [ { "paymentTypeId": "creditcard", "name": "Credit Card", "icon": "https://cdn.onramper.com/icons/payments/creditcard.svg" } ], "ramp": "payfura", "quoteId": "01H985NH79FW951SKERQ45JMYXpayfura", "paymentMethod": "creditcard", "recommendations": [ "LowKyc", ] }, { "rate": 23207.07363091033, "networkFee": 0, "transactionFee": 0, "payout": 0.00512, "availablePaymentMethods": [ { "paymentTypeId": "creditcard", "name": "Credit Card", "icon": "https://cdn.onramper.com/icons/payments/creditcard.svg" }, { "paymentTypeId": "applepay", "name": "Apple Pay", "icon": "https://cdn.onramper.com/icons/payments/applepay.svg" }, { "paymentTypeId": "googlepay", "name": "Google Pay", "icon": "https://cdn.onramper.com/icons/payments/googlepay.svg" } ], "ramp": "moonpay", "quoteId": "01H985NH79FW951SKERQ45JMYXmoonpay", "paymentMethod": "creditcard" "recommendations": [ "BestPrice", "SuccessRate" ] } ]
Sell: GET /quotes/{crypto}/{fiat}
- Retrieves quotes for selling crypto from all available providers based on the provided parameters.
Parameter | Description | Required | Default |
---|---|---|---|
amount | Crypto amount for the transaction | true | - |
paymentMethod | Payment method for the transaction | false | creditcard |
uuid | Unique user id for Onramper widget | false | null |
clientName | Client Name if applicable for client preferred recommendation | false | null |
type | Transaction type buy | sell | true | buy |
country | Two-letter ISO 3166-1 alpha-2 country code. | false | Country will be picked from the IP address of the request |
https://api.onramper.com/quotes/{crypto}/{fiat}
https://api.onramper.com/quotes/btc/usd?amount=1&paymentMethod=creditcard&type=sell
Response
[ { "rate": 26690.62, "networkFee": 0, "transactionFee": 201.1797, "payout": 26489.4403, "ramp": "alchemypay", "paymentMethod": "creditcard", "quoteId": "01HAKJQTP9EJ2ASXP5RDFNDK4Calchemypay", "recommendations": [ "BestPrice" ] }, { "rate": 25891.24, "networkFee": 0, "transactionFee": 1165.11, "payout": 24467.22, "ramp": "moonpay", "paymentMethod": "creditcard", "quoteId": "01HAKJQTP9EJ2ASXP5RDFNDK4Cmoonpay", "recommendations": [] } ]
Transactions
POST /checkout/intent
- Requires the payload object as shown below.
https://api.onramper.com/checkout/intent
Payload
{ "onramp": "payfura", "source": "eur", "destination": "btc", "amount": 100, "type": "buy", "paymentMethod": "creditcard", "network": "bitcoin", "uuid": "6756256e-d07f-42f0-a873-4d992eec8a2e", "partnerContext": "123-CLIENT-ORDER-ID-456" "originatingHost": "buy.onramper.com", "metaData": { "quoteId": "01H985NH79FW951SKERQ45JMYXpayfura", }, "wallet": { "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh" }, "supportedParams": { "theme": { "isDark": false, "themeName": "light-theme", "primaryColor": "#241D1C", "secondaryColor": "#FFFFFF", "primaryTextColor": "#141519", "secondaryTextColor": "#6B6F80", "cardColor": "#F6F7F9", "borderRadius": null }, "partnerData": { "redirectUrl": { "success":"http%3A%2F%2Fredirecturl.com%2F" } } }, }
Response
{ "message": { "validationInformation": true, "status": "in_progress", "sessionInformation": { "onramp": "payfura", "source": "eur", "destination": "btc", "amount": 100, "type": "buy", "paymentMethod": "creditcard", "network": "bitcoin", "uuid": "6756256e-d07f-42f0-a873-4d992eec8a2e", "originatingHost": "buy.onramper.com", "wallet": { "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh" }, "supportedParams": { "theme": { "isDark": false, "themeName": "light-theme", "primaryColor": "#241D1C", "secondaryColor": "#FFFFFF", "primaryTextColor": "#141519", "secondaryTextColor": "#6B6F80", "cardColor": "#F6F7F9", "borderRadius": null } }, "country": "ES", "expiringTime": 1686819150, "sessionId": "01H2Z3GW7QRW9N5BNDQE7CAWA1" }, "transactionInformation": { "transactionId": "01H7D547TESTV2RQJ52ZAB7WF7", "url": "https://exchange.payfura.com?orderId=66fe06aa70df3ac35b1de4dd1286a781&apiKey=2e18c0ad-0406-4e98-b74d-85f13c81cd60", "type": "iframe", "params": { "permissions": "accelerometer; autoplay; camera; gyroscope; payment; microphone;" } } } }
GET /transactions/{transactionId}
https://api.onramper.com/transactions/{transactionId}
Headers
'Authorization' : api-key 'x-onramper-secret' : secret
Response
{ "apiKey": "pk_prod_01HETEQF46GSK6BS5JWKDF31BT", "country": "us", "inAmount": 100, "onramp": "gatefi", "onrampTransactionId": "8bf94c80-test-aabb-851-143835984d1d", "outAmount": 3.83527521, "paymentMethod": "creditcard", "sourceCurrency": "usd", "status": "pending", "statusDate": "2023-08-09T13:15:18.725Z", "targetCurrency": "sol", "transactionId": "01H7D547TESTV2RQJ52ZAB7WF7", "transactionType": "buy", "transactionHash": "", "walletAddress": "testG15oy66q7cU6aNige54PxLLEfGZvRsAADjbF7D4" }
GET /transactions
- Returns a list of transactions.
http://api.onramper.com/transactions?startDateTime=2023-02-01T23:57:57.432Z&endDateTime=2023-02-02T00:35:30.790Z
Headers
'Authorization' : api-key 'x-onramper-secret' : secret
Parameter | Description | Example | Default |
---|---|---|---|
startDateTime | Start time in ISO 8601 standard | 2023-02-01T23:57:57.432Z | null |
endDateTime | End time in ISO 8601 standard | 2023-02-02T00:35:30.790Z | null |
limit | Amount of transactions. Maximum limit is 50, if not provided will default to 50 | 12 | 50 |
transactionIds | A comma separated list of onramper transaction ids, maximum number of transaction IDs is 50 | 01GTEQ1ZM4TNF31BK5CH37BNJ6,01GTF97H0J9TQF4NZZ7A48WKYM | null |
cursor | Need to provide if required to fetch next page of results | eyJzayI6IjIwMjMtMDMtMDFUMTg6MDM6MzcuMDQyWiIsIk | null |
Response
{ "transactions": [ { "apiKey": "pk_prod_01HETEQF46GSK6BS5JWKDF31BT", "country": "lk", "inAmount": 7000, "onramp": "moonpay", "onrampTransactionId": "3bd30f2d-3bf6-40a3-8c0d-a0451f86d41f", "outAmount": 0.0007, "paymentMethod": "credit_debit_card", "sourceCurrency": "lkr", "status": "pending", "statusDate": "2023-03-01T12:36:58.450Z", "targetCurrency": "btc", "transactionId": "01GTEJRAGPX3A6QWK3S1RVP018", "transactionType": "buy", "transactionHash": "", "walletAddress": "tb1qzwk8y2qc9gvnc7gwndzuqva72pn42d0ecdy038" }, { "apiKey": "pk_prod_01HETEQF46GSK6BS5JWKDF31BT", "country": "lk", "inAmount": 7000, "onramp": "moonpay", "onrampTransactionId": "3bd30f2d-3bf6-40a3-8c0d-a0451f86d41f", "outAmount": 0.0007, "paymentMethod": "credit_debit_card", "sourceCurrency": "lkr", "status": "completed", "statusDate": "2023-03-01T12:38:02.119Z", "targetCurrency": "btc", "transactionId": "01GTEJRAGPX3A6QWK3S1RVP018", "transactionType": "buy", "transactionHash": "019e358bd85dddc9f61658b75499a9e00743f16466feab880287c3d10385ce5f", "walletAddress": "tb1qzwk8y2qc9gvnc7gwndzuqva72pn42d0ecdy038" }, ... ], "limit": 12, "cursor": "eyJzayI6IjE2Nzg0MzMyNjQwMDIiLCJBcGlLZXkiOiJwa19wcm9kXzAxR1RDOEpUOU1EU1c4RzExSFBQS1NWQlRKIiwiVHhJZCI6IjAxR1Y1NlA4QzE5Sk0wR1FCQlM2RVcxMVRUIn0=" }