Redsys - Confirm Preauthorization
Description
Section titled “Description”This module allows confirming (capturing) an existing preauthorization in Redsys, effectively charging the held funds to the customer. It can be confirmed for an amount equal to or less than the preauthorized amount.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credential | Yes | Redsys credentials |
| order_number | string | Yes | Preauthorization order number |
| amount | number | Yes | Amount to confirm (can be less) |
| currency | select | No | Currency (978=EUR by default) |
| merchant_url | string | No | Notification URL |
Credentials
Section titled “Credentials”This module requires Redsys type credentials with the following fields:
| Field | Description |
|---|---|
merchant_code | Merchant code (FUC) provided by the bank |
secret_key | SHA-256 signing secret key |
terminal | Terminal number (default: 1) |
test_mode | Test mode (true/false) |
Output
Section titled “Output”{ "success": true, "response_code": "0000", "order": "0001234567", "authorization_code": "654321", "amount": 85.00, "message": "Preautorización confirmada: 0001234567"}Usage Example
Section titled “Usage Example”- Hotel preauthorizes 200 EUR at booking
- At checkout, confirms only 180 EUR (no minibar)
- The remaining 20 EUR are released automatically
API Used
Section titled “API Used”- API: Redsys REST API
- Transaction type: 2 (Preauthorization confirmation)
- Documentation: https://pagosonline.redsys.es/conexion-rest.html
- The order number must be the same as the original preauthorization
- The amount can be equal to or less than the preauthorized amount
- If confirmed for a lower amount, the difference is released
- It cannot be confirmed for an amount greater than preauthorized
- Confirmation must be done before the preauthorization expires
Related Nodes
Section titled “Related Nodes”- RedsysCreatePreauthorization - Create the initial preauthorization
- RedsysCancelPreauthorization - Void instead of confirming
- RedsysGetPayment - Check operation status