NAV Navbar

Accept payments

Introduction to the Merchant API

The Revolut Merchant account is a sub account under your current Revolut Business account. As a Revolut Business customer, you can use your Revolut Merchant account and the Merchant API to accept online payments straight into your Merchant account. In addition, you can manage orders and customers.

Depending on how your e-commerce website is hosted, you can choose the corresponding checkout method to accept payments to your Merchant account:

3D Secure overview

3-D Secure (3DS) is a protocol designed to be an additional security layer for online transactions. During the checkout process, the customers are required to complete an extra authentication step to verify the cardholder's identity, which reduces fraud and meets regulatory requirements.

How it works

3DS allows the merchant to challenge its customers by asking them to perform an action that only cardholders are able to complete. Based on different mechanisms, the challenge can have different formats:

Benefits

Payments that are successfully authenticated using 3DS are covered by a liability shift, which means that the liability of the payment is with the issuing bank and not with you as a merchant.

In case of a chargeback for a payment where 3DS was used, by default the cardholder’s bank is responsible and liable to refund this amount to the cardholder.

Our 3DS solution

To ensure your safety as a merchant and to protect cardholders from having their stolen cards being used without their knowledge, Revolut performs a 3DS challenge when needed when a card payment is being made.

Also, the new Payments Services Directive (PSD2) regulations stipulate that merchants must be compliant with the Strong Customer Authentication (SCA) procedures from 1st January 2021. The Financial Conduct Authority FCA has extended the deadline for the UK to 14th September 2021.

Thanks to Revolut’s policy to request 3DS challenges, you don’t have to worry about not being compliant with these regulations.

Get started

1. Apply for a Merchant account

Before you begin, apply for a Merchant account in your Revolut Business account. You need to provide required information, for example, website of operation, volume of payments, category of your merchant activities, and then submit your application.

If your application is successful, you receive an email notification and can access your Merchant account right away.

For any questions, reach out to support via our in-app chat.

2. Generate the API key

After you successfully apply for a Merchant account in your Revolut Business Account, generate the production API key. You need it as part of the authorization header for each Merchant API request.

Complete the following steps to generate the production API key:

  1. Log in to your Revolut Business portal.
  2. From the left sidebar menu, click Merchant, and then click the API tab on the page.
  3. Under the Product API key section, generate the production API key.

Screenshot 2020-02-10 at 15 43 13

Note: Use this key only for the production environment. For the Revolut Business Sandbox environment, use the sandbox API key. For more information, see Test in the Sandbox environment

Tutorials

Accept your first card payment

This tutorial walks you through the steps to accept the first payment. The tutorial assumes that you run your own e-commerce website and manage its code and files.

Check the following high-level procedure to integrate a Revolut Checkout Widget (widget) with the Merchant API:

  1. Server side: Create an order via the Merchant API request.
  2. Client side: Install the widget by adding RevolutCheckout to your application.
  3. Client side: Choose the option to collect card details and call the widget instance.

Before you start this tutorial, ensure that you have completed the following steps:

1. Create an order

Note: The information on this page assumes that you are pushing changes to the production environment. To test in the Revolut Business Sandbox environment, replace the endpoint address https://merchant.revolut.com/ with https://sandbox-merchant.revolut.com/ and use the Sandbox API key in the headers of requests.

Request

  POST https://merchant.revolut.com/api/1.0/orders
  Authorization: `Bearer [yourAPIKey]`

Body of the request

{
  "amount": 999,
  "currency": "EUR"
}

When a user decides to make a purchase on your e-commerce website, on the server side, you create an order by sending a POST request to https://merchant.revolut.com/api/1.0/orders. You must include the authorization header in the request, which is in the following format:

Bearer [yourAPIKey]

Where [yourAPIKey] is the production API key that you generated from your Merchant account.

Note: You must create an order for each purchase.

Here’s an example request:

Response

{
  "id": "<ID>",
  "public_id": "<PUBLIC_ID>",
  "type": "PAYMENT",
  "state": "PENDING",
  "created_date": "2020-10-15T07:46:40.648108Z",
  "updated_date": "2020-10-15T07:46:40.648108Z",
  "order_amount": {
    "value": 10000,
    "currency": "GBP"
  }
}

