GET /get_balance to confirm the key and its allowance.
Model
Without an active spend permission, each transfer returns
403. The key does not use your wallet’s signing key, which stays in Privy.
A key has no scopes. It can call every remote transfer route.
Create a key
- Open Settings → Remote Transfers in the app and click Create remote transfer key.
- Enter a name and a spending limit (an amount and a period).
- Confirm. HEVN issues the key, and your wallet signs a spend permission for the key’s spender wallet with the limit you set.
- Copy the key. HEVN cannot show it again.
Change the limit
Open the key in the app and update its spend permission. Your wallet signs a new permission that replaces the old one.Revoke a key
Delete the key in the app. The app revokes the spend permission onchain, then deletes the key. The deleted key stops authenticating at once. Keys do not expire. A deleted key cannot be restored, so create a new one. If a key leaks, delete it in the app and create a new key with a new allowance. Until the key is deleted, spending is bounded by the allowance left in the current period and bymaxSpend if set.
Call the routes
Remote transfer routes take a remote transfer key inX-Api-Key and return camelCase JSON. Amounts are decimal USDC on Base. Paths are relative to HEVN_RT.
/api/v1/mcp serves the same routes and is deprecated.
Get balance
GET /get_balance returns your wallet’s USDC balance and the key’s allowance left in the current period, both read from the chain.
email is the key’s account and address is your Base smart wallet. remaining is 0 when the key has no active spend permission. An account with no smart wallet returns 404 Smart wallet not found.
Resolve address
GET /resolve_address?email= returns the Base smart wallet address for an email address.
Transfer
POST /transfer pays a contact, an invoice or a payout quote. Send one of contactId, invoiceId or quoteId.
A request with none of the three ids returns
422. If several are sent, invoiceId takes precedence over quoteId, and quoteId over contactId. Idempotency-Key is optional. Send it on each contact transfer.
txHash is the onchain transaction. userCreated and emailSent are false on this route.
Transfer to email
POST /transfer_to_user pays an email address. If the email has no HEVN account, HEVN creates one, pays its wallet and emails an invitation to claim it. An existing account gets a payment email.
amount (number, USDC), email and the Idempotency-Key header are required. Without the header the call returns 422. memo is accepted and not recorded.
userCreated is true when the transfer created the receiving account. emailSent is true when the invitation or payment email went out. Each new transfer saves the receiver as a contact.
A transfer runs at most once
Each transfer uses a nonce derived from a payment id, and the spender wallet accepts a nonce once. The payment id is<keyId>_<reference>. The reference is the first of these that the request has:
invoiceIdquoteId- the
Idempotency-Keyheader
The reference is scoped to the key, so paying the same invoice through two keys sends two transfers.
List transfers
GET /transfers lists the account’s POST /transfer_to_user transfers, newest first. POST /transfer payments appear in the app’s transaction history.
receiverEmail contains the contact’s saved name. The name is the receiver’s full name if the account has one, and the email address otherwise.
Key routes
The key routes take your app session token inAuthorization: Bearer in place of a remote transfer key. A key created with the API has no spend permission. Grant it in the app, as in Change the limit.
DELETE /api_key/{key_id} leaves the spend permission onchain. The deleted key stops authenticating at once. Revoke the permission in the app as well, as in Revoke a key.
Limits
Set
maxSpend and the IP allowlist (ipRestriction) with POST /api_key.
Errors
An error response has one field,detail. Branch on the status code and log detail.