Skip to content

Redsys - Confirm Preauthorization

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.

FieldTypeRequiredDescription
credentials_idcredentialYesRedsys credentials
order_numberstringYesPreauthorization order number
amountnumberYesAmount to confirm (can be less)
currencyselectNoCurrency (978=EUR by default)
merchant_urlstringNoNotification URL

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,
"response_code": "0000",
"order": "0001234567",
"authorization_code": "654321",
"amount": 85.00,
"message": "Preautorización confirmada: 0001234567"
}
  1. Hotel preauthorizes 200 EUR at booking
  2. At checkout, confirms only 180 EUR (no minibar)
  3. The remaining 20 EUR are released automatically
  • 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
  • RedsysCreatePreauthorization - Create the initial preauthorization
  • RedsysCancelPreauthorization - Void instead of confirming
  • RedsysGetPayment - Check operation status