Create Merchant Wallet Redemption Transaction

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.

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