Redsys - Get Payment
Description
Section titled “Description”This module allows querying the status of an operation (payment, preauthorization, refund) in the Redsys payment gateway using the order number.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credential | Yes | Redsys credentials |
| order_number | string | Yes | Order number to query |
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, "order": "0001234567", "response_code": "0000", "status": "approved", "amount": 100.00, "currency": "978", "authorization_code": "123456", "card_brand": "1", "card_country": "724", "card_type": "D", "transaction_type": "0", "date": "15/01/2024", "hour": "10:30", "message": "Consulta de pedido 0001234567: approved"}Possible Statuses
Section titled “Possible Statuses”| Status | Codes | Description |
|---|---|---|
| approved | 0000-0099 | Operation approved |
| pending | 0900-0999 | Operation pending |
| rejected | Others | Operation rejected |
Card Brand (card_brand)
Section titled “Card Brand (card_brand)”| Value | Brand |
|---|---|
| 1 | VISA |
| 2 | Mastercard |
| 8 | Maestro |
| 9 | American Express |
| 22 | JCB |
| 23 | Diners |
Card Type (card_type)
Section titled “Card Type (card_type)”| Value | Type |
|---|---|
| C | Credit |
| D | Debit |
| P | Prepaid |
Usage Example
Section titled “Usage Example”{ "credentials_id": "redsys_tienda", "order_number": "0001234567"}API Used
Section titled “API Used”- API: Redsys REST API
- Transaction type: Query
- Documentation: https://pagosonline.redsys.es/conexion-rest.html
- The query does not modify the operation status
- Useful for verifying the result of redirect payments
- Also allows obtaining additional card information
Related Nodes
Section titled “Related Nodes”- RedsysCreatePayment - Create a payment to later query
- RedsysRefund - Refund a queried payment
- RedsysCreatePreauthorization - Create preauthorization to later query