/dapi/v1 API lets your backend onboard customers, open virtual accounts for them and move their money. Choose an integration kind below, then log in with POST /dapi/v1/auth/challenge and POST /dapi/v1/auth/token.
Integration kinds
Both kinds use the same API, the same developer key and the same sandbox. They differ in who holds the customer’s wallet and how a payout is authorized.
HEVN Connect needs no wallet infrastructure of your own. HEVN provides the wallet and the signing screen.
External wallets is a full whitelabel. Before HEVN enables
POST /dapi/v1/clients for you, you show that your customers hold the keys to their wallets and that your wallet infrastructure is non-custodial.
HEVN Connect
External wallets
Sub accounts
A sub account is a further wallet of your own integrator account on Base, with its own address, balance, ledger and virtual accounts. Your developer key signs for it. You open sub accounts on your own account, and a request that acts for a client returns403 account_not_controlled. See Sub accounts.
API access
- Ask HEVN to activate your integrator account, in the sandbox and in production (What HEVN must enable).
- Create a developer key in the HEVN app. A key has an IP allowlist and no scopes (Authentication).
- Log in from your backend and send the access token as a bearer (Sessions).
POST /dapi/v1/clients is a profile with no wallet at HEVN.
API layout
Each call acts on your integrator account, or on the client named inX-Hevn-Account (Acting as a client).
A payment from your own account is prepared, signed with the developer key and confirmed (Signing). Formats, idempotency and polling are in Conventions. The API sends no webhooks.
Base URLs
Browse the spec at
/dapi/v1/docs or fetch the schema from /dapi/v1/openapi.json.
How money moves
Money arrives through a virtual account or an on-chain transfer and leaves through a payout to a contact. It settles on a Base smart wallet, a sub account or an external account.Account keys
An account key names one balance of a HEVN account.GET /dapi/v1/client/balance returns one row in accounts[] per balance the account holds: its tokens, FDIC_USD and each sub account.
The token rows are read on chain.
FDIC_USD and FDIC_EUR are account identifiers for a balance held at a partner bank. The name is an identifier and says nothing about deposit insurance.
sourceAccount and destinationAccount take an account key or the acc_… id of an external account or a sub account (Accounts). USDC_ARB holds and receives, and payins and payouts refuse it with 422 account_not_supported.
A virtual account record has destinationAccount, the account key its rail settles into, and supportedAccounts.
Money in
Money out
POST /dapi/v1/payouts books a payout. Its quote has the amount that leaves the balance and the amount that arrives.
Send
amount or amountTo, as described in Money.
Status
A payout is complete whenGET /dapi/v1/payouts/{payoutId} returns settled. Fiat timing is set by the partner bank. Poll as described in Status codes.
Completed payins and payouts are rows in GET /dapi/v1/transactions (Balances and transactions).
Accounts and control
Your developer key signs for your integrator wallet and its sub accounts. A client’s wallet belongs to its holder, and the holder’s key signs each spend from it.X-Hevn-Account selects whose data a call reads and writes. It does not let the developer key sign for another account’s wallet.
Who can spend
authorization on the response of POST /dapi/v1/payouts and POST /dapi/v1/swaps names who authorizes the payment. The values are defined in Authorization values.
For a client, these calls return
403 account_not_controlled with details.clientId:
POST /dapi/v1/payouts/{payoutId}/confirm,POST /dapi/v1/swapsandPOST /dapi/v1/swaps/{swapId}/confirm.POST /dapi/v1/payoutsfrom the main wallet of a client that is not linked through HEVN Connect.POST /dapi/v1/client/accountswithkind: "sub".
The holder’s key on a HEVN account is an embedded wallet managed by Privy. See Account structure.
What this means for your product
HEVN authenticates your key and does not see your user. Your server chooses the client for each request and sends it inX-Hevn-Account:
- Keep the
cl_…in your signed session. Do not accept a client id from a request body or a query string. - With HEVN Connect, bind each sign-in to the browser that started it and exchange the link code on your server (Sign in with HEVN).
- With external wallets, show the customer the
transferof a payout before their wallet signs it (External wallets).