When the order is created successfully, the Merchant API returns a response like this:

Note: From the response, save the public_id, which is a temporary token generated for every order a customer initiates on the website. It’s also the identifier passed from the server side to the client side to call the widget instance. When the order is paid, the public_id expires.

2. Install the widget

When the order is successfully created, on the client side, you install the widget.

Embed script

<head>
<title>Shop</title>
<script>!function(e,o,t){e[t]=function(n,r){var c={sandbox:"https://sandbox-
merchant.revolut.com/embed.js",prod:"https://merchant.revolut.com/
embed.js",dev:"https://merchant.revolut.codes/
embed.js"},d=o.createElement("script");d.id="revolut-checkout",d.src=c[r]||
c.prod,d.async=!0,o.head.appendChild(d);var s={then:function(r,c)
{d.onload=function(){r(e[t](n))},d.onerror=function()
{o.head.removeChild(d),c&&c(new Error(t+" is failed to
load"))}}};return"function"==typeof Promise?Promise.resolve(s):s}}
(window,document,"RevolutCheckout");</script>
</head>

Step 1: Install the NPM package

npm install @revolut/checkout

Step 2: Import the ES module

import RevolutCheckout from "@revolut/checkout";
RevolutCheckout("XXX", "prod").then((instance) => {
  // work with instance
});

To install the Revolut Checkout Widget, you need to add RevolutCheckout to your checkout page in one of the following ways:

Note: The script is requested asynchronously, so you don’t need to worry about the content that blocks the loading of the page.

Add the embed script

Add the embed script to the document head of your checkout HTML page.

Install the widget’s NPM package

Step 1. Run the command to install the widget’s NPM package.

Step 2. Import the ES module to the javascript code as follows:

3. Call the widget instance

Choose one of the following options to integrate with the widget to collect card details:

You design your implementation to call the widget instance as follows:

  1. When the user clicks Pay, the payment pop-up window opens. To achieve this, you create a button and attach a click event listener to it that triggers RC.payWithPopup(options).
  2. The user enters the required card details and the optional personal details, and then moves to the payment processing.
  3. After the payment is processed, you can redirect the user to the appropriate page to handle the success or failed status of the order.

Code snippet

<button id="pay-button">Pay</button>
<script>
  RevolutCheckout("<PUBLIC_ID>").then(function (RC) {
    var payButton = document.getElementById("pay-button");
    // On click open payment pop-up
    payButton.addEventListener("click", function () {
      RC.payWithPopup({
        // (optional) name of the customer
        name: "First Last",
        // (optional) email of the customer
        email: "customer@example.com",
        // (optional) phone of the customer
        phone: "+447950630319",
        // (optional) billing address of the customer
        billingAddress: {
          countryCode: "GB",
          region: "Greater London",
          city: "London",
          streetLine1: "Revolut",
          streetLine2: "1 Canada Square",
          postcode: "EC2V 6DN",
        },
        // (optional) shipping address of the customer
        shippingAddress: {
          countryCode: "GB",
          region: "Greater London",
          city: "London",
          streetLine1: "Revolut",
          streetLine2: "1 Canada Square",
          postcode: "EC2V 6DN",
        },
        // Callback called when payment finished successfully
        onSuccess() {
          window.alert("Thank you!");
        },
        // Callback in case some error happened
        onError(message) {
          window.alert("Oh no :(");
        },
        // (optional) Callback in case user cancelled a transaction
        onCancel() {
          window.alert("Payment cancelled!");
        },
      });
    });
  });
</script>

Implement the code snippet on the right side of this page, where:

Congratulations! You’ve successfully integrated the widget with the Merchant API to the checkout page and accepted your first payment for the order.

What’s next

Accept payments via Pay with Revolut

The Pay with Revolut payment method enables your users to pay with their Revolut account directly after they authorize this payment method on the Revolut App.

In this way, you can accept payments without having to ask your users to enter their card details. This improves the checkout experience for your users greatly.

How Pay with Revolut works

See how the Pay with Revolut works the first time a user is directed to a checkout page on a web browser:

  1. The user finds the Pay with Revolut payment method on the checkout page, and scans the QR code. This starts the authorization process of paying with their Revolut account.

    Note: If the user doesn't have the Revolut app installed on the phone, the user is redirected to a promotional page to download the app and open an account.

  2. The user receives a notification on their Revolut app to authorize this payment method.

  3. After the user makes the first payment successfully on the checkout page, the Revolut checkout widget saves a token in local storage of the browser.

  4. The next time the user visits your site or any other site with the Pay with Revolut payment method, the user doesn't need to scan the QR code, and the notification for authorization appears directly on their Revolut app.

You can check the payment process in the following diagram:

Implement Pay with Revolut

Because the Pay with Revolut method is included in the Revolut Checkout Widget, the steps to accept a payment via Pay with Revolut are similar to those to accept a card payment.

Check the following high-level procedure to integrate a Revolut Checkout Widget for the Pay with Revolut method with the Merchant API:

  1. Server side: Create an order via the Merchant API request
  2. Client side: Install the widget by adding RevolutCheckout to your application
  3. Client side: Choose the option to load Pay with Revolut and call the widget instance.

Calling the widget instance

Insert the Pay with Revolut button

<div id='pay-with-revolut'></div>

RevolutCheckout("<PUBLIC_ID>").then(function(instance) {
  instance.payWithRevolut({
    target: document.getElementById('pay-with-revolut'),
    phone: '+441632960022', // recommended
    onSuccess() {
      console.log('Payment completed')
    },
    onError(error) {
      console.error('Payment failed: ' + error.message)
    }
  })
})

Insert the Pay with Revolut button using the code snippet on the right that contains an example with minimum required parameters, where:

This is what the button looks like:

To view the full list of parameters, take a look at the documentation.

Charge a customer’s saved payment method

You can save your customers’ card details to be able to charge them at a later time. This is useful in the following use cases:

To do that, you:

  1. Save the card details of a customer.
  2. Charge the customer’s saved payment method.

1. Save the card details of a customer

There are two approaches to save the card details of a customer:

Create a customer first

  1. Create a customer and note down the id of the customer object.
  2. Create an order with the amount, currency, and customer_id parameters in the body of the request.
  3. Make the payment via the Revolut Checkout Widget with options.savePaymentMethodFor = customer or merchant.
  4. Payment method is created and attached to the customer.

Create an order first

  1. Create an order with the amount and currency parameters.
  2. Make the payment via the Revolut Checkout Widget with options.savePaymentMethodFor = customer or merchant. Note: email must be provided when you create an order or when the customer is making the payment; otherwise, an error is returned.
  3. When the payment is successful, a customer is created with the email.
  4. Payment method is associated with the customer and customer_id is attached to the order automatically.

2. Charge the saved payment method

When you’ve created a customer and saved the customer’s payment method successfully, you can charge this payment method later without the customer being on the checkout page, for example, to charge for recurring transactions. You can also use this approach to speed up the checkout process when the customer is on the checkout page, for example, for 1-click buy flow.

Complete the following steps:

Create an Order

POST /api/1.0/orders
{
  "amount": 100,
  "currency": "GBP",
  "customer_id": "6c7c97a8-cfc1-4cf3-8b38-26a74fdf1fae"
}

Confirm the Order

POST /api/1.0/orders/6a1353a8-3054-40ee-ab39-97a11e4c5f2a/confirm
  1. Create an order with the amount, currency and customer_id parameters in the body of the request.

  2. Confirm the order to take payment from this customer using the saved payment method.

Notes:

Test in the Sandbox environment

Use the Revolut Business Sandbox environment to test your Merchant account integration before you push the code changes to the production environment. To get started, complete the following steps:

Specify the Sandbox environment

type RevolutCheckout = (
  token: string,
  mode?: 'prod' | 'sandbox' = 'sandbox`
) => Promise<Instance>;
  1. Sign up for a Sandbox account on Revolut Business Sandbox environment.
  2. Change the address of the endpoints that you want to test from https://merchant.revolut.com/ to https://sandbox-merchant.revolut.com/.
  3. Get the Sandbox API key and use it in the headers of requests on your server side.
  4. Specify the sandbox environment in the second parameter of RevolutCheckout.

Use test cards

To test your various payment flows for a variety of scenarios, you can use the following test card numbers that Revolut provides.

Note: These cards work only in the Revolut Business Sandbox environment.

Test for successful payments

Use the following test cards to simulate a successful payment in the Sandbox environment. You can also use them to test the use case of charging a customer's saved payment method.

Use any 3-digit CVV and any future expiry date (MM/YY).

Card PAN Brand
4929420573595709 VISA
5281438801804148 MASTERCARD



Test for error cases

Use the following test cards to create payments that produce error codes in the Sandbox environment. This is useful when you want to:

Use any 3-digit CVV and any future expiry date (MM/YY).

Card PAN Case
4242424242424242 DECLINED
4929573638125985 DECLINED due to insufficient funds
4532336743874205 DECLINED due to card being expired
2720998837779594 DECLINED due to Do Not Honour

This error happens when your customer's bank declines the transaction due to internal reasons. For example, their fraud rules might have been triggered or a temporary hold may have been applied to this card.
5145014175946025 DECLINED due to CVV code being incorrect
5445850727830242 DECLINED due to invalid postal code

This error is most common for cards issued in the UK, US, Australia, New Zealand or Canada.
2223000010479399 Order stuck in PROCESSING state

This card is useful to test what would happen with your implementation if the order took longer than expected to complete.

Change to the production environment

When you are confident that everything works as expected on the Revolut Business Sandbox environment, you can revert the endpoint address back to https://merchant.revolut.com/ in both the Merchant API requests and embed script, and replace the Sandbox API key with Production API key in the Merchant API requests.

Now you are ready to accept real payments!

Plugins

If you have your website running on WooCommerce, Prestashop, or Magento e-commerce platform, install the corresponding plugin that Revolut has created. This is a simple way to start accepting payments straight into Revolut Merchant Accounts without having to integrate with Merchant API.

Before you begin to install and configure the plugins, ensure that you have completed the following steps:

WooCommerce

The Revolut Gateway for WooCommerce plugin enables you to accept online payments via your WooCommerce store easily.

Then, configure the plugin to test in the Sandbox environment or use it in the production environment.

Install the WooCommerce plugin

You can install the Revolut Gateway for WooCommerce plugin either in a quick way or manually install it when you don’t have the Internet access to the WooCommerce store.

Quick installation

Complete the following steps to install the plugin directly from your admin section:

  1. Log in to your WooCommerce dashboard as the admin role.
  2. From the left sidebar menu, click Plugins.
  3. On the top of the page, click Add New next to the Plugins page title.
  4. Locate the Search plugins field on the top right of the page and search for Revolut Gateway for WooCommerce. You should see the plugin from the search result. Make sure the plugin has the name By Revolut.
  5. Click Install Now to install the plugin.
  6. When the installation is done, click Activate.

Congratulations! You have activated the Revolut Gateway for WooCommerce plugin.

Manual installation

  1. Log in to your WooCommerce dashboard as the admin role.
  2. From the left sidebar menu, Click Plugins.

  3. On the top of the page, click Add New next to the Plugins page title. You are then redirected to the following page.

  4. Click Upload Plugin next to Add Plugins page title.

  5. Download the latest version of the plugin from the Wordpress Official marketplace.

  6. Upload the plugin that you downloaded in .zip format:

  7. When the installation is done, click Activate Plugin.

Congratulations! You have activated the Revolut Gateway for WooCommerce plugin.

Configure the WooCommerce plugin

Configure the Revolut Gateway for WooCommerce plugin to test in the Sandbox environment or use in the production environment.

Test in the Sandbox environment

  1. Log in to your WooCommerce dashboard as the admin role.
  2. From the left sidebar menu, click Plugins.
  3. Under WooCommerce Revolut Gateway plugin, click Settings. You are then directed to the following page:

  4. Select the Enable Revolut check box.

  5. From the Select Mode drop-down menu, select Sandbox.

  6. In the API Key Sandbox field, add your Sandbox API key. For more information about getting the Sandbox API key, see Test in the Sandbox environment.

  7. In Setup Webhook Sandbox, click Setup to enable webhooks.

  8. Click Save changes to apply the changes.

Now you can start testing payments using our test cards.

Use in the production environment

  1. Return to your WooCommerce dashboard as the admin role.
  2. From the left sidebar menu, click Plugins.
  3. Under WooCommerce Revolut Gateway plugin, click Settings.
  4. Select the Enable Revolut check box.
  5. From the Select Mode drop-down menu, select Sandbox.
  6. In the API Key Live field, add your production API key. For more information about generating the API key, see Get started: 2. Generate the API key.
  7. In Setup Webhook Live, click Setup to enable webhooks.
  8. Click Save changes to apply the changes.

Now you can start accepting real payments in your WooCommerce online store.

Refund order from WooCommerce order view

  1. Log in to your WooCommerce dashboard as the admin role.
  2. From the left sidebar menu, click Orders.
  3. Select the order that you want to refund, and locate the order details section. From the bottom left corner, click Refund.

  4. In the Refund amount field, enter the amount that you want to refund.

  5. Optional: In the Reason for refund field, provide the reason why you want to refund.

  6. Click Refund via Revolut.

You’ve successfully refunded the customer’s payment for this order.

Capture authorized orders by changing their status

  1. Log in to your WooCommerce dashboard as the admin role.
  2. From the left sidebar menu, click Orders. Select the order that you want to capture.
  3. Change the status of the order from On Hold to either Processing or Completed.

You’ve successfully captured the customer’s authorized order.

Prestashop

The Revolut Gateway for Prestashop plugin enables you to accept online payments via your Prestashop store easily.

Install the Prestashop plugin

In Prestashop version 1.7

  1. Log in to your Prestashop 1.7 dashboard as the admin role.
  2. From the left sidebar menu, click IMPROVE > Module > Module Catalog.
  3. Type Revolut in the search field. From the search results, locate the plugin that is free and has Official Partner on it.

  4. Click the Install button and wait for the installation to finish. It should not take long.

  5. When the installation is done, you're ready to go! Click Configure to set up the plugin and follow the steps you'll find at the top of the page.

In Prestashop version 1.6

  1. Log in to your Prestashop 1.6 dashboard as the admin role.
  2. From the left sidebar menu, click Modules and Services.
  3. At the top of the categories of modules, search for Revolut in the search bar as seen in the image below to find the plugin. Make sure it's the one that is free and says "by Prestashop Partners"

  4. Click the Install button and wait for the installation to finish. It should not take long.

  5. When the installation is done, you'll be redirected to the plugin settings.

  6. Follow the steps you'll find at the top of the page and you'll be good to go!

Manually download and install the plugin

If your store is not connected to the addons marketplace or you prefer to manually upload the plugin to your store, you can download the Revolut Gateway for Prestashop Module:

  1. Visit the Prestashop addons marketplace
  2. Click the Download button and select your Prestashop version to get the plugin in a .zip file.
  3. Install the plugin by uploading this file in the plugins section of your store.

Configure the plugin

You can configure the Revolut Gateway for Prestashop plugin to suit your business needs.

Complete the fields in the Settings section and click Save:

If needed, you can also complete the fields in the Advanced mode section and click Save:

Perform the operations

Capture an order from Prestashop's admin panel

With this plugin, you can handle the capture of the orders from Prestashop's admin panel.

To do it, complete the following steps:

  1. In the Setting section, enable "Authorize Only" mode. When a customer places an order, the status of the order in Prestashop will be Awaiting check payment by default.
  2. To capture the funds for a specific order, change the status to Payment accepted.

You can change which status captures the funds by modifying the settings as explained above in the Advanced mode section of the settings.

Refund an order from Prestashop's admin panel

After the funds of an order have been captured, you can refund the amount of an order using Prestashop's admin panel.

To do so, in the Advanced mode section, change the status of Order Status for triggering the refund on Revolut to Refunded.

Test the plugin in the Sandbox environment

You can make test payments using the plugin in the Sandbox environment.

To do that, complete the following steps:

  1. Log in to your Prestashop dashboard as the admin role.
  2. Navigate to the Modules section and Configure the plugin.
  3. Complete the fields in the Settings section:
    • Enable plugin?: Set to Yes.
    • Mode: Set to Sandbox.
    • API Key (sandbox mode): Enter the Sandbox API key.
  4. On the bottom right of the Settings section, click Save to apply the changes.

For more information about testing the integration, see Test in the Sandbox environment.

Use the plugin in the production environment

When you are ready to start accepting payments in your store using the Revolut Gateway for Prestashop plugin, complete the following steps:

  1. Log in to your Prestashop dashboard as the admin role.
  2. Navigate to the Modules section and Configure the plugin.
  3. Complete the fields in the Settings section:
    • Enable plugin?: Set to Yes.
    • Mode: Set to Live.
    • API Key (live mode): Enter the Production API key.
  4. On the bottom right of the Settings section, click Save to apply the changes.

Magento 2

The Revolut Gateway for Magento 2 plugin enables you to accept online payments via your Magento 2 store easily.

Install the Magento plugin

Complete the following steps to install the Revolut Gateway for Magento 2 plugin manually:

Terminal (Step 3)

$ unzip revolutgatewayformagento2.zip

Terminal (Step 4)

$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile
$ php bin/magento setup:static-content:deploy

Terminal (Step 5)

$ php bin/magento cache:flush
  1. Download the Revolut Gateway for Magento 2 .zip file.
  2. Locate the /app/code directory inside the root directory. (Note: You might need to create it yourself.)
  3. Extract the plugin in .zip format that you downloaded in the /app/code directory.
  4. Open a terminal in the magento2 root folder and run the commands in the provided code block to install the plugin.
  5. When the installation is done, flush the Magento 2 cache using the admin panel or the terminal command on the right.

Now, log in to to your store's admin panel and navigate to Stores > Configuration > Sales > Payment Methods > Revolut. You should see Revolut under Other payment methods.

Troubleshooting

If you have troubles running the commands in Step 4:

The Revolut Gateway for Magento 2 plugin is compatible only with Magento versions 2.1.x, 2.2.x or 2.3.x.

Configure the Magento plugin

When you’ve successfully installed the Magento plugin, configure the plugin properly to enable you to perform operations.

To do that, complete the following steps:

  1. Log in to to your store's admin panel and navigate to Stores > Configuration > Sales > Payment Methods > Revolut.
  2. Click Configure to expand the Required Settings and the Additional Settings section.
  3. In the Required settings section, complete the fields:
    • Select Mode: Select Sandbox or Live for the payment gateway mode.
    • API Key (sandbox mode) or API Key (live mode): Enter the API Key for sandbox mode or live mode.
  4. In the Additional Settings section, complete the fields:
    • Enable plugin : Select Yes to enable the Revolut gateway.
    • Title : Enter the title displayed on the checkout page.
    • Payment Action : Select between Authorize Only and Authorize And Capture:
      • Authorize Only : To check the card for validity only but not charge the account until the order is approved.
      • Authorize and Capture: To charge the debit/credit card when the order is placed.
    • Always hide postcode: To allow customers to provide their postcode as part of card details, select No. By default ,this is set as No.
    • Payment from Applicable Countries: Select whether to accept payments from all allowed countries or only specific countries.
      • All Allowed Countries: Enable all the allowed countries to make payments.
    • Specific Countries: Select one or more countries (using the Control or SHIFT key) to accept payments from in the Payment from Specific Countries list.
    • New Order Status : Set the order status for new orders as Processing or Suspected Fraud:
      • Processing: The payment is made successfully and an order invoice is issued.
      • Suspected Fraud: No invoice is issued.
    • Sort Order : The order of the Revolut payment method that is displayed on the checkout page. For example, if you set this field to 0, the Revolut payment is displayed as the first payment method.
    • Minimum Order Total : If the order amount is less than this figure, the Revolut payment method is not displayed on the checkout page.
    • Maximum Order in Total: If the order amount is greater than this figure, the Revolut payment method is not displayed on the checkout page.
  5. On the top right of the page, click Save Config to apply the changes.

Perform the operations

Capture an order from Magento's admin panel

With this plugin, you can handle the capture of the orders from Magento's admin panel.

To do so, complete the following steps:

  1. Log in to to your store's admin panel and navigate to Stores > Configuration > Sales > Payment Methods > Revolut.
  2. Click Configure to expand the Required Settings and the Additional Settings section.
  3. In the Additional settings section, set the Payment Action to Authorize Only, so that when a customer places an order, the status of the order in Magento is Processing by default.
  4. From the store's admin panel, navigate to Sales > Orders. Select the order that has been placed and click to View to display the order details view.
  5. Click Invoice on the top banner of the order details view.
  6. Scroll to the bottom and, under the Invoice Totals section, make sure you have selected the Capture online option.
  7. Click Submit Invoice to capture the funds for this order.

Refund an order from Magento's admin panel

When the amount of an order has been captured and an invoice has been generated, you can refund the total or partial amount of an order using Magento's admin panel.

To do so, complete the following steps:

  1. From the store's admin panel, navigate to Sales > Invoices.
  2. Select the invoice of the order you would like to refund, and then click View.
  3. On the top banner, click Credit Memo.
  4. Scroll down to the Items to Refund section and select what items you would like to refund.
  5. Scroll further down and click Refund when you're ready to process the refund.

Test the plugin in the Sandbox environment

You can make test payments using the plugin in the Sandbox environment.

To do that, complete the following steps:

  1. Log in to to your store's admin panel and navigate to Stores > Configuration > Sales > Payment Methods > Revolut.
  2. Click Configure to expand the Required Settings and the Additional Settings section.
  3. Complete the fields:
  1. On the top right of the page, click Save Config to apply the changes.

For more information about testing the integration, see Test in the Sandbox environment.

Use the plugin in the production environment

When you are ready to start accepting payments in your store using the Revolut Gateway for Magento plugin, complete the following steps:

  1. Log in to to your store's admin panel and navigate to Stores > Configuration > Sales > Payment Methods > Revolut.
  2. Click Configure to expand the Required Settings and the Additional Settings section.
  3. Complete the fields:
  1. On the top right of the page, click Save Config to apply the changes.

Errors

HTTP Response errors

The API uses the following error codes:

CODE MEANING
400 Bad Request -- Your request is invalid. Ensure that all the parameters provided in the request follow the API Reference.
401 Unauthorized -- Your access token is wrong.
403 Forbidden -- Access to the requested resource or action is forbidden.
404 Not Found -- The requested resource could not be found.
405 Method Not Allowed -- You tried to access an endpoint with an invalid method.
406 Not Acceptable -- You requested a format that isn't JSON.
429 Too Many Requests -- You're sending too many requests.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

Failure Reasons

A payment towards an order can be DECLINED or FAILED for a reason. You can check it from the failure_reason field under payments in the response.

The following table lists the most common reasons that are mapped to human-readable values:

failure_reason value Description
do_not_honour The customer's bank declines the payment because it fails the authorization process. The most common reasons are:

  1. The bank's fraud rules are triggered.
  2. The bank has placed a temporary hold on the customer's card.
  3. The purchase session is locked due to multiple declined payments.
  4. The seller is located in a different country from that of the card issuing bank.
3ds_challenge_abandoned The customer has abandoned the 3DS challenge without completing it.
3ds_challenge_failed The customer has failed the 3DS challenge.
3ds_challenge_failed_manually The customer has failed the 3DS challenge manually.
insufficient_funds The account associated with the payment method used doesn’t have sufficient funds to make the payment.
transaction_not_allowed_for_cardholder The customer's bank doesn’t allow the cardholder to make the payment.
high_risk The transaction has been declined due to high risk. This can be a trigger from both the issuing bank and internal Revolut tools.
cardholder_name_missing The cardholder name is missing. This is a required parameter to make a card payment.
unknown_card The card can’t be identified. Ensure that you don’t use a test card in the production mode.
invalid_card The card number provided is invalid.
invalid_email The email provided doesn’t have a valid format.
restricted_card The issuing bank has a restriction on the card. Ask the customer to contact their bank for more details.
expired_card The card provided has expired.
withdrawal_limit_exceeded The withdrawal limit for a specific card or account has been reached or exceeded. Ask the customer to contact their bank to extend this limit.
pick_up_card The card has been reported as lost or stolen. The issuing bank has given the instruction to pick up the card and notify the issuing bank so that it can be returned to its rightful owner.