Revolut payment gateway for Maho Commerce. The v1 ships Revolut Pay as a redirect checkout: the customer is sent to Revolut's hosted payment page, and the order is captured back in Maho via webhook.
- PHP >= 8.3
- Maho Commerce
- A Revolut Business / Merchant account with API access
composer require mahocommerce/module-revolutIn your Revolut Business dashboard — production at https://business.revolut.com, sandbox at https://sandbox-business.revolut.com — go to:
Merchant → APIs → Merchant API tab → API Keys → Sandbox API Secret key (or Production API Secret key when going live).
Click the eye icon and copy the full sk_... secret.
Important
Make sure you are on the Merchant API tab, not Business API. The Business API needs OAuth + JWT + certificates; this module does not use it. The Public key (pk_...) shown on the same screen is unused by v1 (redirect checkout, no JS widget) — ignore it.
In Maho admin → System → Configuration → Sales → Payment Methods → Revolut — General Settings:
- Sandbox Mode — on while testing, off in production
- Merchant API Key — the
sk_...from step 1 - Click Save Config
- Click Register Webhook
The module calls POST /api/1.0/webhooks on your behalf, registers https://<your-store>/revolut/webhook for the relevant order events, and stores the returned signing secret and webhook ID in the form. The signing secret is returned only once by Revolut, so the button is the easiest way to get it.
Note
The Revolut Merchant dashboard does not have a Webhooks UI — webhook management is API-only. If you'd rather do it by hand, run:
curl -X POST https://sandbox-merchant.revolut.com/api/1.0/webhooks \
-H "Authorization: Bearer <sk_...>" \
-H "Revolut-Api-Version: 2024-09-01" \
-H "Content-Type: application/json" \
-d '{"url":"https://<your-store>/revolut/webhook","events":["ORDER_COMPLETED","ORDER_AUTHORISED","ORDER_PAYMENT_DECLINED","ORDER_PAYMENT_FAILED"]}'Swap the host to https://merchant.revolut.com for production. Then paste the signing_secret from the response into the Webhook Signing Secret field.
To list / rotate / delete webhooks later:
GET /api/1.0/webhooks— list allGET /api/1.0/webhooks/{id}— retrieve one (also returnssigning_secret)POST /api/1.0/webhooks/{id}/rotate-signing-secret— rotate the secretDELETE /api/1.0/webhooks/{id}— delete
Under Revolut — Revolut Pay:
- Enabled — Yes
- Title / Sort Order / Payment Action — to taste (Authorize Only vs. Authorize and Capture)
This module ships with the standard Maho CI gates:
- PHPStan (level 8) —
vendor/bin/phpstan analyze - Rector (dry-run) —
vendor/bin/rector -c .rector.php --dry-run - PHP CS Fixer (dry-run) —
vendor/bin/php-cs-fixer fix --dry-run - PHP / XML syntax checks — automatic on CI
Run composer install and you can execute any of the above locally before pushing.