# Revolut Module

https://docs.wisecp.com/en/revolut-module

Collect payments on Revolut's page and offer subscriptions or saved cards for renewals.

## Reaching the Screen

Go to **Settings → Financial → Payment Gateways**, open **All Modules** and click the Revolut card: `{admin}/modules/payment?module=Revolut`

Tick **Status** and save to list the method on the payment step. Use [Payment Gateways](https://docs.wisecp.com/en/payment-modules) to order the methods clients see.

## What Is on the Screen

The card holds your Revolut Merchant API credentials, the environment switch and the shared gateway settings.

The client sees a short panel inside checkout and finishes the payment on Revolut's page, so card details never reach your site. Revolut reports the result to the address in **Callback URL**.

Renewable items can be paid as a subscription that Revolut keeps and charges on its own. A card can also be saved and charged later without the client. Installments are not supported.

## Before You Configure It

- A Revolut Business account with a merchant account, and a separate sandbox account for testing. The two share nothing: keys, customers and saved cards are kept apart.
- A Merchant API secret key from the environment you configure here.
- A webhook registered for that merchant account, so payments and subscription cycles are reported back.
- A currency Revolut accepts. Fill in **Converting Currency** when your prices are in another one.

## Fields

- **Status**: Turns the module on. While it is off the other fields stay locked and clients are never offered the method.
- **Secret API key**: Required. The Merchant API secret key that authenticates every request to Revolut.
- **Webhook signing secret**: Required. Revolut hands it over once, when the webhook is created. Without it every incoming notification is refused.
- **API version**: The Revolut API version requests are sent with, written as a date. Keep the version you tested against.
- **Sandbox mode**: Sends every request to Revolut's test environment, where no money moves. Off by default.
- **Update Subscription Fee**: Keeps the recurring amount at Revolut in step with the service price when that price changes.

For commission, currency conversion, amount and country limits, see [Payment Gateways](https://docs.wisecp.com/en/payment-modules). **Callback URL**, **Success URL** and **Failed URL** cannot be edited. Copy the callback address with its icon.

## Tasks

### Connect your Revolut account

1. In your sandbox account open **Merchant overview → … → Merchant API → Generate** and copy the secret key.
2. Open the Revolut card under **All Modules** and tick **Status**.
3. Paste the key into **Secret API key** and tick **Sandbox mode**.
4. Click **Save Changes**. The method now appears on the payment step.

### Register the notification address

1. Copy the address in **Callback URL** on the module card.
2. Use the Merchant API `POST /api/webhooks` endpoint with this address as `url`. Authenticate with the same account's secret key.
3. Include these `events`: `ORDER_COMPLETED`, `ORDER_AUTHORISED`, `ORDER_CANCELLED`, `ORDER_FAILED`, `ORDER_PAYMENT_DECLINED` and `ORDER_PAYMENT_FAILED`.
4. Copy the response's `signing_secret` into **Webhook signing secret** and click **Save Changes**. Notifications can now be verified.

### Run a test payment

1. Place a small order as a client and choose Revolut on the payment step.
2. Click **Continue to Revolut** and pay with a sandbox test card.
3. You return to the site. The invoice is marked as paid and the order is activated.

### Switch to live

1. Generate the secret key in your production Revolut Business account and register the webhook there too.
2. Replace **Secret API key** and **Webhook signing secret** with the production pair.
3. Untick **Sandbox mode** and save. Repeat the test with a real low-value payment.

### Let clients start a subscription

1. The client picks the renewable items on the checkout panel and chooses to subscribe instead of paying once. All picked items must share one billing cycle.
2. Revolut creates the subscription, takes the first payment and charges the following cycles on its own.
3. The agreement is listed under [Subscriptions](https://docs.wisecp.com/en/subscriptions), where you can cancel it. Tick **Update Subscription Fee** to keep the recurring amount in step with the service price.

### Offer saved cards and automatic payment

1. Open [Payment Gateways](https://docs.wisecp.com/en/payment-modules) → **Initial Settings → Card Storage Module**, select Revolut and save.
2. The client adds a card from their own account and enters the details in the Revolut form that opens.
3. The client selects **Turn On Auto-Pay** from the card menu under **Saved Cards**. Renewal invoices can then use automatic collection.

### Refund a payment

1. Open the invoice from [Invoice Detail](https://docs.wisecp.com/en/invoice-detail-overview).
2. Under **Summary → Change Status**, select **Refunded** and **Refund via payment gateway**. Click **Update Status**.
3. Revolut returns the amount booked for this invoice.

## Things to Watch

> **Notifications need the signing secret**
> 
> A missing or wrong secret rejects webhook notifications. The browser return can still confirm a payment through the API, but clients may not return. Subscription cycles need working notifications.

> **Sandbox and production are two separate accounts**
> 
> A sandbox key collects nothing and is refused in production. Saved cards and subscriptions created in the sandbox do not exist on the live side either. Change the key, the signing secret and **Sandbox mode** together.

> **Subscription prices need updating**
> 
> With **Update Subscription Fee** off, Revolut keeps charging the old amount after a service price change. Manage cancellation from the Subscriptions screen.

## Required Privileges

Settings require **Payment Module Settings** (`MODULES_PAYMENT_SETTINGS`). Invoice changes require **Billing → Edit** (`INVOICES_OPERATION`).

## Related Articles

- [Payment Gateways](https://docs.wisecp.com/en/payment-modules)
- [Invoice Detail](https://docs.wisecp.com/en/invoice-detail-overview)
- [Subscriptions](https://docs.wisecp.com/en/subscriptions)
