Powered by Coinflow
Payments · Documentation
Operational

How To: Implement Pay-Ins on Marketplaces (API)

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

Coinflow’s marketplace API uses regulated stablecoin rails under the hood. Throughout this page you’ll see fields like wallets.solana, cryptoPayinSettings, settlementToken: "USDC", and paysGasFees in API responses — most marketplaces can ignore them. They’re only relevant if you’re configuring on-chain settlement. The flow you’ll typically implement is: pay-in (card or ACH) → seller balance → seller payout.

Registration

In Coinflow’s marketplace, each seller must have a seller account (to receive payments) and a withdrawer account (to withdraw funds).

Creating a Seller Session Key

Creating a session key is necessary to make client to server calls. The x-coinflow-auth-blockchain and x-coinflow-auth-wallet headers are required because Coinflow uses stablecoin rails under the hood — you can hard-code solana here.

curl --location 'https://api-sandbox.coinflow.cash/api/auth/session-key' \
--header 'Authorization: YOUR_API_KEY' \
--header 'accept: application/json' \
--header 'x-coinflow-auth-blockchain: solana' \
--header 'x-coinflow-auth-wallet: CVrsREanmfBAeZH14PXrBzw4wF8Eh12PJDHYq2feoxUq'
{
    "key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3YWxsZXQiOiJDVnJzUkVhbm1mQkFlWkgxNFBYckJ6dzR3RjhFaDEyUEpESFlxMmZlb3hVcSIsImJsb2NrY2hhaW4iOiJzb2xhbmEiLCJtZXJjaGFudElkIjoidGFzaGFtYXJrZXQiLCJpYXQiOjE3NTA3MTEyNjcsImV4cCI6MTc1MDc5NzY2N30.Wq1wTl9FXGNADnVdqUaS6sCo0uXLzj2NnfBYAnJr420"
}

Seller Registration

