Revolut Pay

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

How it works

It works as an async payment method, which means: when you create a payment, we receive a response from Revolut that the payment was created and we should wait for the customer. So, differently from other methods, our transaction stays with a processing status. As soon as the customer do the payment, Revolut system should notify us, and then we update the payment to success or failed. The consumer is redirected to the RevolutPay-hosted payment page to authenticate and approve the checkout.


Create order

You can see below the simplest example of how to create an order and the generated response:

Generic order

This is an example of a generic order:

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_HERE}}' \
  --data '
{
    "isoamount": 2510,
    "orderRef": "Revolut Pay",
    "currency": "EUR",
    "shopper": {
        "email": "[email protected]",
        "firstName": "peter",
        "lastName": "parker",
        "phoneCountryCode": 55,
        "phoneNumber": ""
    },
    "orderOptions": {
        "redirectUrl": "https://www.paybyrd.com",
         "allowedPaymentMethods": [
            "REVOLUTPAY"
        ]
    }
}'
{
    "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": "[email protected]",
        "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",
    "checkoutKey": "eyJFPcmFlcklkIjoiFTgzYWExYTEtMTUyYy00NTllFWE5MWUtZmM0MTc4NTIwOFFIiwiT3JkZXJSZWYiOiJSZXZvbHV0IFBheSIsIlBlcnNvbklkIjo4MDYsIkxpdmUiOmZhbHNlLCJFbnRpdHlJZCI6ImU4M2FhMWExLTE1MmMtNDU5ZS1hOTFlLWZjNDE3ODUyMDgwNyIsIkFtb3VudCI6IjI1LjEwIiwiQ3VycmVuY3kiOiJFVVIifQ==",
    "splitPayments": []
}

Airline order

This is an example of an airline ticket order:

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_HERE}}' \
  --data '
{
    "isoamount": 2510,
    "orderRef": "Revolut Pay",
    "currency": "EUR",
    "shopper": {
        "email": "[email protected]",
        "firstName": "peter",
        "lastName": "parker",
        "phoneCountryCode": 55,
        "phoneNumber": ""
    },
    "orderOptions": {
        "redirectUrl": "https://www.paybyrd.com",
         "allowedPaymentMethods": [
            "REVOLUTPAY"
        ]
    },
    "paymentOptions": {
        "useSimulated": true,
        "cardOptions": {
            "isPreAuth": false
        }
    },
    "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": "[email protected]",
                "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,
                "hoursBeforeDeparture": 5,
                "isDepartureDateChanged": false,
                "segmentCodeStatus": "ABC123",
                "fareBasisCode": "Y12R456"
            }
        ]
    }
}'
{
    "orderDate": "2024-12-11T17:43:28Z",
    "status": "created",
    "checkoutUrl": "https://link-s.paybyrd.com/chk_9FypTFCRl",
    "tags": 0,
    "index": 1,
    "transactions": [],
    "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": "[email protected]",
        "firstName": "peter",
        "lastName": "parker",
        "phoneCountryCode": 55,
        "phoneNumber": "",
        "shippingType": "Undefined",
        "firstPurchaseDate": "2024-12-11T17:43:28.2722627+00:00",
        "lastPurchaseDate": "2024-12-11T17:43:28.2722627+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",
    "checkoutKey": "eyJFcmRlcklkIjoFfGUwMDE2NGUtNGU5Ny00YjIxLTk1NTItYjMyZjEyNTgwMDIwIiwiT3JkZXJSZWYiOiJSZXZvbHV0IFBheSIsIlBlcnNvbklkIjo4MDYsIkxpdmUiOmZhbHNlLCJFbnRpdHlJZCI6ImRlMDAxNjRlLTRlOTctNGIyMS05NTUyLWIzMmYxMjU4MDAyMCIsIkFtb3VudCI6IjI1LjEwIiwiQ3VycmVuY3kiOiJFVVIifQ==",
    "airline": {
        "exchangeTicketAmount": 0,
        "travelType": "Roundtrip",
        "typeOperation": "EMD",
        "airlineLegs": [
            {
                "serviceClass": "Y",
                "stopOverCode": "O",
                "flightNumber": "TP120",
                "fareBasisCode": "Y12R456",
                "arrivalAirport": "LIS",
                "arrivalDate": "2024-12-20T09:30:00Z",
                "cabin": "4",
                "departureAirport": "GIG",
                "departureDate": "2024-12-19T19:30:00Z",
                "hoursBeforeDeparture": 5,
                "isDepartureDateChanged": false,
                "operatingAirline": "TP",
                "segmentCodeStatus": "ABC123",
                "travellersNumber": 1,
                "arrivalCountry": "PRT"
            }
        ],
        "airlinePassengers": [
            {
                "documentType": 0,
                "email": "[email protected]",
                "firstName": "Peter",
                "lastName": "Parker",
                "membershipId": "6e419621-e2f1-4133-bc63-978c0b3d5562",
                "ticketNumber": "123456"
            }
        ]
    },
    "splitPayments": []
}

Create payment

You can see below the simplest example of how to create a RevolutPay payment and the generated response:

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_HERE}}' \
  --data '
{
    "type": "OnlineTransfer",
    "brand": "REVOLUTPAY",
    "orderRef": "Revolut Pay",
    "currency": "EUR",
    "amount": "25.10",
    "culture": "pt-PT"
}'
{
    "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",
    "requestId": "4dfd94fe-ba5d-4aa3-bf151-f8f3b34d5139",
    "expiresAt": "2024-12-11T18:09:13.0589716Z",
    "externalTransactionIdentifier": "6759d1f5-45f2-a8f0-f6cf-163785176f44",
    "marketId": "PT",
    "acceptTokenization": false,
    "transactionMode": "None",
    "transactionId": "bff60f62-fb1f-f6ca-afdf-d3f7066abb33",
    "amount": "25.10",
    "isoAmount": 2510
}

See the full API reference here.

In order to know whether the transaction was accepted or not, you must check the code field. For successful scenarios, the expected code is BYRD207. You can find here the list of all possible codes