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
  • API Reference
    • POSTGets USDC/SBC/EuroE on testnets
      • POST(EVM only) Get Credits Authorization Message
      • POST(EVM only) Send Redeem Transaction with Credits Authorization Message
      • POSTCreate Merchant Wallet Redemption Transaction
      • POSTCreate Redeem Transaction
LogoLogo
RegisterLoginSandbox Login
API ReferenceRedeem

Create Merchant Wallet Redemption Transaction

POST
https://api-sandbox.coinflow.cash/api/redeem/merchant
POST
/api/redeem/merchant
$curl -X POST https://api-sandbox.coinflow.cash/api/redeem/merchant \
> -H "x-coinflow-auth-wallet: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "merchantId": "merchant_9f8b7c6d5e4a3b2c1d0e",
> "subtotal": {
> "cents": 2599
> }
>}'
1{
2 "transaction": "3N5vX9q7b2Y1ZpL8wR6TjKdF4mHsVxC0eUaBnGQzMlP"
3}
Creates a transaction for the user to sign in order to redeem their Coinflow credits, with the resulting stablecoins being delivered to the merchant's settlement wallet.
Was this page helpful?
Previous

Create Redeem Transaction

Next
Built with

Authentication

x-coinflow-auth-walletstring
The web3 wallet of the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key
x-coinflow-auth-blockchainstring
The blockchain associated with the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key

Headers

x-device-idstringOptional

Request

This endpoint expects an object.
merchantIdstringRequired
subtotalobjectRequired
chargebackProtectionDatalist of objectsOptional
webhookInfoobjectOptional
feePercentagedoubleOptional0-100

If this purchase is for a seller/submerchant where the marketplace takes a fee, this is the % fee which is taken from the subtotal amount.

fixedFeeobjectOptional
jwtTokenstringOptional
This is a token encoding the parameters for the request. Allows purchase parameters to be verified to prevent manipulation when the checkout page is presented to the user.
redeemAmountobjectOptional

Response

Ok
transactionstring

Transaction for the users wallet to sign and send.

Solana - base 58 encoded transaction, recover using: Transaction.from(base58.decode(transaction)) Near - Base 64 encoded stringified transaction, recover using: JSON.parse(Buffer.from(transaction, 'base64').toString()); Evm - Base 64 encoded stringified transaction, recover using: JSON.parse(Buffer.from(transaction, 'base64').toString());

Errors

412
Precondition Failed Error

The web3 wallet of the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key

The blockchain associated with the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key