Seller creation no longer accepts a raw parentId in the request body. Authenticate Create Seller requests with your marketplace API key — the parent marketplace is derived from the key. Hosted registration links minted through the Get Seller Registration Link endpoint continue to work without changes; they now carry a signed onboardingToken instead of a parentId.

  1. Create a Seller This endpoint creates a Seller in your registered marketplace. Pass your API key in the Authorization header — your marketplace is identified from the key, so no parentId is needed.

    curl --location 'https://api-sandbox.coinflow.cash/api/seller' \
    --header 'Authorization: YOUR_API_KEY' \
    --header 'accept: application/json' \
    --header 'content-type: application/json' \
    --data-raw '
    {
      "individual": true,
      "email": "tasha+sellerAA@coinflowlabs.app",
      "sellerId": "sellerAA",
      "country": "IT"
    }
    '
    {
        "verification": {
            "hash": "42516ab2-d49b-4659-8347-a2d2ed3ca66b",
            "reference": "inq_8iTfTTaf1Bba1bdk6C291s8CVQjY",
            "status": "pending"
        },
        "verificationLink": "https://verify.coinflow.cash/verify?inquiry-id=inq_8iTfTTaf1Bba1bdk6C291s8CVQjY&redirect-uri=https%3A%2F%2Fsandbox-merchant.coinflow.cash%2Fseller%2Flogin",
        "redirectLink": "https://sandbox-merchant.coinflow.cash/seller/login"
    }
    curl --request POST \
         --url https://api-sandbox.coinflow.cash/api/seller \
         --header 'Authorization: YOUR_API_KEY' \
         --header 'accept: application/json' \
         --header 'content-type: application/json' \
         --data '
    {
      "business": true,
      "info": {
        "email": "tasha+usseller@coinflowlabs.app",
        "firstName": "tasha",
        "surName": "test",
        "physicalAddress": "201 e randolph st",
        "city": "chicago",
        "state": "il",
        "zip": "60601",
        "country": "US",
        "dob": "19900101",
        "ssn": "1234"
      },
      "individual": true,
      "email": "tasha+usseller@coinflowlabs.app",
      "sellerId": "usseller"
    }
    '
    OK
  2. Get Merchant Use this endpoint to reference the seller’s account data. The typical fields a marketplace developer reads are merchantId, verification, withdrawFees, apiKey, and settlementAddresses. The full response includes on-chain settlement fields (wallets, cryptoPayinSettings, paysGasFees) — most marketplaces can ignore them.

    curl --location 'https://api-sandbox.coinflow.cash/api/merchant/v2' \
    --header 'x-coinflow-submerchant-id: sellerAA' \
    --header 'Authorization: YOUR_API_KEY' \
    --header 'accept: application/json'

    Advanced: full merchant response (includes on-chain settlement fields)

    {
        "merchant": {
            "colors": {
                "style": "rounded"
            },
            "wallets": {
                "solana": {
                    "feePayer": "242fc2874c4620a28ea14f06365baa51082faf001c16dc5f09d5fee23d526ef3ffa57c1c63c51aa8f284dd164becf35f53ac895aa5e013518a6db66440bea6a72df25c8a5ec07b2fcfab8b4ab06446b446047c02c50765ab544553bfec7c33c1",
                    "usdcPayer": "7b23db13a257d79c3459f02fbe517aee43fcc2311502dd29d2613c8467508644b7cd92be0cf0a5c0a4b31f2e0bf843ca6ecc8111e42460a9d52cd51d1a763f6c86cb716fd06c736e757b0df126640e007b70cee27fc2c263ab07d8beeb2750ff"
                },
                "evm": {
                    "feePayer": "5539472cf865b99f127138970382864dd837bdc8b8422fce553d4fe0968d0a6dba8c1b7c714398eba7a772268e6b516dbdd81256cc36edeac83e411d309878c4cce85206ad2e533700816454c6c31094",
                    "usdcPayer": "c703ca551658c043638bccf251c2ddd491bd23d3fc52a9fd11156e8bccf7a2aa5f1279187ef0060adbfc958b9bc4f8f1f0539529fd1058a91e44637a9aaf43e5109d92e8989d28290e099179ff14fa7b"
                }
            },
            "settlementAddresses": {
                "solana": "CVrsREanmfBAeZH14PXrBzw4wF8Eh12PJDHYq2feoxUq",
                "recipientAddresses": []
            },
            "cardSettings": {
                "processor": "mock",
                "applePayProcessor": "mock",
                "googlePayProcessor": "mock",
                "paysFees": false,
                "paysGasFees": false,
                "customerEmailNotifications": false,
                "merchantEmailNotifications": false,
                "supportsGooglePay": true,
                "supportsApplePay": true,
                "saveCardDefault": true,
                "ignoreProcessorLimit": false,
                "disable3DSOverride": true,
                "avsCheck": true,
                "threeDsChallengePreference": "NoPreference"
            },
            "achSettings": {
                "processor": "mock",
                "paysFees": false,
                "allowDelayedTransactions": false,
                "customerEmailNotifications": false,
                "merchantEmailNotifications": false,
                "instantSettle": false
            },
            "pixSettings": {
                "paysFees": false,
                "customerEmailNotifications": false,
                "merchantEmailNotifications": false
            },
            "ibanSettings": {
                "paysFees": false,
                "customerEmailNotifications": false,
                "merchantEmailNotifications": false
            },
            "cryptoPayinSettings": {
                "stables": {
                    "feeBps": 50,
                    "paysFees": false,
                    "enabled": true
                },
                "majors": {
                    "feeBps": 100,
                    "paysFees": false,
                    "enabled": true
                },
                "volatile": {
                    "feeBps": 600,
                    "paysFees": false,
                    "enabled": true
                },
                "enabled": false,
                "maxGasFeePayment": {
                    "cents": 0,
                    "currency": "USD"
                },
                "coinbaseDisabled": false
            },
            "nSureSettings": {
                "nSureFixedFee": {
                    "cents": 37
                },
                "nSureInsurance": false,
                "nSureAchInsurance": false,
                "enableOverrideReview": false,
                "overrideReviewHours": 24,
                "nSureVariableFeeBps": 100
            },
            "blockConfig": {
                "failedPaymentAttemptLimit": 3
            },
            "withdrawFeePayment": {
                "paysGasFees": {
                    "polygon": false,
                    "eth": false,
                    "base": false,
                    "arbitrum": false,
                    "solana": false
                },
                "paysWithdrawFees": false
            },
            "refundBalanceLimit": {
                "cents": 500000
            },
            "_id": "6859b7bb10763eff46a28187",
            "merchantId": "sellerAA",
            "verification": {
                "hash": "42516ab2-d49b-4659-8347-a2d2ed3ca66b",
                "reference": "inq_8iTfTTaf1Bba1bdk6C291s8CVQjY",
                "status": "approved"
            },
            "withdrawFees": {
                "swapBps": 50,
                "user": {
                    "asap": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 200,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        }
                    },
                    "same_day": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        }
                    },
                    "standard": {
                        "fixed": {
                            "cents": 100,
                            "currency": "USD"
                        },
                        "variableBps": 0,
                        "minimum": {
                            "cents": 0,
                            "currency": "USD"
                        }
                    },
                    "card": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 200,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        }
                    },
                    "iban": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        }
                    },
                    "pix": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        }
                    },
                    "eft": {
                        "fixed": {
                            "cents": 100,
                            "currency": "USD"
                        },
                        "variableBps": 0,
                        "minimum": {
                            "cents": 0,
                            "currency": "USD"
                        }
                    }
                },
                "business": {
                    "asap": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 200,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        }
                    },
                    "same_day": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 100,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    },
                    "standard": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 50,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    },
                    "card": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 0,
                        "minimum": {
                            "cents": 0,
                            "currency": "USD"
                        }
                    },
                    "iban": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    },
                    "pix": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    },
                    "eft": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 50,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    }
                }
            },
            "customWithdrawFees": {
                "isBundled": false,
                "lineItemLabel": "Service Charge",
                "global": {
                    "coverProcessingFees": false,
                    "isFixed": true,
                    "currency": "USD",
                    "cents": 0,
                    "percent": null
                }
            },
            "apiKey": "afc1364e-0bac-4bf1-abbd-8b5b7de637e2",
            "apiKeys": [],
            "kycType": "both",
            "liquidityNotifications": [],
            "settlementToken": "USDC",
            "users": [
                {
                    "email": "tasha+sellerAA@coinflowlabs.app",
                    "scope": "seller",
                    "_id": "6859b7bb10763eff46a28188"
                }
            ],
            "ubos": [],
            "goLiveChecklist": {
                "programWhitelistRequests": []
            },
            "hideBranding": false,
            "onlyShowTotal": false,
            "skipSendWithdrawEmail": false,
            "pushToCardEnabled": true,
            "requireAniCheck": false,
            "bankPayoutProvider": [
                "aptpay"
            ],
            "rtpPayoutProvider": "dwolla",
            "parent": "6849d9a8407a105f5c5dc1fc",
            "creditSeed": "tashamarket",
            "withdrawSettlementLocation": "circle",
            "enforceJwt": true,
            "enforceCheckoutJwt": false,
            "externalVerificationLinks": false,
            "whitelistedAncestorUrls": [],
            "banDuplicateAccounts": true,
            "allowAttestedKyc": false,
            "__v": 1
        }
    }
    curl --location 'https://api-sandbox.coinflow.cash/api/merchant/v2' \
    --header 'x-coinflow-submerchant-id: usseller' \
    --header 'Authorization: YOUR_API_KEY' \
    --header 'accept: application/json'

    Advanced: full merchant response — US Seller (includes on-chain settlement fields)

    {
        "merchant": {
            "colors": {
                "style": "rounded"
            },
            "wallets": {
                "solana": {
                    "feePayer": "b8898b9c0f4615a7917fc915ea3db82625d70769a2e0ec7edd520c12bd7a9266aef9d2efb98d297c7f5ff78a3908272264731891c16414a53d05142ae72cb099c5cbf16dd04f1c2b3a8503f751cb672b4228c10edc8b2420017915f6e4bce4eb",
                    "usdcPayer": "26c3f323b26c104f826dc2df33dc27aadbe939cf06de178cd503a03804ea58d8f697ed630ea757d49c64cf9ed30574f4297bc88a9ebd7abe788e6a3eaeb3f838930f449d856558c30cbb56bd81bbe0ee5e10028783e1a27e0fbae1cc7215c7c4"
                },
                "evm": {
                    "feePayer": "6101094cfbb183d342bbec088c646625eb48e66081062a825c951cdb3a04d636d267f7f1b2cbe10d844157e96727c1f91f4a21ce1aee89e01628c7e3fd390fbf178b4a4ef7daaea36812b31c977cc95e",
                    "usdcPayer": "827205dab06cc539897888add0f6e66ad565f1ae15162e4fcce821f9bb18ac92dccea00ec9d2d6d18fcdf81a3fc581ae9c7a2b3cf09cc53a4c5a2080d9dd6425ca725fb588e672ca0530d2b5961f64a5"
                }
            },
            "settlementAddresses": {
                "solana": "BWeSjNQyEgyU2hxtmfAagk3jRk4S3mtFJhmUPYAGfoJ6",
                "recipientAddresses": []
            },
            "cardSettings": {
                "processor": "mock",
                "applePayProcessor": "mock",
                "googlePayProcessor": "mock",
                "paysFees": false,
                "paysGasFees": false,
                "customerEmailNotifications": false,
                "merchantEmailNotifications": false,
                "supportsGooglePay": true,
                "supportsApplePay": true,
                "saveCardDefault": true,
                "ignoreProcessorLimit": false,
                "disable3DSOverride": true,
                "avsCheck": true,
                "threeDsChallengePreference": "NoPreference"
            },
            "achSettings": {
                "processor": "mock",
                "paysFees": false,
                "allowDelayedTransactions": false,
                "customerEmailNotifications": false,
                "merchantEmailNotifications": false,
                "instantSettle": false
            },
            "pixSettings": {
                "paysFees": false,
                "customerEmailNotifications": false,
                "merchantEmailNotifications": false
            },
            "ibanSettings": {
                "paysFees": false,
                "customerEmailNotifications": false,
                "merchantEmailNotifications": false
            },
            "cryptoPayinSettings": {
                "stables": {
                    "feeBps": 50,
                    "paysFees": false,
                    "enabled": true
                },
                "majors": {
                    "feeBps": 100,
                    "paysFees": false,
                    "enabled": true
                },
                "volatile": {
                    "feeBps": 600,
                    "paysFees": false,
                    "enabled": true
                },
                "enabled": false,
                "maxGasFeePayment": {
                    "cents": 0,
                    "currency": "USD"
                },
                "coinbaseDisabled": false
            },
            "nSureSettings": {
                "nSureFixedFee": {
                    "cents": 37
                },
                "nSureInsurance": false,
                "nSureAchInsurance": false,
                "enableOverrideReview": false,
                "overrideReviewHours": 24,
                "nSureVariableFeeBps": 100
            },
            "blockConfig": {
                "failedPaymentAttemptLimit": 3
            },
            "withdrawFeePayment": {
                "paysGasFees": {
                    "polygon": false,
                    "eth": false,
                    "base": false,
                    "arbitrum": false,
                    "solana": false
                },
                "paysWithdrawFees": false
            },
            "refundBalanceLimit": {
                "cents": 500000
            },
            "_id": "6859b20210763eff46a27da6",
            "merchantId": "usseller",
            "verification": {
                "hash": "cda3090cf0c6f580c0e7c414adefa61fa9f22c7b",
                "reference": "ver_RDuHxp464KWF1e1LMPCsp7ay7ygB",
                "status": "approved"
            },
            "withdrawFees": {
                "swapBps": 50,
                "user": {
                    "asap": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 200,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        }
                    },
                    "same_day": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        }
                    },
                    "standard": {
                        "fixed": {
                            "cents": 100,
                            "currency": "USD"
                        },
                        "variableBps": 0,
                        "minimum": {
                            "cents": 0,
                            "currency": "USD"
                        }
                    },
                    "card": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 200,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        }
                    },
                    "iban": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        }
                    },
                    "pix": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        }
                    },
                    "eft": {
                        "fixed": {
                            "cents": 100,
                            "currency": "USD"
                        },
                        "variableBps": 0,
                        "minimum": {
                            "cents": 0,
                            "currency": "USD"
                        }
                    }
                },
                "business": {
                    "asap": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 200,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        }
                    },
                    "same_day": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 100,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    },
                    "standard": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 50,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    },
                    "card": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 0,
                        "minimum": {
                            "cents": 0,
                            "currency": "USD"
                        }
                    },
                    "iban": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 200,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    },
                    "pix": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 150,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    },
                    "eft": {
                        "fixed": {
                            "cents": 0,
                            "currency": "USD"
                        },
                        "variableBps": 50,
                        "minimum": {
                            "cents": 50,
                            "currency": "USD"
                        },
                        "maximum": {
                            "cents": 5000,
                            "currency": "USD"
                        }
                    }
                }
            },
            "customWithdrawFees": {
                "isBundled": false,
                "lineItemLabel": "Service Charge",
                "global": {
                    "coverProcessingFees": false,
                    "isFixed": true,
                    "currency": "USD",
                    "cents": 0,
                    "percent": null
                }
            },
            "apiKey": "2f104ced-6938-4a5b-bb42-66bcdc0e6b08",
            "apiKeys": [],
            "kycType": "both",
            "liquidityNotifications": [],
            "settlementToken": "USDC",
            "users": [
                {
                    "email": "tasha+usseller@coinflowlabs.app",
                    "scope": "seller",
                    "_id": "6859b20210763eff46a27da7"
                }
            ],
            "ubos": [],
            "goLiveChecklist": {
                "programWhitelistRequests": []
            },
            "hideBranding": false,
            "onlyShowTotal": false,
            "skipSendWithdrawEmail": false,
            "pushToCardEnabled": true,
            "requireAniCheck": false,
            "bankPayoutProvider": [
                "aptpay"
            ],
            "rtpPayoutProvider": "dwolla",
            "parent": "6849d9a8407a105f5c5dc1fc",
            "creditSeed": "tashamarket",
            "withdrawSettlementLocation": "circle",
            "enforceJwt": true,
            "enforceCheckoutJwt": false,
            "externalVerificationLinks": false,
            "whitelistedAncestorUrls": [],
            "banDuplicateAccounts": true,
            "allowAttestedKyc": false,
            "__v": 0
        }
    }
  3. Creating a Seller Session Key Creating a session key is required for client-to-server calls. The x-coinflow-auth-blockchain and x-coinflow-auth-wallet headers are required because Coinflow uses stablecoin rails under the hood — you can hard-code solana and pass the seller’s settlementAddresses.solana value.

    curl --location 'https://api-sandbox.coinflow.cash/api/auth/session-key' \
    --header 'Authorization: YOUR_API_KEY' \
    --header 'accept: application/json' \
    --header 'x-coinflow-auth-blockchain: solana' \
    --header 'x-coinflow-auth-wallet: CVrsREanmfBAeZH14PXrBzw4wF8Eh12PJDHYq2feoxUq'
    {
        "key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3YWxsZXQiOiJDVnJzUkVhbm1mQkFlWkgxNFBYckJ6dzR3RjhFaDEyUEpESFlxMmZlb3hVcSIsImJsb2NrY2hhaW4iOiJzb2xhbmEiLCJtZXJjaGFudElkIjoidGFzaGFtYXJrZXQiLCJpYXQiOjE3NTA3MTEyNjcsImV4cCI6MTc1MDc5NzY2N30.Wq1wTl9FXGNADnVdqUaS6sCo0uXLzj2NnfBYAnJr420"
    }
  4. Get Withdrawer Use this endpoint to reference the seller’s withdrawer data.

    curl --request GET \
         --url https://api-sandbox.coinflow.cash/api/withdraw \
         --header 'accept: application/json' \
         --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3YWxsZXQiOiJDVnJzUkVhbm1mQkFlWkgxNFBYckJ6dzR3RjhFaDEyUEpESFlxMmZlb3hVcSIsImJsb2NrY2hhaW4iOiJzb2xhbmEiLCJtZXJjaGFudElkIjoidGFzaGFtYXJrZXQiLCJpYXQiOjE3NTA3MTEyNjcsImV4cCI6MTc1MDc5NzY2N30.Wq1wTl9FXGNADnVdqUaS6sCo0uXLzj2NnfBYAnJr420'
    {
      "withdrawer": {
        "_id": "6859b7bbe36b426f2df63d50",
        "__v": 0,
        "availability": {
          "status": "Functional",
          "reason": "Initial",
          "editor": "system",
          "updatedAt": "2025-06-23T20:23:23.516Z"
        },
        "currency": "EUR",
        "email": "tasha+sellerAA@coinflowlabs.app",
        "merchant": "6849d9a8407a105f5c5dc1fc",
        "originalCurrency": "EUR",
        "riskScoreOverride": false,
        "user": true,
        "verification": {
          "hash": "42516ab2-d49b-4659-8347-a2d2ed3ca66b",
          "reference": "inq_8iTfTTaf1Bba1bdk6C291s8CVQjY",
          "status": "approved"
        },
        "wallets": [
          {
            "wallet": "CVrsREanmfBAeZH14PXrBzw4wF8Eh12PJDHYq2feoxUq",
            "blockchain": "solana"
          }
        ],
        "watchlistExempt": "Unknown",
        "bankAccounts": [],
        "cards": [],
        "ibans": [],
        "pixes": [],
        "efts": [],
        "rtpDisabled": false,
        "cardDisabled": false
      }
    }

