Redsys Component Library
A comprehensive collection of blocks, components and utilities for integrating Redsys payments into your Next.js applications.
Built with shadcn/ui components, Server Actions
and powered by redsys-easy
Available Components
Everything you need to build a complete Redsys payment integration
Backend Services
Core service for signing Redsys requests and configuration.
UI Blocks
Checkout, tokenization, refunds, cancellations, authentication, DCC, and more.
Payment & Checkout
Redirect and inSite checkout forms, payment actions, result blocks, and DCC payment flows.
Authentication
Actions and forms for authenticating cards and handling confirmation flows.
Preauthorization
Actions and forms for creating preauthorizations and confirming them later.
Tokenization
Components and actions for MIT, CIT, and inSite card tokenization and token-based payments.
MIT (Merchant Initiated Transactions)
Tokenization and payment flows for merchant-initiated transactions.
CIT (Customer Initiated Transactions)
Tokenization and one-click payment flows for customer-initiated transactions.
inSite Tokenization
Embedded inSite tokenization forms and actions that request Redsys COF tokens.
Transaction Management
Forms and actions for refunds, cancellations, and other transaction operations.
Pages & Endpoints
Webhook notification endpoint and post-payment result pages.
Notification Endpoint
API route for validating Redsys notifications. Includes tokenization utilities for COF (CIT and MIT) tokenized payments.
Success Page
Page wired to the success redirect that renders the shared PaymentResult component with a confirmed payment state and key transaction details.
Error Page
Page wired to the error redirect that renders the shared PaymentResult component with a failed payment state and error context.
Features
Type-Safe
Built with TypeScript and fully typed for a better developer experience.
Next.js Ready
Optimized for Next.js App Router with Server Actions, server and client components.
Easy Integration
Drop-in components that work out of the box with minimal configuration.
shadcn/ui Components
Built with shadcn/ui components for beautiful, accessible, and customizable UI elements.
Powered by redsys-easy
Built on top of the reliable redsys-easy library for secure payment processing.
Tokenization Support
Full support for tokenization, MIT (Merchant Initiated Transactions), and CIT (Customer Initiated Transactions) for one-click payments using Server Actions, following Redsys official documentation.
Authentication Operations
Validate card data without charging the cardholder (transaction type 7) and confirm later (type 8). Valid for 90 days, works with VISA and MasterCard only.
Preauthorization Operations
Reserve amounts without charging immediately (transaction type 1) and confirm later (type 2). Valid for 7-30 days, works with VISA and MasterCard only.
Refunds & Cancellations
Built-in forms and server actions to automate Redsys refunds and annulments (transaction types 3, 9, 45, 46, 47) via REST trataPeticion calls.
Dynamic Currency Conversion (DCC)
Enable currency conversion during checkout for foreign customers. Customers can pay in their local currency while you receive payment in your base currency.