One-Time Purchase Integration - EVM Contract Settlement

Accept credit card payments and settle USDC directly to your EVM smart contract

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

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)

Choose Your Implementation


3DS Authentication

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


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 partnerId = COINFTEST when configuring the protection script.


Next Steps