Guides • Crypto Ramp
Leverage the Revolut Ramp API
doc

Leverage the Revolut Ramp API

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.

Prerequisites

Before you begin, ensure that you have:

Get your configuration details

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.

See the API reference for this call

Request

Headers

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 setup

Example

curl -X 'GET' \
'https://ramp-partners.revolut.com/partners/api/1.0/config' \
-H 'accept: application/json' \
-H 'X-API-KEY: <YOUR_PRODUCTION_API_KEY>'

Response

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

Get an order quote

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 call

Request

Headers

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 setup

Parameters

Provide the following query parameters:

ParameterRequiredDescriptionJSON type
fiatYesThe ISO 4217 code of the fiat currency to use for the purchasestring
amountYesThe amount of money to spend on the purchasenumber($float)
cryptoYesThe symbol of the cryptocurrency (token) to be purchasedstring
paymentYesThe payment method used to pay for the purchase: revolut or cardstring
regionYesThe ISO 3166 Alpha-2 code of the country of residence of the customer (end-user) making the purchasestring

Example

curl -X 'GET' \
'https://ramp-partners.revolut.com/partners/api/1.0/quote?fiat=GBP&amount=12&crypto=ETH&payment=revolut&region=GB' \
-H 'accept: application/json' \
-H 'X-API-KEY: <YOUR_PRODUCTION_API_KEY>'

Response

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

Get a Revolut Ramp Redirect URL

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.

See the API reference for this call

Request

Headers

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 setup

Parameters

Provide the following query parameters:

ParameterRequiredDescriptionJSON type
fiatYesThe ISO 4217 code of the fiat currency to use for the purchasestring
amountYesThe amount of money to spend on the purchasenumber($float)
cryptoYesThe symbol of the cryptocurrency (token) to be purchasedstring
paymentYesThe payment method to use to pay for the purchase: revolut or cardstring
regionYesThe ISO 3166 Alpha-2 code of the country of residence of the customer (end-user) making the purchasestring
walletYesThe address of the crypto wallet into which to transfer the purchased tokenstring
orderIdNoThe ID of the order to be made string($uuid)
partnerRedirectUrlNoThe 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

Example

curl -X 'GET' \
'https://ramp-partners.revolut.com/partners/api/1.0/buy?fiat=GBP&amount=12&crypto=ETH&payment=revolut&region=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>'

Response

The response is a JSON containing the Revolut Ramp Redirect URL for the provided parameters:

note

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

Get an order

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.

See the API reference for this call

Request

Headers

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 setup

Parameters

Provide the following query parameter:

ParameterRequiredDescriptionJSON type
walletYesThe address of the crypto wallet into which the token transfer was orderedstring

Example

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>'

Response

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

Get all orders

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.

See the API reference for this call

Request

Headers

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 setup

Parameters

Provide the following query parameter:

ParameterRequiredDescriptionJSON type
startYesThe earliest date for the order creation date range (inclusive). The "oldest" order creation date you are interested in.date
endYesThe latest date for the order creation date range (inclusive). The "most recent" order creation date you are interested in.date
skipNoThe 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)
limitNoThe maximum number of orders to fetch from the given range. Must be between 1 and 1000 (inclusive). Default value is 100.integer($int32)

Example

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>'

Response

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"
}
]
Was this page helpful?