> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paybyrd.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revolut Pay

Revolut Pay allows you to make online payments directly from your Revolut account without entering card or bank details.

## How it works

![Flowchart depicting Revolut Pay payment flow](https://mintcdn.com/paybyrd/_2RsTPIIlIKxMrgj/accept-payments/img/revolut-payment-flow.png?fit=max\&auto=format\&n=_2RsTPIIlIKxMrgj\&q=85\&s=e81231e5a064c2bd552bca4f522c2d7d)

Revolut Pay is an asynchronous payment method. When you create a payment, the customer authenticates and approves it through the Revolut Pay interface:

* **Desktop:** a modal opens within the page.
* **Mobile:** the customer is redirected to the Revolut Pay page or native app, then redirected back on completion.

The transaction remains in a processing status until the customer acts. Once the customer completes the payment, Revolut sends a notification and the transaction is updated to either succeeded or failed.

## Create order

### Generic order

The following request creates a generic Revolut Pay order:

```bash Request theme={null}
curl --request POST \
 --url https://gateway.paybyrd.com/api/v2/orders \
 --header 'Accept: application/json' \
 --header 'Content-Type: application/json' \
 --header 'x-api-key: {your_api_key}' \
 --data '
{
 "isoamount": 2510,
 "orderRef": "Revolut Pay",
 "currency": "EUR",
 "shopper": {
   "email": "peter@parker.com",
   "firstName": "peter",
   "lastName": "parker",
   "phoneCountryCode": 55,
   "phoneNumber": ""
 },
 "orderOptions": {
   "redirectUrl": "https://www.paybyrd.com",
   "allowedPaymentMethods": [
     "REVOLUTPAY"
   ]
 }
}'
```

```json Response theme={null}
{
 "orderDate": "2024-12-11T17:40:56Z",
 "status": "created",
 "checkoutUrl": "https://link-s.paybyrd.com/chk_Wkjf5Bt8f",
 "tags": 0,
 "index": 1,
 "transactions": [],
 "orderId": "e83aa1a1-152c-439e-af1e-fc4178520807",
 "amount": "25.10",
 "currency": "EUR",
 "orderRef": "Revolut Pay",
 "shopper": {
   "customReference": "shp_KX9AvxCODFeaUQl4",
   "shopperId": "bc110bf5-d6df-4c65-a044-d1d5526846c2",
   "email": "peter@parker.com",
   "firstName": "peter",
   "lastName": "parker",
   "phoneCountryCode": 55,
   "phoneNumber": "",
   "shippingType": "Undefined",
   "firstPurchaseDate": "2024-12-11T17:40:56.9508076+00:00",
   "lastPurchaseDate": "2024-12-11T17:40:56.9508076+00:00"
 },
 "orderOptions": {
   "redirectUrl": "https://www.paybyrd.com",
   "culture": "en-US",
   "sendBy": []
 },
 "paymentOptions": {
   "useSimulated": true,
   "cardOptions": {
     "isPreAuth": false,
     "isDccEnabled": false
   },
   "tokenOptions": {
     "tokenizationMethod": "none"
   },
   "allowedPaymentMethods": []
 },
 "terminalOptions": {
   "notifyChanges": false
 },
 "code": "BYRD200",
 "description": "Operation successfully completed"
}
```

### Airline order

This is an example of an airline ticket order:

```bash Request highlight={24-55} theme={null}
curl --request POST \
 --url https://gateway.paybyrd.com/api/v2/orders \
 --header 'Accept: application/json' \
 --header 'Content-Type: application/json' \
 --header 'x-api-key: {your_api_key}' \
 --data '
{
 "isoamount": 2510,
 "orderRef": "Revolut Pay",
 "currency": "EUR",
 "shopper": {
   "email": "peter.parker@spidermail.com",
   "firstName": "peter",
   "lastName": "parker",
   "phoneCountryCode": 55,
   "phoneNumber": ""
 },
 "orderOptions": {
   "redirectUrl": "https://www.paybyrd.com",
   "allowedPaymentMethods": [
     "REVOLUTPAY"
   ]
 },
 "airline": {
   "travelType": "Roundtrip",
   "typeOperation": "EMD",
   "departureDate": "2024-12-19T19:30:00Z",
   "passengerName": "Peter Parker",
   "airlinePassengers": [
     {
       "ticketNumber": "123456",
       "firstName": "Peter",
       "lastName": "Parker",
       "phoneCountryCode": 55,
       "phoneNumber": "11953259340",
       "email": "peter.parker@spidermail.com",
       "membershipId": "6e419621-e2f1-4133-bc63-978c0b3d5562"
     }
   ],
   "airlineLegs": [
     {
       "flightNumber": "TP120",
       "cabin": "4",
       "serviceClass": "Y",
       "departureDate": "2024-12-19T19:30:00Z",
       "arrivalDate": "2024-12-20T09:30:00Z",
       "operatingAirline": "TP",
       "departureAirport": "GIG",
       "arrivalAirport": "LIS",
       "arrivalCountry": "PRT",
       "travellersNumber": 1,
       "fareBasisCode": "Y12R456"
     }
   ]
 }
}'
```

```json Response highlight={20-46} theme={null}
{
 "orderDate": "2024-12-11T17:43:28Z",
 "status": "created",
 "checkoutUrl": "https://link-s.paybyrd.com/chk_9FypTFCRl",
 "orderId": "FF00164e-4e97-4b21-9552-b32f12580020",
 "amount": "25.10",
 "currency": "EUR",
 "orderRef": "Revolut Pay",
 "shopper": {
   "customReference": "shp_zVyD6ssboFkTMKr5",
   "shopperId": "509ba67f-b1ce-4501-a002-37265c1c1a3a",
   "email": "peter.parker@spidermail.com",
   "firstName": "peter",
   "lastName": "parker",
   "phoneCountryCode": 55,
   "phoneNumber": ""
 },
 "code": "BYRD200",
 "description": "Operation successfully completed",
 "airline": {
   "travelType": "Roundtrip",
   "typeOperation": "EMD",
   "airlineLegs": [
     {
       "serviceClass": "Y",
       "flightNumber": "TP120",
       "fareBasisCode": "Y12R456",
       "arrivalAirport": "LIS",
       "arrivalDate": "2024-12-20T09:30:00Z",
       "departureAirport": "GIG",
       "departureDate": "2024-12-19T19:30:00Z",
       "operatingAirline": "TP",
       "travellersNumber": 1,
       "arrivalCountry": "PRT"
     }
   ],
   "airlinePassengers": [
     {
       "email": "peter.parker@spidermail.com",
       "firstName": "Peter",
       "lastName": "Parker",
       "membershipId": "6e419621-e2f1-4133-bc63-978c0b3d5562",
       "ticketNumber": "123456"
     }
   ]
 }
}
```

## Create payment

The following request creates a Revolut Pay payment:

```bash Request theme={null}
curl --request POST \
 --url https://gateway.paybyrd.com/api/v2/payment \
 --header 'Accept: application/json' \
 --header 'Content-Type: application/json' \
 --header 'x-api-key: {your_api_key}' \
 --data '
{
 "type": "OnlineTransfer",
 "brand": "REVOLUTPAY",
 "orderRef": "Revolut Pay",
 "currency": "EUR",
 "amount": "25.10",
 "culture": "pt-PT"
}'
```

```json Response theme={null}
{
 "revolutPay": {
   "token": "c3ffd9ff-749e-4fa1-9eaf-4c18b9d4814f"
 },
 "type": "OnlineTransfer",
 "currency": "EUR",
 "orderRef": "Revolut Pay",
 "acquirer": "REVOLUT",
 "brand": "REVOLUTPAY",
 "paymentMethod": "revolutpay",
 "redirectUrl": "https://paybyrd.com",
 "action": {
   "type": "redirect",
   "url": "https://webapp-redirect-api-stg.azurewebsites.net/api/v1/Redirect/ff46fa62-8bff-46ca-afdf-d3f7066abb33"
 },
 "code": "BYRD207",
 "description": "Pending redirect",
 "status": "Processing",
 "transactionId": "bff60f62-fb1f-f6ca-afdf-d3f7066abb33",
 "amount": "25.10",
 "isoAmount": 2510
}
```

To know whether the transaction was accepted, check the **code** field. For successful scenarios, the expected code is **BYRD207**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.