Skip to content

Redsys - Get Payment

This module allows querying the status of an operation (payment, preauthorization, refund) in the Redsys payment gateway using the order number.

FieldTypeRequiredDescription
credentials_idcredentialYesRedsys credentials
order_numberstringYesOrder number to query

This module requires Redsys type credentials with the following fields:

FieldDescription
merchant_codeMerchant code (FUC) provided by the bank
secret_keySHA-256 signing secret key
terminalTerminal number (default: 1)
test_modeTest mode (true/false)
{
"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"
}
StatusCodesDescription
approved0000-0099Operation approved
pending0900-0999Operation pending
rejectedOthersOperation rejected
ValueBrand
1VISA
2Mastercard
8Maestro
9American Express
22JCB
23Diners
ValueType
CCredit
DDebit
PPrepaid
{
"credentials_id": "redsys_tienda",
"order_number": "0001234567"
}
  • The query does not modify the operation status
  • Useful for verifying the result of redirect payments
  • Also allows obtaining additional card information
  • RedsysCreatePayment - Create a payment to later query
  • RedsysRefund - Refund a queried payment
  • RedsysCreatePreauthorization - Create preauthorization to later query