Redsys payment module
This module provides a way to accept payments through RedSys, a common payment processor in Spain, without needing a full e-commerce setup. It can be used for donations, invoices, or integrated with Drupal Commerce as an optional payment gateway.
Redsys payment provides off-site Redsys payments for Drupal sites, with signed requests and authenticated callback processing. The base module can accept standalone payments without requiring Drupal Commerce.
For standalone payments, customers enter an amount, email address, payment description, and payment method in a configurable Drupal block. They are then redirected to the Redsys hosted payment page, so Drupal does not collect card or wallet credentials.
Typical uses include donations, invoice payments, fees, and other one-time payments.
Features
- Standalone payment form provided as a Drupal block.
- Fixed-amount, token-protected payment requests with optional expiration, configurable payment methods, safe retries, and complete attempt history.
- Card, Bizum, PayPal, and xPay (Apple Pay or Google Pay).
- Test and production environments.
- HMAC SHA-512 V2 signatures, with HMAC SHA-256 V1 available for legacy terminals.
- Merchant secrets managed through the Key module.
- Validation of callback signatures and immutable transaction data.
- Idempotent processing of repeated Redsys notifications.
- Persistent payment records with permission-protected administration pages.
- Customer and administrator email after a payment is confirmed.
- Token-protected payment result pages.
- Optional Webform payment handler.
- Optional Drupal Commerce payment gateways.
Payment methods such as Bizum, PayPal, Apple Pay, and Google Pay must be enabled for the merchant terminal by the bank or Redsys.
Payment requests
Administrators can create fixed-amount payment links at
`/admin/content/redsys-payment-requests`. Each request has an immutable amount
and concept, one or more allowed payment methods, an optional payer email, and
an optional expiration date.
Pending requests can be duplicated or canceled. Only one payment attempt can be active at a time. Rejected or canceled attempts can be retried, while a confirmed payment permanently closes the request. Every attempt remains available in the Redsys payment audit log.
Webform integration
Enable `redsys_button_webform` and add the Redsys payment handler under
Settings > Emails / Handlers. Map existing Webform elements for the amount, email, description, and optional payment-result values.
The submission remains a draft until an authenticated Redsys notification confirms the payment.
Drupal Commerce integration
Enable `commerce_redsys_button`, then create and configure one of the available off-site payment gateways:
- Redsys card
- Redsys Bizum
- Redsys PayPal
- Redsys xPay
Credentials are configured per Commerce gateway. Commerce payments currently support EUR, USD, and GBP.
Requirements
- Drupal 10.3 or Drupal 11
- PHP 8.1 or newer
- Key 1.22 or newer
- A Redsys merchant account
- HTTPS in production
- Webform 6.3 for the optional Webform integration
- Drupal Commerce 3 for the optional Commerce integration
Installation
Install the module with Composer:
`composer require drupal/redsys_button`
Create an authentication key under `/admin/config/system/keys`, configure Redsys under `/admin/config/system/redsys-settings`, and place the
Redsys payment form block where payments should be accepted.
Use cases
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 2.1.2 | Stable | 10–11 | Provides secure off-site Redsys payments without requiring Drupal Commerce, with payment links and optional Webform and Commerce integrations. | Aug 14, 2026 | |
| 2.1.1 | Stable | 10–11 | Secure off-site Redsys payments for Drupal, with standalone payment links and optional Webform and Commerce integrations. | Aug 14, 2026 | |
| 2.1.0 | Stable | 10–11 | Accept standalone payments and create secure payment links through Redsys, with optional Webform and Drupal Commerce integration. | Aug 14, 2026 | |
| 2.0.0 | Stable | 10–11 | Major release adding authenticated callbacks, auditable payment records, Webform support, and rebuilt Drupal Commerce gateways. | Aug 13, 2026 | |
| 1.0.2 | Stable | 9–11 | Added Bizum option payment | Jan 21, 2025 |