Create Transactions

Creates the transaction to be signed by the user and sent to the blockchain.

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
OR
x-coinflow-auth-session-keystring
The session key generated for the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key

Request

This endpoint expects an object.
amountdoubleRequired
merchantIdstringRequired
speedenumRequired
accountstring or objectRequired

One of:

  1. The token of the bank account/card that the user is withdrawing to
  2. An Apple Pay Response Object
  3. For speed: "crypto": the on-chain destination to deliver to
tokenobjectOptional
From T, pick a set of properties whose keys are in the union K
evmTransferAuthorizationDataobjectOptional
bankAccountDetailsobjectOptional
addressobjectOptional
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.

minUsdcobjectOptional
ownerOverridestringOptional
For Solana currency token transactions, the public key of the wallet owner that will sign the transaction. This will replace the public key associated with the user wallet.

Response

Ok
transactionslist of strings

The transactions to be signed by the user and sent to the blockchain.

Solana - Transactions are base58 encoded. You can reconstruct them by calling Transaction.from(base58.decode(transaction)) Evm - Transactions are JSON stringified. You can reconstruct them by calling JSON.parse(transaction)

Errors

412
Precondition Failed Error
451
Unavailable for Legal Reasons Error