Test Redsys payment functionality with test cards. Explore different payment methods, tokenization flows, advanced operations, and transaction management examples.
Payment Methods
Standard payment flow where customers are redirected to the Redsys payment gateway to complete their payment. After payment, customers are redirected back to your success or error pages.
Keep customers on your site with the Redsys inSite iframe. Dynamically load the gateway, capture idOper, and complete the authorization via REST without redirecting.
Dynamic Currency Conversion (DCC) allows foreign customers to pay in their local currency while you receive payment in your base currency. The customer will be offered currency conversion options during checkout.
Tokenization
For recurring payments and subscriptions where the merchant initiates transactions without customer presence. Uses COF type "M".
For one-click payments where customers are present and authorize each transaction. Uses COF types like "R" (recurring), "I" (initial), etc. Default is "R" for recurring one-click payments.
Advanced Operations
Validate card data without charging the cardholder using transaction type 7. The operation is valid for 90 days and only works with VISA and MasterCard. Confirm with type 8 to charge the cardholder later.
Reserve an amount without charging immediately using transaction type 1. The operation is valid for 7-30 days and only works with VISA and MasterCard. Confirm with type 2 to charge the cardholder later.
Transaction Management
Trigger total or partial refunds through trataPeticion REST using Redsys transaction type 3. Redsys responds with 0900 when the refund succeeds.
Cancel preauthorizations, authorizations, refunds or split confirmations by selecting Redsys transaction types 9, 45, 46 or 47. Success responses return 0400.
Test Cards
All cards use expiry date 12/49 and CVV 123. You can use any CVV different from 999 (except for special cases) and any future expiry date.
Important: Make sure your Virtual TPV is configured to point to the test environment (sandbox) and not production when testing. Check the official documentation for more information.
VISA EMV3DS 2.2 - Generic test card
Mastercard EMV3DS 2.1 - Generic test card
VISA Frictionless EMV3DS 2.1
VISA Frictionless 2.1 + threeDSMethodURL
VISA Challenge EMV3DS 2.1
VISA Challenge 2.1 + threeDSMethodURL
American Express SafeKey 1.0.2
Diners Club International 1.0.2
JCB JSecure 1.0.2
Special CVV cases: Use CVV 999, 172, 173 or 174 with the generic VISA card to simulate different types of denials. Check the documentation for more details.
Resources