Payment

Card Payments

  1. Fetch a session key This creates a JWT token for the payer, and authorizes the payer to call these endpoints client-to-server. You will pass the returned session key as x-coinflow-auth-session-key header.

    • Note: x-coinflow-auth-user-id can be thought of as a unique customer id that you use/define on your systems.
    curl --request GET \
         --url https://api-sandbox.coinflow.cash/api/auth/session-key \
         --header 'Authorization: YOUR_API_KEY' \
         --header 'accept: application/json' \
         --header 'x-coinflow-auth-user-id: customer123'
    {
        "key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY3VzdG9tZXIxMjMiLCJtZXJjaGFudElkIjoidGFzaGFtYXJrZXQiLCJpYXQiOjE3NTA3MTE3NTksImV4cCI6MTc1MDc5ODE1OX0.2bY7ZoEPIEzewY3Y4X-NpaVA-L9bZ67-3INOMcCYLVQ"
    }
  2. Get the Totals for the checkout to show the customer a quote inclusive of all fees.

    curl --request POST \
         --url https://api-sandbox.coinflow.cash/api/checkout/totals/sellerAA \
         --header 'accept: application/json' \
         --header 'content-type: application/json' \
         --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY3VzdG9tZXIxMjMiLCJtZXJjaGFudElkIjoidGFzaGFtYXJrZXQiLCJpYXQiOjE3NTA3MTE3NTksImV4cCI6MTc1MDc5ODE1OX0.2bY7ZoEPIEzewY3Y4X-NpaVA-L9bZ67-3INOMcCYLVQ' \
         --data '
    {
      "subtotal": {
        "cents": 100
      },
      "settlementType": "USDC"
    }
    '
    {
        "card": {
            "subtotal": {
                "cents": 100,
                "currency": "USD"
            },
            "creditCardFees": {
                "cents": 40,
                "currency": "USD"
            },
            "chargebackProtectionFees": {
                "cents": 0,
                "currency": "USD"
            },
            "gasFees": {
                "cents": 0,
                "currency": "USD"
            },
            "total": {
                "cents": 140,
                "currency": "USD"
            },
            "settlement": {
                "subtotal": {
                    "cents": 100,
                    "currency": "USD"
                },
                "creditCardFees": {
                    "cents": 40,
                    "currency": "USD"
                },
                "chargebackProtectionFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "gasFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "total": {
                    "cents": 140,
                    "currency": "USD"
                }
            },
            "exchangeRate": 1,
            "basis": {
                "cents": 100,
                "currency": "USD"
            }
        },
        "ach": {
            "subtotal": {
                "cents": 100,
                "currency": "USD"
            },
            "creditCardFees": {
                "cents": 100,
                "currency": "USD"
            },
            "chargebackProtectionFees": {
                "cents": 0,
                "currency": "USD"
            },
            "gasFees": {
                "cents": 0,
                "currency": "USD"
            },
            "total": {
                "cents": 200,
                "currency": "USD"
            },
            "settlement": {
                "subtotal": {
                    "cents": 100,
                    "currency": "USD"
                },
                "creditCardFees": {
                    "cents": 100,
                    "currency": "USD"
                },
                "chargebackProtectionFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "gasFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "total": {
                    "cents": 200,
                    "currency": "USD"
                }
            },
            "exchangeRate": 1,
            "basis": {
                "cents": 100,
                "currency": "USD"
            }
        },
        "googlePay": {
            "subtotal": {
                "cents": 100,
                "currency": "USD"
            },
            "creditCardFees": {
                "cents": 40,
                "currency": "USD"
            },
            "chargebackProtectionFees": {
                "cents": 0,
                "currency": "USD"
            },
            "gasFees": {
                "cents": 0,
                "currency": "USD"
            },
            "total": {
                "cents": 140,
                "currency": "USD"
            },
            "settlement": {
                "subtotal": {
                    "cents": 100,
                    "currency": "USD"
                },
                "creditCardFees": {
                    "cents": 40,
                    "currency": "USD"
                },
                "chargebackProtectionFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "gasFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "total": {
                    "cents": 140,
                    "currency": "USD"
                }
            },
            "exchangeRate": 1,
            "basis": {
                "cents": 100,
                "currency": "USD"
            }
        },
        "applePay": {
            "subtotal": {
                "cents": 100,
                "currency": "USD"
            },
            "creditCardFees": {
                "cents": 40,
                "currency": "USD"
            },
            "chargebackProtectionFees": {
                "cents": 0,
                "currency": "USD"
            },
            "gasFees": {
                "cents": 0,
                "currency": "USD"
            },
            "total": {
                "cents": 140,
                "currency": "USD"
            },
            "settlement": {
                "subtotal": {
                    "cents": 100,
                    "currency": "USD"
                },
                "creditCardFees": {
                    "cents": 40,
                    "currency": "USD"
                },
                "chargebackProtectionFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "gasFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "total": {
                    "cents": 140,
                    "currency": "USD"
                }
            },
            "exchangeRate": 1,
            "basis": {
                "cents": 100,
                "currency": "USD"
            }
        },
        "credits": {
            "subtotal": {
                "cents": 100,
                "currency": "USD"
            },
            "creditCardFees": {
                "cents": 0,
                "currency": "USD"
            },
            "chargebackProtectionFees": {
                "cents": 0,
                "currency": "USD"
            },
            "gasFees": {
                "cents": 0,
                "currency": "USD"
            },
            "total": {
                "cents": 100,
                "currency": "USD"
            },
            "settlement": {
                "subtotal": {
                    "cents": 100,
                    "currency": "USD"
                },
                "creditCardFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "chargebackProtectionFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "gasFees": {
                    "cents": 0,
                    "currency": "USD"
                },
                "total": {
                    "cents": 100,
                    "currency": "USD"
                }
            },
            "exchangeRate": 1,
            "basis": {
                "cents": 100,
                "currency": "USD"
            }
        }
    }

    Advanced: USDC totals block (only relevant for on-chain settlement)

    If your account is configured for stablecoin pay-ins, the totals response also includes a usdc block alongside the payment methods above:

    "usdc": {
        "subtotal": {
            "cents": 100,
            "currency": "USD"
        },
        "creditCardFees": {
            "cents": 0,
            "currency": "USD"
        },
        "chargebackProtectionFees": {
            "cents": 0,
            "currency": "USD"
        },
        "gasFees": {
            "cents": 0,
            "currency": "USD"
        },
        "total": {
            "cents": 100,
            "currency": "USD"
        },
        "settlement": {
            "subtotal": {
                "cents": 100,
                "currency": "USD"
            },
            "creditCardFees": {
                "cents": 0,
                "currency": "USD"
            },
            "chargebackProtectionFees": {
                "cents": 0,
                "currency": "USD"
            },
            "gasFees": {
                "cents": 0,
                "currency": "USD"
            },
            "total": {
                "cents": 100,
                "currency": "USD"
            }
        },
        "exchangeRate": 1,
        "basis": {
            "cents": 100,
            "currency": "USD"
        }
    }
  3. Tokenize the Credit Card Number. See tab: Tokenize New Card

  4. Enable a New Card Checkout This endpoint will enable a new user who has never made a purchase to complete their purchase with a credit card. Below is an example of how you’d call the card checkout endpoint:

  • curl --location 'https://api-sandbox.coinflow.cash/api/checkout/card/sellerAA' \
    --header 'accept: application/json' \
    --header 'content-type: application/json' \
    --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY3VzdG9tZXIxMjMiLCJtZXJjaGFudElkIjoidGFzaGFtYXJrZXQiLCJpYXQiOjE3NTA3MTE3NTksImV4cCI6MTc1MDc5ODE1OX0.2bY7ZoEPIEzewY3Y4X-NpaVA-L9bZ67-3INOMcCYLVQ' \
    --data-raw '
    {
      "subtotal": {
        "currency": "USD",
        "cents": 500
      },
      "webhookInfo": {
        "example": "{\"platformId\": \"123abc\"}"
      },
      "card": {
        "cardToken": "411111YJM5TX1111",
        "expYear": "30",
        "expMonth": "10",
        "email": "test@gmail.com",
        "firstName": "sdfadfsd",
        "lastName": "sdfsdfsd",
        "address1": "380 prospect ave",
        "city": "brooklyn",
        "zip": "11215",
        "state": "ny",
        "country": "US"
      },
      "feePercentage": 2, // Percentage fee marketplace takes from each transaction
      "settlementType": "USDC"
    }
    '
    {
      "paymentId": "f3fc8a34-680b-4b91-905b-1db5628bbb0e"
    }
  1. Re-tokenize a saved card number. See tab: Refresh Token w/ CVV
  2. Enable a Saved Card Checkout This endpoint will enable a returning user to complete a purchase with a previously saved card. The returning user will need to enter their CVV before confirming the purchase. Once you’ve retrieved the refreshed card token, pass it into the Saved Card Checkout endpoint. Below is an example request:
