Skip to main content

Setup

Required env vars:
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.
  1. paykit.checkouts.create — generates HMAC-signed merchant parameters for the inSite iframe.
  2. Frontend loads inSite — your page loads redsysV3.js and renders the card input form.
  3. User enters card — Redsys returns an operationId via callback.
  4. paykit.payments.create — your backend calls the Redsys REST API with the operationId to execute the charge.
  5. Webhooks — Redsys POSTs server-side notifications to confirm payment status.
Redsys doesn’t support customers, subscriptions, or retrieving/updating checkouts and payments. Capture is only available when transactionType is set to '1' (pre-authorization). Supported currencies: EUR, USD, GBP, JPY.

Frontend integration

After paykit.checkouts.create, the checkout metadata includes everything the inSite iframe needs:
Load the Redsys inSite script and render the form:
Then on your backend, pass operationId in provider_metadata:

Webhooks

Redsys sends a POST with Ds_MerchantParameters, Ds_Signature, and Ds_SignatureVersion. PayKit verifies the HMAC signature automatically before emitting events.
Redsys response codes and their PayKit event mappings:

Raw Redsys events

Listen for native Redsys webhook data via the redsys.* namespace:

Refunds

The metadata passed to paykit.refunds.create must include currency. The orderId is automatically extracted from the payment’s stored metadata.