How a transfer is authorized
Without an active spend permission the key cannot move a cent: every transfer answers
403 until you grant one. The key never touches your own signing key, which stays in
Privy.
Limits that apply to every transfer
The allowance is the only limit that holds even if HEVN itself misbehaves.
maxSpend and the
allowlist are backend checks that narrow it further.
A transfer runs at most once
Every transfer carries an ERC-4337 nonce derived from a payment id, and the spender wallet accepts each nonce once. The payment id is<keyId>_<reference>, where the reference is the first of:
- the
invoiceIdyou pay, - the
quoteIdyou fund, - the
Idempotency-Keyheader you send.
409 This transfer was already sent. That refusal comes from the wallet itself, so it holds across retries, restarts and concurrent
requests. Two consequences follow:
- A contact transfer without an
Idempotency-Keygets a random reference and is never deduplicated. Always send the header when you pay a contact. - The reference is scoped to the key. The same invoice paid through two different keys is two transfers.
What you can do with a key
There are no scopes: a valid key can call every route above. Treat it like a password with a budget.
Next: Keys and permissions
Create a key, grant its spend permission, restrict it, and revoke it.