curl --request POST \
     --url https://api-sandbox.coinflow.cash/api/checkout/token/testtest \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY3VzdG9tZXIxMjMiLCJtZXJjaGFudElkIjoidGFzaGFtYXJrZXQiLCJpYXQiOjE3NTA3MTE3NTksImV4cCI6MTc1MDc5ODE1OX0.2bY7ZoEPIEzewY3Y4X-NpaVA-L9bZ67-3INOMcCYLVQ' \
     --data '
{
  "subtotal": {
    "currency": "USD",
    "cents": 500
  },
  "webhookInfo": {
    "example": "{\"wineId\": \"123abc\"}"
  },
  "settlementType": "USDC",
  "token": "411111YJM5TX1111",
	"feePercentage": 2 // Percentage fee marketplace takes from each transaction
}
'
{
  "paymentId": "0090c04b-1ae8-4672-a108-32874df36f11"
}
  1. Optional Implementation: Get payment by id This endpoint allows your to get details about the payment.
curl --request GET \
     --url https://api-sandbox.coinflow.cash/api/merchant/payments/enhanced/21d842d0-564b-4957-961e-d91ad98aa04b \
     --header 'Authorization: YOUR_API_KEY' \
     --header 'accept: application/json'
{
  "info": {
    "firstName": "Dwayne",
    "lastName": "Johnson",
    "email": "customer@email.com",
    "streetAddress": "385 Prospect Ave",
    "city": "Brooklyn",
    "state": "NY",
    "zip": "11215",
    "country": "US",
    "bin": "411111",
    "ip": "35.160.120.126",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
    "expMonth": "10",
    "expYear": "30",
    "ipLocation": {
      "lat": "45.5235",
      "lon": "-122.676",
      "country": "United States",
      "region": "OR",
      "isp": "Amazon.com, Inc.",
      "city": "Portland",
      "zip": "97207"
    },
    "deviceInfo": {
      "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
      "browser": {
        "name": "Chrome",
        "version": "131.0.0.0",
        "major": "131"
      },
      "engine": {
        "name": "Blink",
        "version": "131.0.0.0"
      },
      "os": {
        "name": "Mac OS",
        "version": "10.15.7"
      },
      "device": {
        "vendor": "Apple",
        "model": "Macintosh"
      },
      "cpu": {}
    }
  }
}
  1. At this point, you’ve successfully made a purchase with a new card and with a saved card. Next, lets add 3DS for card purchases. Please reach out to the Coinflow team when you’ve reached this step so we can configure 3DS on your account.

