acc_… id: accountId on POST /dapi/v1/banks, destinationAccount on POST /dapi/v1/payins, sourceAccount on POST /dapi/v1/payouts.
The routes take the client’s id in X-Hevn-Account. The common flows are in Virtual accounts, Payins and Payouts.
Virtual accounts
CallPOST /dapi/v1/banks with a product and the accountId. Each incoming payment is delivered as USDC to the account’s address.
Response 201, Location: /dapi/v1/banks/us?accountId=acc_9f2c…
blockers[] and the account details are in Virtual accounts. Fields: Request a receiving account.
On-chain payins
CallPOST /dapi/v1/payins with originChainId, the account as destinationAccount, and refundAddress. The payin is delivered as USDC on the account’s network.
address, chainId, amount and memo from the instructions call, then poll GET /dapi/v1/payins/{payinId}. Statuses and payer mistakes are in Payins. Fields: Create an incoming transfer quote.
Payouts
Save a contact, then callPOST /dapi/v1/payouts with the account as sourceAccount. publicKey is not used.
Response 201, Location: /dapi/v1/payouts/po_4c8a…
approval, debit and intent are absent. Fields: Create an outgoing transfer.
Send the transfer
Have the customer’s wallet call the ERC-20transfer(toAddress, amountAtomic) on tokenAddress, from fromAddress, on chainId. Read authorization before status. With wallet, awaitingSignature means the transfer is outstanding.
POST /dapi/v1/payouts/{payoutId}/confirm returns 400 invalid_request with details.reason funded_by_wallet_transfer.
Check the instruction
Checktransfer on your server before your product asks the wallet to sign.
toAddress is the address the payout is collected at. Your server cannot derive it, so pass it to the wallet as returned.
Track the payout
PollGET /dapi/v1/payouts/{payoutId}. The statuses are in Track it to completion.
Refusals
Other payout codes are in Errors.
Balance and ledger
Paging, filters and exports are in Balances and transactions.
Sandbox
In the sandbox, fund the address through a virtual account or a public testnet faucet, and send the payouttransfer to the faucet account. The products, limits and refusals are in Accounts.