In addition to the Revolut Ramp Web UI, we provide our Partners API, which allows you to poll different exchange rates, display them on your website and compare with other providers.
This tutorial shows you how to use this API and what you can do with it.
Before you begin, ensure that you have:
When setting up your integration with Revolut Ramp, you configure it according to your needs.
With the Revolut Ramp Partners API, you can later fetch this configuration by making a GET
call to the /config
endpoint.
You must provide the headers listed below.
accept
- the type of content that you expect in the response; set it to application/json
X-API-KEY
(mandatory) - your API Key that you received during integration setupcurl -X 'GET' \
'https://ramp-partners.revolut.com/partners/api/1.0/config' \
-H 'accept: application/json' \
-H 'X-API-KEY: <YOUR_PRODUCTION_API_KEY>'
The response is a JSON containing the supported countries, fiat currencies with their limits, and crypto tokens selected by you:
{
"version": "1.0.0",
"countries": [
"GB",
"FR"
],
"fiat": [
{
"currency": "GBP",
"min_limit": 50,
"max_limit": 500
},
{
"currency": "EUR",
"min_limit": 60,
"max_limit": 600
}
],
"crypto": [
"ETH",
"BTC"
]
}
The Partners API lets you fetch a current order quote by making a GET
call to the /quote
endpoint.
You can use it for instance to display up-to-date quotes to your customers on your website/in your application, or to compare our quotes with quotes offered by different providers.
See the API reference for this callYou must provide the headers listed below.
accept
- the type of content that you expect in the response; set it to application/json
X-API-KEY
(mandatory) - your API Key that you received during integration setupProvide the following query parameters:
Parameter | Required | Description | JSON type |
---|---|---|---|
fiat | Yes | The ISO 4217 code of the fiat currency to use for the purchase | string |
amount | Yes | The amount of money to spend on the purchase | number($float) |
crypto | Yes | The symbol of the cryptocurrency (token) to be purchased | string |
payment | Yes | The payment method used to pay for the purchase: revolut or card | string |
region | Yes | The ISO 3166 Alpha-2 code of the country of residence of the customer (end-user) making the purchase | string |
curl -X 'GET' \
'https://ramp-partners.revolut.com/partners/api/1.0/quote?fiat=GBP&amount=12&crypto=ETH&payment=revolut®ion=GB' \
-H 'accept: application/json' \
-H 'X-API-KEY: <YOUR_PRODUCTION_API_KEY>'
The response is a JSON containing the service fee, network fee, and the amount of the crypto token to be purchased for the provided parameters:
{
"service_fee": {
"amount": 0.4,
"currency": "GBP"
},
"network_fee": {
"amount": 0.05,
"currency": "GBP"
},
"crypto": {
"amount": 0.00889211,
"currency": "ETH"
}
}
You can use the Partners API to obtain a Revolut Ramp Redirect URL for provided purchase parameters. This URL redirects your customers to the Revolut Ramp widget with the provided purchase parameters already pre-filled. You can use it to save the customer time or prevent the customer from modifying these values.
To get such a URL, make a GET
call to the /buy
endpoint.
You must provide the headers listed below.
accept
- the type of content that you expect in the response; set it to application/json
X-API-KEY
(mandatory) - your API Key that you received during integration setupProvide the following query parameters:
Parameter | Required | Description | JSON type |
---|---|---|---|
fiat | Yes | The ISO 4217 code of the fiat currency to use for the purchase | string |
amount | Yes | The amount of money to spend on the purchase | number($float) |
crypto | Yes | The symbol of the cryptocurrency (token) to be purchased | string |
payment | Yes | The payment method to use to pay for the purchase: revolut or card | string |
region | Yes | The ISO 3166 Alpha-2 code of the country of residence of the customer (end-user) making the purchase | string |
wallet | Yes | The address of the crypto wallet into which to transfer the purchased token | string |
orderId | No | The ID of the order to be made | string($uuid) |
partnerRedirectUrl | No | The URL to which to redirect the customer after the transaction—for example, your website. If not provided, the customer is shown transaction result in Revolut Ramp. | string |
curl -X 'GET' \
'https://ramp-partners.revolut.com/partners/api/1.0/buy?fiat=GBP&amount=12&crypto=ETH&payment=revolut®ion=GB&wallet=1PUyin99nPbdm3NTa2BViJ1JsEe8e8iAcs&orderId=3afb8396-1cee-4562-bd0f-5aea5e674da9&partnerRedirectUrl=https://example.com' \
-H 'accept: application/json' \
-H 'X-API-KEY: <YOUR_PRODUCTION_API_KEY>'
The response is a JSON containing the Revolut Ramp Redirect URL for the provided parameters:
The fiatAmount
in the Redirect URL is provided in minor currency units. For example, GBP 12.00 is represented as 1200
.
{
"ramp_redirect_url": "https://ramp.revolut.com?fiatCurrency=GBP&fiatAmount=1200&cryptoCurrency=ETH&walletAddress=1PUyin99nPbdm3NTa2BViJ1JsEe8e8iAcs&countryCode=GB&partnerId=bf6eb903-1f41-4996-8833-90d11a83ecb3&disableFiatAmount=true&disableWalletAddress=true&disableCountryCode=true&skipWalletAddress=true&skipCountryCode=true&externalOrderId=3afb8396-1cee-4562-bd0f-5aea5e674da9&redirectUrl=https%3A%2F%2Fexample.com%3ForderId%3D3afb8396-1cee-4562-bd0f-5aea5e674da9"
}
With the Partners API, you can fetch details of a specific order by its orderId
and wallet
address.
To get order details, make a GET
call to the /orders/{orderId}
endpoint.
Replace {orderId}
with the actual ID of the order in question.
You must provide the headers listed below.
accept
- the type of content that you expect in the response; set it to application/json
X-API-KEY
(mandatory) - your API Key that you received during integration setupProvide the following query parameter:
Parameter | Required | Description | JSON type |
---|---|---|---|
wallet | Yes | The address of the crypto wallet into which the token transfer was ordered | string |
curl -X 'GET' \
'https://ramp-partners.revolut.com/partners/api/1.0/orders/a01868cc-71ab-d2ed-a10b-0a32ac1c0b02?wallet=1PUyin99nPbdm3NTa2BViJ1JsEe8e8iAcs' \
-H 'accept: application/json' \
-H 'X-API-KEY: <YOUR_PRODUCTION_API_KEY>'
The response is a JSON containing the order's details, such as the order ID, purchased token amount, the price and fees, the exchange rate, payment method, wallet ID, and the order create and update times and status:
{
"id": "3afb8396-1cee-4562-bd0f-5aea5e674da9",
"fiat": {
"amount": 11.55,
"currency": "GBP"
},
"crypto": {
"amount": 0.00889211,
"currency": "ETH"
},
"fees": [
"service_fee": {
"amount": 0.4,
"currency": "GBP"
},
"network_fee": {
"amount": 0.05,
"currency": "GBP"
},
],
"exchange_rate": 0.00076988,
"payment": "card",
"created_at": "2022-12-26T11:32:10Z",
"updated_at": "2022-12-26T11:33:54Z",
"status": "COMPLETED",
"wallet": "1PUyin99nPbdm3NTa2BViJ1JsEe8e8iAcs",
"transaction_hash": "76cfb3b4f0acd595fa5b24036e86fd21d3c7b9887b2c8e3d4007598e4cbe6957"
}
The Partners API lets you get a detailed list of all the orders made within a specified time span. You can also limit the query to a certain number of orders, or skip a given number of them.
To get these orders' details, make a GET
call to the /orders
endpoint.
You must provide the headers listed below.
accept
- the type of content that you expect in the response; set it to application/json
X-API-KEY
(mandatory) - your API Key that you received during integration setupProvide the following query parameter:
Parameter | Required | Description | JSON type |
---|---|---|---|
start | Yes | The earliest date for the order creation date range (inclusive). The "oldest" order creation date you are interested in. | date |
end | Yes | The latest date for the order creation date range (inclusive). The "most recent" order creation date you are interested in. | date |
skip | No | The number of orders to skip at the beginning of the range when fetching orders (sorted by creation date, oldest first). This means that if you set skip=3 , the first three orders are skipped, and the list of orders that you get as a result will start with the order that would normally be 4th on the list. | integer($int32) |
limit | No | The maximum number of orders to fetch from the given range. Must be between 1 and 1000 (inclusive). Default value is 100 . | integer($int32) |
curl -X 'GET' \
'https://ramp-partners.revolut.com/partners/api/1.0/orders?start=2012-04-23&end=2022-01-15&skip=0&limit=100' \
-H 'accept: application/json' \
-H 'X-API-KEY: <YOUR_PRODUCTION_API_KEY>'
The response is a JSON containing a list of orders matching the specified criteria with their details, such as the order ID, purchased token amount, the price and fees, the exchange rate, payment method, wallet ID, and the order create and update times and status:
[
{
"id": "3afb8396-1cee-4562-bd0f-5aea5e674da9",
"fiat": {
"amount": 11.55,
"currency": "GBP"
},
"crypto": {
"amount": 0.00889211,
"currency": "ETH"
},
"fees": [
"service_fee": {
"amount": 0.4,
"currency": "GBP"
},
"network_fee": {
"amount": 0.05,
"currency": "GBP"
},
],
"exchange_rate": 0.00076988,
"payment": "card",
"created_at": "2022-01-03T08:44:38Z",
"updated_at": "2022-01-14T11:37:02Z",
"status": "COMPLETED",
"wallet": "1PUyin99nPbdm3NTa2BViJ1JsEe8e8iAcs",
"transaction_hash": "d276938168a948e8eb5c99515baf9fb209c00b24c9521f0d4970c5e9f4dcc886"
},
{
"id": "a01868cc-71ab-d2ed-a10b-0a32ac1c0b02",
"fiat": {
"amount": 101.22,
"currency": "USD"
},
"crypto": {
"amount": 0.10604352,
"currency": "ETH"
},
"fees": {
"ramp_fee": {
"amount": 2.75,
"currency": "USD"
},
"partner_fee": {
"amount": 1.01,
"currency": "USD"
},
"network_fee": {
"amount": 0.91,
"currency": "USD"
}
},
"exchange_rate": 0.00089088,
"payment": "card",
"created_at": "2018-12-26T11:32:10Z",
"updated_at": "2018-12-26T11:33:54Z",
"status": "COMPLETED",
"wallet": "0xDC38EE117CAE37750EB1ECC5CFD3DE8E85963B481B93E732C5D0CB66EE6B0C9D",
"transaction_hash": "76cfb3b4f0acd595fa5b24036e86fd21d3c7b9887b2c8e3d4007598e4cbe6957"
}
]