Adding 3DS to Card Checkout

Complete Checkout with 3DS Challenge - React


Adding Chargeback Protection

  1. Add the chargeback protection script to every page of your app. This script allows our provider to analyze user behavior and determine if the behavior could lead to fraud.
    • Use the sandbox partnerId provided by Coinflow.
  2. Pass the chargebackProtectionData object to the new and saved card checkout as well as the below headers. See an example of what the request will look like when you pass chargeback protection data to the new card checkout endpoint.
    • x-device-id - Get this after adding the script in step 1
    • x-coinflow-client-ip- the payer’s ip address
    • user-agent - the payer’s User Agent
    curl --location 'https://api-sandbox.coinflow.cash/api/checkout/card/sellerAA' \
    --header 'accept: application/json' \
    --header 'content-type: application/json' \
    --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY3VzdG9tZXIxMjMiLCJtZXJjaGFudElkIjoidGFzaGFtYXJrZXQiLCJpYXQiOjE3NTA3MTE3NTksImV4cCI6MTc1MDc5ODE1OX0.2bY7ZoEPIEzewY3Y4X-NpaVA-L9bZ67-3INOMcCYLVQ' \
         --header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15' \
         --header 'x-coinflow-client-ip: 123.123.123.123' \
         --header 'x-device-id: 123456789' \
    --data-raw '
    {
      "subtotal": {
        "currency": "USD",
        "cents": 500
      },
      "webhookInfo": {
        "example": "{\"platformId\": \"123abc\"}"
      },
      "card": {
        "cardToken": "411111YJM5TX1111",
        "expYear": "30",
        "expMonth": "10",
        "email": "test@gmail.com",
        "firstName": "sdfadfsd",
        "lastName": "sdfsdfsd",
        "address1": "380 prospect ave",
        "city": "brooklyn",
        "zip": "11215",
        "state": "ny",
        "country": "US"
      },
      "feePercentage": 2, // Percentage fee marketplace takes from each transaction
      "settlementType": "USDC",
      "chargebackProtectionData": [
          {
            "productType": "alcohol", // This may change
            "rawProductData": {
              "example": "{\"description\": \"pass as much description about the purchase here\", \"region\": \"CA\", \"yearsOld\": 20}"
            },
            "productName": "California Cab",
            "quantity": 1
          }
        ],
    }
    '

Displaying Seller Earnings from Purchases

  1. Get Balances This endpoint allows you to see how much the seller has available to withdraw at any time.
    curl --request GET \
         --url https://api-sandbox.coinflow.cash/api/customer/balances/sellerAA \
         --header 'accept: application/json' \
         --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3YWxsZXQiOiJDVnJzUkVhbm1mQkFlWkgxNFBYckJ6dzR3RjhFaDEyUEpESFlxMmZlb3hVcSIsImJsb2NrY2hhaW4iOiJzb2xhbmEiLCJtZXJjaGFudElkIjoidGFzaGFtYXJrZXQiLCJpYXQiOjE3NTA3MTEyNjcsImV4cCI6MTc1MDc5NzY2N30.Wq1wTl9FXGNADnVdqUaS6sCo0uXLzj2NnfBYAnJr420'
    {
      "credits": {
        "cents": 0
      },
      "usdc": {
        "cents": 490
      }
    }

Integrating Seller Payouts