Setup
- Environment variables
- Direct config
isSandbox is inferred from NODE_ENV — set NODE_ENV=production for live mode.How it works
Redsys uses an inSite iframe flow — customers enter card details directly on your page via secure iframes hosted by Redsys, with no redirect to an external payment page.paykit.checkouts.create— generates HMAC-signed merchant parameters for the inSite iframe.- Frontend loads inSite — your page loads
redsysV3.jsand renders the card input form. - User enters card — Redsys returns an
operationIdvia callback. paykit.payments.create— your backend calls the Redsys REST API with theoperationIdto execute the charge.- Webhooks — Redsys POSTs server-side notifications to confirm payment status.
transactionType is set to '1' (pre-authorization).
Supported currencies: EUR, USD, GBP, JPY.
Frontend integration
Afterpaykit.checkouts.create, the checkout metadata includes everything the inSite iframe needs:
operationId in provider_metadata:
Webhooks
Redsys sends a POST withDs_MerchantParameters, Ds_Signature, and Ds_SignatureVersion. PayKit verifies the HMAC signature automatically before emitting events.
Raw Redsys events
Listen for native Redsys webhook data via theredsys.* namespace:
Refunds
metadata passed to paykit.refunds.create must include currency. The orderId is automatically extracted from the payment’s stored metadata.