For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
RegisterLoginSandbox Login
GuidesRecipesAPI Reference
GuidesRecipesAPI Reference
  • Product Overview
    • Products & Features
    • Key Concepts
  • Getting Started
    • Account Setup
    • Quickstart
  • Checkout
      • Getting Started with Implementation
        • Settlement to Coinflow Wallet
          • Credit Purchase - USDC to Coinflow Wallet
          • One-Time Purchase - USDC to 3rd Party
          • Credit Purchase - USDC to Coinflow/BYO Wallet (Solana)
          • Credit Purchase - USDC to BYO Wallet (EVM)
          • Credit Purchase - USDC to Solana Contract
          • Credit Purchase - USDC to EVM Contract
          • One-Time Purchase - USDC to EVM Contract
          • One-Time Purchase - USDC to Solana Contract
          • One-Time Purchase - USDC to Stellar Contract
          • One-Time Purchase - Direct USDC Transfer (Stellar)
      • Mobile App Payments
    • Settlement Locations
  • Payouts
    • Payout Overview
    • What is a Payout
  • Subscriptions
    • Subscriptions Overview
  • Marketplaces
    • Marketplace Overview
    • How Marketplaces Work
    • Marketplaces Webhooks
    • Marketplaces Implementation
  • Developer Resources
    • Custom Branding
    • Checkout Implementation
    • Webhooks
  • Merchant Dashboard
    • Login & Account Access
    • Users and Roles
    • Rate Limits
    • Developer Contact
LogoLogo
RegisterLoginSandbox Login
On this page
  • Prerequisites
  • Quick Reference
  • Choose Your Implementation
  • Step 1: Generate the checkout link
  • Step 2: Use the checkout link
  • Step 3: Handle success events
  • Step 1: Install the SDK
  • Step 2: Tokenize checkout parameters
  • Step 3: Render the checkout component
  • Step 4: Configure your dashboard
  • Step 1: Get a session key
  • Step 2: Get pricing totals
  • Step 3: Tokenize the credit card
  • Step 4: Tokenize checkout parameters
  • Step 5: Process the payment
  • Step 6: Verify the payment (optional)
  • 3DS Authentication
  • Chargeback Protection
  • Send user events
  • Required headers for checkout
  • Next Steps
CheckoutImplementation OverviewImplementation GuidesAdvanced use cases

One-Time Purchase Integration - EVM Contract Settlement

Accept credit card payments and settle USDC directly to your EVM smart contract
Was this page helpful?
Previous

One-Time Purchase Integration - Solana Contract Settlement

Accept credit card payments and settle USDC directly to your Solana smart contract
Next
Built with

This page is for advanced / cryptocurrency-native companies. If that’s not you, head back to the Quickstart for the standard flows.

This guide walks you through integrating Coinflow checkout to accept one-time credit card purchases with USDC settlement to your whitelisted EVM contract (Base, Polygon, Arbitrum, etc.).

Prerequisites

Complete these steps before starting the integration.

1

Create your sandbox account

Register or login to your sandbox merchant account

2

Generate API keys

Create a sandbox API key for authentication

3

Add chargeback protection

Add the protection script to every page of your app

4

Whitelist your contract

Whitelist your EVM contract address for settlement.

Quick Reference

Authorization Headers
HeaderDescription
AuthorizationYour API key from the merchant dashboard
x-coinflow-auth-user-idUnique customer ID from your system
x-coinflow-auth-session-keyJWT token authorizing the payer (valid 24 hours)
Helpful Resources
  • Test card numbers for sandbox
  • Checkout webhooks
  • Custom branding

Choose Your Implementation

Checkout Link
React SDK
API Only

Best for simple integrations. Generate a hosted checkout URL to redirect users or embed in an iframe.

Step 1: Generate the checkout link

$ curl -X POST https://api-sandbox.coinflow.cash/api/checkout/link \
> -H "x-coinflow-auth-user-id: payer123" \
> -H "Authorization: YOUR_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "email": "payer123@gmail.com",
> "subtotal": {
> "cents": 500,
> "currency": "USD"
> },
> "blockchain": "polygon",
> "transactionData": {
> "transaction": {
> "data": "0x...",
> "to": "0x..."
> }
> }
>}'

Step 2: Use the checkout link

Embed in an iframe

1<iframe
2 allow="payment"
3 src="CHECKOUT_LINK_FROM_STEP_1"
4 style="width: 100%; height: 600px; border: none;"
5/>

Step 3: Handle success events

Listen for payment completion when using an iframe:

1window.addEventListener('message', (event) => {
2 if (typeof event.data === 'string') {
3 const data = JSON.parse(event.data);
4 if (data.data === 'success') {
5 console.log('Payment ID:', data.info.paymentId);
6 // Handle successful payment
7 }
8 }
9});

3DS Authentication

After implementing basic checkout, add 3DS for enhanced security. Contact Coinflow to enable 3DS on your account.

Complete Checkout with 3DS Challenge

Learn how to add 3DS to your new card and saved card requests


Chargeback Protection

Improve approval rates and reduce fraud by sharing payer events with Coinflow.

Send user events

Track key user actions throughout their journey on your app.

$curl --request POST \
> --url https://api-sandbox.coinflow.cash/api/events \
> --header 'Authorization: YOUR_API_KEY' \
> --header 'content-type: application/json' \
> --data '{
> "eventType": "SignUp",
> "customerId": "user-123-abc",
> "country": "US",
> "username": "johndoe",
> "email": "john@example.com",
> "firstName": "John",
> "lastName": "Doe"
> }'

Required headers for checkout

When processing payments, include these headers for chargeback protection:

HeaderDescription
x-device-idDevice ID from the chargeback protection script
x-coinflow-client-ipCustomer’s IPv4 address
user-agentCustomer’s browser user agent

On sandbox, use the test partnerId provided by the Coinflow team when configuring the protection script.


Next Steps

Test Your Integration

Use sandbox test cards to verify your implementation

Configure Webhooks

Receive real-time payment notifications

Go Live

Create your production merchant account

API Reference

Explore the complete API documentation