- WooCommerce
- Magento
- Shopify Soon
Magento plugin
Accept payments on your Magento store using the Reservepay Magento plugin.
Overview
The Reservepay Magento plugin lets you accept payments on your Magento store using Reservepay's pre-built payment form. The plugin handles the full checkout flow — redirecting customers to a secure payment page, processing the payment via the Reservepay API, and returning them to your order confirmation page.
Prerequisites
Before installing the plugin, make sure you have the following:
- Magento 2.3.x or higher and PHP 7.3 or higher, below PHP 8.0
- A Reservepay merchant account with the following credentials (available in your merchant dashboard under developer settings):
- Merchant ID
- Installation ID — create an SDK installation for your website
- API Key — create a new API key and keep it secret
Installation
Download the module with Composer Use Composer to add the module into your store:
composer require reservepay/reservepay-magentoEnable the module Run the following commands in your Magento root directory:
bin/magento module:enable Reservepay_Payment bin/magento setup:upgrade bin/magento setup:di:compile bin/magento setup:static-content:deploy bin/magento cache:flush
Configuration
- Log in to the Magento Admin Panel.
- Navigate to Stores > Configuration > Sales > Payment Methods.
- Expand the Reservepay section.
- Configure the following settings:
- Enabled: Set to
Yes. - Title: The payment method title shown to customers (e.g., "Pay with Reservepay").
- Merchant ID: Enter your Reservepay Merchant ID.
- Installation ID: Enter your Reservepay Installation ID.
- API Key: Enter your secret API Key.
- Enabled: Set to
- Click Save Config.
How it works
When a customer selects Reservepay at checkout and places their order, the following flow occurs:
Redirect to payment page — Magento redirects the customer to
/reservepay/payment/form. The Reservepay SDK loads and renders an embedded payment form.Payment session created — When the form initializes, the SDK fires
onPaymentSessionReadywith apayment_session_id. The plugin sends this to your Magento backend via a REST API call.Initiate payment flow — Your backend calls
/merchants/initiate-payment-flowwith the session ID, order amount, and currency, authenticated with your API key. The returnedpayment_idis stored on the order.Customer completes payment — The customer enters their payment details in the embedded form. On success, the SDK fires
onPaymentSuccess.Verify and complete — The plugin calls
/merchants/find-paymentfrom the backend to verify the payment status. If the status isSUCCESSFUL, the order is marked as paid and the customer is redirected to the order confirmation page.
If the payment fails at any point, the customer is redirected back to the checkout page to try again.
Testing
To verify your integration is working:
- Make sure the Reservepay payment method is enabled in your Magento stores configuration (see above).
- Add a product to your cart and proceed to checkout.
- Select Reservepay as the payment method and place the order.
- Confirm you are redirected to the payment form page.
- Complete a test payment and verify:
- You are redirected to the order confirmation page.
- The order status in Magento is updated correctly.
Technical Details
- API Endpoints: The module communicates with
https://api.reservepay.com/to initiate payments and verify transaction status. - Security: Sensitive order data is validated using a secure, HTTP-only cookie (
payment_redirect_token) to prevent unauthorized access during the payment redirect loop. - Webhooks/Callbacks: The module handles payment success and failure via the
reservepay/payment/paymentsuccessandreservepay/payment/paymentfailcontrollers.
No account yet?
Start integrating all these amazing features into your app or website by creating your own merchant account today. It's free to sign up and only takes a few minutes to get started.
No account yet?
Start integrating all these amazing features into your app or website by creating your own merchant account today. It's free to sign up and only takes a few minutes to get started.
