Redsys - Refund
Description
Section titled “Description”This module allows performing full or partial refunds of payments previously made through the Redsys payment gateway. Partial refunds are cumulative up to the total amount of the original payment.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credential | Yes | Redsys credentials |
| order_number | string | Yes | Original order number |
| amount | number | Yes | Amount to refund in euros |
| 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": "789012", "amount": 50.00, "message": "Devolución realizada: 0001234567 por 50€"}Usage Example
Section titled “Usage Example”- Customer purchases a product for 100 EUR
- Returns an item worth 30 EUR
- A partial refund of 30 EUR is made
- Later returns another item worth 70 EUR
- A second refund for 70 EUR is made (total refunded: 100 EUR)
API Used
Section titled “API Used”- API: Redsys REST API
- Transaction type: 3 (Refund)
- Documentation: https://pagosonline.redsys.es/conexion-rest.html
- Only confirmed/authorized payments can be refunded
- Partial refunds are cumulative
- The total refunded amount cannot exceed the original payment
- Refund processing time depends on the issuing bank (1-10 business days)
- Some banks allow refunds up to 180 days after payment
Related Nodes
Section titled “Related Nodes”- RedsysCreatePayment - Create the original payment
- RedsysGetPayment - Check payment status before refunding
- RedsysRecurringPayment - Recurring payments that may require refunds