π³ Card on File Transactions
Learn how to securely store customer payment credentials and enable one-click checkout experiences.
What is a Card on File Transaction?
A Card on File (COF) transaction uses payment credentials previously stored by Coinflow to process future payments. This enables customers to make purchases without re-entering their card details, creating a frictionless checkout experience.
π Customer Initiated Transactions (CIT)
Card on File transactions are also known as Customer Initiated Transactions (CIT) because the customer actively participates in making the payment at the point of authorization.
Key Characteristics
- Customer Participation Required: The customer actively initiates each payment using stored credentials
- No Fixed Schedule: Transactions occur on-demand rather than following a recurring schedule
- Explicit Permission: Requires customer consent to store card details for future use
- One-Click Experience: Reduces friction by eliminating the need to re-enter payment information
β Using Coinflowβs Prebuilt UI?
If youβre using Coinflowβs prebuilt UI components, customer consent and credential storage are automatically handled for you in compliance with card network requirements.
Card on File Mandate & Compliance
The growth of digital commerce has led to increased use of stored payment credentials. Card networks (Visa, Mastercard, etc.) have responded by introducing strict requirements and processes to protect both merchants and consumers.
Compliance Requirements
To ensure compliance with the stored credential mandate, you must:
Critical Compliance Steps
- Inform customers how their stored payment credentials will be used
- Obtain explicit permission from customers to store payment credentials
- Notify customers about any changes to terms of use
- Get consent for each transaction when initiating Card on File payments
Note: If using Coinflowβs Prebuilt UI, items 1-2 are automatically handled. You are always responsible for item 4.
Benefits of Card on File
Customers can complete purchases in seconds without re-entering payment details
Streamlined checkout experiences lead to improved conversion rates
Makes repeat purchases easier, encouraging customer loyalty
Coinflow handles PCI-compliant storage of sensitive payment data
How It Works
Customer Makes Initial Purchase
Customer completes their first transaction and opts in to save their payment credentials for future purchases.
Coinflow Securely Stores Credentials
Payment details are tokenized and stored securely in Coinflowβs PCI-compliant vault.
Card on File vs. Subscriptions vs. Merchant Initiated Transactions
Understanding the differences between payment types helps ensure compliance and proper implementation:
π‘ Need Recurring Billing?
If you need automated recurring payments on a schedule, check out our Subscriptions Overview documentation.
Implementation Guide
Implementing Card on File checkout is a two-step process:
- Initial Purchase - Store the customerβs payment credentials
- Subsequent Purchases - Use the stored credentials for future transactions
Step 1: Create Initial Card Payment
For the customerβs first purchase, use either the Card Checkout or Token Checkout endpoint to process the payment and store their credentials.
Option A: Card Checkout
Use this endpoint when you have raw card details from the customer:
View Card Checkout API Reference
Option B: Token Checkout
Use this endpoint when you have a tokenized card (e.g., from a previous tokenization):
View Token Checkout API Reference
Save the Payment ID or Card Token
After a successful initial purchase, you can reference the card for future Card on File transactions using either:
- The
paymentIdfrom the response (to use a specific transaction as the velocity limit reference) - The
tokenfrom the response (system will automatically use the most recent CVV-verified transaction)
Save whichever identifier fits your implementation best.
Step 2: Make Card on File Purchases
For subsequent purchases, use the Card on File Checkout endpoint with either the original payment ID or the card token.
View Card on File Checkout API Reference
Request Parameters:
You must provide one of the following to identify the saved card:
originalPaymentId- The payment ID from a specific CVV-verified transactiontoken- The card token (system automatically finds the most recent CVV-verified transaction for velocity validation)
Using Card Token vs. Payment ID
When you pass a token instead of an originalPaymentId, Coinflow automatically locates the most recent CVV-verified transaction for that card token and uses it to validate velocity limits (transaction count, amount multiplier, and expiration window).
This is useful when you want to use a saved card without tracking individual payment IDsβjust pass the card token and the system handles the rest.
Example Request with Original Payment ID:
Example Request with Card Token:
Step 3: Handle Chargeback Protection (If Enabled)
Required for Chargeback Protection
If you have chargeback protection enabled, you must collect and send the nSure device ID with your Card on File checkout requests.
Add nSure SDK to Your Application:
Web Applications
- Add the nSure SDK script to every page:
- Get the device ID and include it in the API request:
React Applications
- Add the
<CoinflowPurchaseProtection>component to every page:
- Get the device ID from the componentβs context and include it in your API calls.
Include chargebackProtectionData:
Step 4: Handle 3DS Challenges (If Enabled)
Required for 3DS-Enabled Transactions
If 3D Secure (3DS) authentication is required, you must handle the 3DS challenge flow before the payment can be completed.
When a Card on File transaction requires 3DS authentication, the API will return a response indicating that 3DS verification is needed.
3DS Challenge Flow:
- Detect 3DS Required: Check the response for HTTP Code 412
- Present Challenge: Display the 3DS challenge iframe to the customer
- Complete Authentication: Wait for customer to complete verification
- Retry Payment: Submit the payment again with 3DS authentication data
Example React Implementation:
Complete Example
Hereβs a complete example showing all components together:
Merchant Configuration Settings
Card on File functionality includes several configurable settings that control how and when stored credentials can be used. These settings help you manage security, fraud prevention, and compliance.
Configuration Required
Card on File must be enabled on your merchant account before you can accept Card on File payments. Contact your Coinflow integration representative to configure these settings.
Available Configuration Options
Your Coinflow integration team will configure the following Card on File settings for your merchant account:
Velocity Controls:
maxCount- Maximum number of Card on File payments allowed within a time periodperiod- Time window in seconds for the maxCount limit (e.g., 86400 for 24 hours)
Payment Limits:
maxMultiple- Maximum multiplier for Card on File transaction amounts compared to the original payment (e.g., 3x means a Card on File payment can be up to 3Γ the original payment amount)
Time-Based Restrictions:
expiration- Time window in seconds during which an original payment can be used as a Card on File reference (e.g., 86400 for 24 hours)
Example Configuration
This configuration means:
- β Card on File is enabled
- β Maximum 5 Card on File payments per 24 hours per original payment
- β Card on File payments can be up to 3Γ the original payment amount
- β Original payments can be referenced for 24 hours after initial transaction
Error Handling
Understanding and properly handling Card on File errors is critical for a smooth customer experience.
Common Error Codes
403 Forbidden - Card on File Not Enabled
Error Message:
Cause: Card on File functionality is not enabled on your merchant account.
Resolution:
- Contact your Coinflow integration representative to enable Card on File
- Once enabled, configure the appropriate settings for your use case
400 Bad Request - Mobile Wallet Payments
Error Message:
Cause: Youβre attempting to use a mobile wallet payment (Apple Pay, Google Pay) as the original payment for Card on File.
Resolution:
- Mobile wallet payments cannot be used as Card on File references
- Use a regular card payment as the initial transaction
- For mobile wallet payments, customers must authenticate each time
400 Bad Request - Using Card on File as Original Payment
Error Message:
Cause: Youβre attempting to use a Card on File payment as the original payment reference for another Card on File transaction.
Resolution:
- Only use the initial payment (with CVV verification) as the
originalPaymentId - Do not chain Card on File transactions
- Always reference back to the first payment in the chain
410 Gone - Maximum Payments Reached
Error Message:
Cause: The customer has exceeded the maximum number of Card on File payments allowed within the configured time period.
What This Means:
- The original payment reference can no longer be used
- This is a security measure to prevent abuse
- Based on your merchantβs
maxCountandperiodsettings
Resolution Options:
-
Option A: Show Coinflow Prebuilt UI
- Present Coinflowβs checkout UI to the customer
- Customer will re-enter their card details with CVV verification
- Creates a new original payment reference
-
Option B: Reassociate Card via API
- Direct the customer to verify their card again
- Process a new card payment with CVV (
/api/checkout/token/{merchantId}) - Use this new payment as the original payment reference going forward
Recommended Approach
Show a friendly message: βFor security, please verify your card detailsβ and present the Coinflow checkout UI for re-verification.
410 Gone - Original Payment Expired
Error Message:
Cause: Too much time has passed since the original payment was created. The payment reference has expired based on your merchantβs expiration setting.
What This Means:
- Original payment references are only valid for a configured time period
- This prevents using very old payments as references
- Based on your merchantβs
expirationsetting (in seconds)
Resolution Options:
-
Option A: Show Coinflow Prebuilt UI
- Present Coinflowβs checkout UI to the customer
- Customer will re-enter their card details with CVV verification
- Creates a fresh original payment reference
-
Option B: Reassociate Card via API
- Process a new card payment with CVV (
/api/checkout/card/{merchantId}) - Save this new payment ID as the original payment reference
- Use for future Card on File transactions
- Process a new card payment with CVV (
Proactive Approach
Track when original payments are approaching expiration and prompt customers to re-verify their cards before expiration occurs.
410 Gone - Payment Over Maximum Total
Error Message:
Cause: The Card on File payment amount exceeds the configured multiplier of the original payment amount.
Example:
- Original payment: $10.00
- Multiplier setting: 3
- Maximum allowed: $30.00
- Your request: $35.00 β
What This Means:
- Prevents significantly larger charges than the customer originally authorized
- Based on your merchantβs
maxMultiplesetting - Security measure to protect customers from unexpected large charges
Resolution Options:
-
Option A: Show Coinflow Prebuilt UI for Full Amount
- Present Coinflowβs checkout UI with the full purchase amount
- Customer re-enters card details and authorizes the larger amount
- Creates a new original payment reference at the higher amount
-
Option B: Split the Payment
- Use Card on File for the maximum allowed amount
- Request separate authorization for the remaining balance
- Clearly communicate to customer why verification is needed
-
Option C: Reassociate Card at Higher Amount
- Process a new card payment at or above the desired amount (
/api/checkout/card/{merchantId}) - Use this payment as the new original payment reference
- Future Card on File payments can be up to the multiplier of this new amount
- Process a new card payment at or above the desired amount (
Customer Communication
When a payment exceeds limits, explain clearly: βThis purchase amount requires additional verification. Please confirm your payment details.β
Handling 410 Errors - Quick Reference
All 410 Gone errors indicate that the original payment reference can no longer be used. Hereβs what to do:
Best Practice
Always catch 410 errors and provide a seamless re-verification flow. Customers should never see raw error messages - instead, guide them to verify their payment method with clear, friendly messaging.
Best Practices
Clearly Communicate Storage Intent
Make it obvious to customers that their payment method will be saved and how it will be used. Use clear checkbox labels like βSave this card for faster checkoutβ rather than pre-checked boxes.
Provide Easy Management
Give customers a way to view, update, and delete their stored payment methods through their account settings.
Confirm Each Purchase
Always show customers a clear confirmation screen before processing a Card on File payment, including the amount and saved payment method being used.
Frequently Asked Questions
Can customers have multiple cards on file?
Yes, customers can store multiple payment methods. Your implementation should allow them to select which saved card to use for each purchase.
How is Card on File different from tokenization?
Tokenization is the security mechanism used to safely store card details. Card on File refers to the business flow of using those stored credentials for future purchases with customer consent.
Are there additional fees for Card on File?
No, Card on File transactions are processed with the same fee structure as regular card transactions. There are no additional charges for storing payment credentials.

