CIT Tokenization Examples
Test Redsys CIT (Customer Initiated Transactions) tokenization functionality with test cards. CIT enables 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.
Step 1: First Payment with CIT Tokenization
Create a payment form that will request Redsys to generate a token for future one-click payments. After successful payment, the token will be returned in the notification.
Step 2: Extract CIT Token from Notification
After completing Step 1 and making a successful payment, the CIT token will be automatically extracted and logged in your server console. Copy the token from the logs and paste it below.
How to find the CIT token:
- Complete Step 1 and submit the CIT payment form
- Check your server console/terminal where Next.js is running
- Look for the log message that shows:
🔑 Token generated for order... - You'll also see card information like expiry date and last 4 digits
- Copy the token value from the log
- Paste it in the input field below
Example of what you'll see in your server console:
✅ Payment for order ORDER-123456 succeeded
🔑 Token generated for order ORDER-123456:
Token: 120c14ed9f7264383434fc1154559f1e2bcc2b1c
COF Transaction ID: 2006031152000
Card Expiry: 12/29
Card Last 4: 9123
Card Number: 454881******0003
📋 Copy this token to Step 2 in /examples/cit to test token paymentsStep 3: One-Click Payment with Existing CIT Token
Use the stored CIT token to make a one-click payment. The customer is present and authorizes each transaction. This is a Customer Initiated Transaction (CIT) for one-click payments.
Please enter a CIT token in Step 2 first.