Crypto Payin

Initiates a payment where the customer is paying with Crypto

Authentication

x-coinflow-auth-user-idstring
The external identifier of the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key
Authorizationstring
The API key of the merchant - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key
OR
Authorizationstring
The API key of the merchant - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key
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

Request

This endpoint expects an object.
subtotalobjectRequired
emailstringRequired
chainstringRequired
The name of the chain to perform the crypto payin on.
tokenstringRequired
The symbol of the token to execute the payin with.
customPayInFeeslist of objectsOptional
customerInfoobjectOptional
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.
rentobjectOptional

(Solana only) if your transaction requires a known amount of Rent to be paid, you can pass it here.

transactionDataobjectOptional

(EVM only) if you want to execute an EVM transaction on a successful purchase, you can pass a transaction request here.

Gas fees for the transaction will be automatically calculated and added to the total charged to the customer. Optionally the merchant can opt to pay for these gas fees.

stellarTransactionstringOptional

(Stellar only) Base64 XDR transaction string for executing a merchant contract call on a successful purchase.

For transaction purchases, pass the base64 XDR string created using .toXDR() on a transaction built with generated TypeScript bindings (e.g., NftClientWrapper.buildNftPurchaseTx).

For direct USDC transfers (no merchant transaction), omit this field or pass undefined.

Gas fees for the transaction will be automatically calculated and added to the total charged to the customer.

settlementTypeenumOptional
Allowed values:
destinationAuthKeystringOptional
If utilizing USDC settlement to addresses other than your main merchant settlement address. Utilize this destinationAuthKey which is a JWT encoded with the information for which address to send the USDC to.
userLocationobjectOptional

End-user geographic coordinates captured at the moment of the withdrawal request. Consumed by BlockingRuleMethod.GEOLOCATION enforcement.

Replay-of-different-coords bypass is prevented server-side: the first resolved {country, state} for a given (merchant, user) pair is pinned in Redis, and subsequent requests are evaluated against that pinned value regardless of the lat/lng they submit.

Response

Ok
sessionIdstring

The session/payment identifier

depositAddressstring
The deposit address where funds should be sent
paymentChainNamestring

Human-readable chain name

paymentCurrencySymbolstring
The token symbol
paymentAmountstring
The amount to pay in the selected currency
chainLogoUrlstring
currencyLogoUrlstring
paymentIdstring

Errors

423
Locked Error