Skip to main content

Sub Accounts

Sub-accounts are merchant-owned child wallets with dedicated MPC keys. They let you isolate balances, scope delegated access, and route splits/offramp flows by sub-account.
Sub-accounts are created programmatically via API, SDK, or CLI. The dashboard intentionally provides a read-only watchtower view.

Authentication

All sub-account endpoints are protected merchant endpoints.
  • Use Authorization: Bearer zfi_test_... or Authorization: Bearer zfi_live_...
  • Dashboard sessions also work for merchant UI usage.

Create Sub-Account

string
required
Immutable label for this sub-account. Must be unique per merchant.
number
Optional configured spend limit (USDC).
string
default:"delegated"
delegated or merchant_managed.
boolean
default:"false"
Yield toggle metadata for this sub-account.

Example

Response


List Sub-Accounts

Returns all sub-accounts under the authenticated merchant.

Get Sub-Account

id accepts either the UUID or external ID (for example sa_xxxxx).

Get Sub-Account Balance

Response


Get Merchant Sub-Account TTL Policy

Returns effective TTL ceilings, merchant overrides, and platform hard caps.

Response


Update Merchant Sub-Account TTL Policy

Updates merchant-specific TTL ceilings. Each provided value must be within the platform hard-cap range.

Body

Response shape matches GET /api/v1/subaccounts/ttl-policy.

Mint Delegation Token

string
required
deposit_only, withdraw_only, spend_only, read_only, or full_access.
number
Optional spend cap enforced for this token.
integer
default:"3600"
Token lifetime in seconds.
array<string>
Optional destination allowlist.
boolean
default:"false"
If true, token auto-revokes after first successful authorized use.
string
Optional policy version UUID attached to this token.
string
Optional actor label for audit attribution.
string
Optional actor public key for attribution.
object
Optional structured actor metadata.

Response

delegation_token is returned once. Treat it like a secret and never log it.

Mint Child Delegation Token

Mints an attenuated child token from an existing parent delegation token. expires_in_seconds must be within the merchant effective child-delegation TTL ceiling and cannot exceed parent token expiry.

Body

Response


Freeze Sub-Account

Optional body:
Freezing revokes active delegation tokens and blocks sub-account activity.

Unfreeze Sub-Account

Optional body:
Guardrails:
  • Only sub-accounts currently in frozen status can be unfrozen.
  • closed sub-accounts cannot be unfrozen.
  • Previously revoked delegation tokens are not reactivated. Mint new token(s) if needed.

Drain Sub-Account

Drains funds from the sub-account wallet back to the merchant wallet.

Body


Withdraw From Sub-Account

Body

signing_grant and passkey_signature are mutually exclusive. passkey_signature remains available as an interactive fallback and is no longer required for headless external-withdraw flows.

Withdraw Sub-Account To Bank (One-Shot)

Creates a PAJ offramp order and automatically completes OTP verification using the same proxy-email automation model used by split bank withdrawals.

Body

bank_id accepts a bank identifier value: PAJ bank id, bank code, or bank name.

Response

automation_token and delegation_token are mutually exclusive. signing_grant and passkey_signature are mutually exclusive. For API-key initiated bank withdrawals, provide:
  • one policy token (automation_token or delegation_token)
  • one signing authorization (signing_grant)
passkey_signature remains available as an interactive fallback and is no longer required for headless flows.

Mint Sub-Account Automation Token

Requires merchant dashboard session auth. Use this endpoint to mint bounded headless automation credentials for withdraw-bank. ttl_seconds must be within the merchant effective automation-token TTL ceiling.

Body

Response

automation_token is returned once. Treat it as a secret and never log it.

Mint Sub-Account Signing Grant

Requires merchant dashboard session auth. Use this endpoint to perform one interactive passkey approval and mint bounded headless signing credentials for withdraw-bank. ttl_seconds must be within the merchant effective signing-grant TTL ceiling.

Body

Response

signing_grant is returned once. Treat it as a secret and never log it.

Start Signing Grant Browser Intent

Recommended API-key flow for CLI/SDK parity with merchant dashboard UX. This creates a short-lived browser approval intent and returns a one-time approval URL. ttl_seconds must be within the merchant effective signing-grant TTL ceiling.

Body

Response

intent_token is returned once. Treat it as a secret and never log it.

Poll Signing Grant Browser Intent

Polls intent status. On approval, this returns the minted signing_grant exactly once and marks the intent consumed.

Body

Response (approved)


Revoke Sub-Account Signing Grant

Immediately revokes the signing grant.

Response


Revoke Sub-Account Automation Token

Immediately revokes the automation token.

Response

This endpoint is API-key compatible and requires no manual OTP submission in your client. OTP handling is automated server-side via proxy email and IMAP monitor.

Create Policy Version

Creates a versioned policy document that can be attached to delegation tokens, automation tokens, signing grants, triggers, intents, and balance rules.

Body


Dry Run Policy

Evaluates a policy document without persisting it.

Get Policy


Create Webhook Trigger Subscription

Supported trigger types:
  • balance_below
  • balance_above
  • threshold_crossed
  • funds_arrival
  • daily_withdrawal_above

List Webhook Trigger Subscriptions


Create Execution Intent

Creates a maker-checker style execution gate.

Approve Execution Intent


Release Execution Intent by Signal

Releases a pending or approved intent using its one-time signal token.

Create Balance Rule

Creates an automated balance action rule (topup_below or drain_above).

Close Sub-Account

Closes the sub-account, deactivates its wallet, and revokes associated delegation tokens.

Webhook Coverage

Sub-account flows emit:
  • Withdrawal events: WithdrawalInitiated, WithdrawalFailed, WithdrawalCompleted
  • Lifecycle events: SubAccountCreated, SubAccountDelegationTokenMinted, SubAccountFrozen, SubAccountUnfrozen, SubAccountClosed
  • Reactive controls: SubAccountBalanceLow, SubAccountBalanceHigh, SubAccountThresholdCrossed
  • Execution gates: SubAccountExecutionGatePending, SubAccountExecutionGateReleased
See Webhooks for payload structure.