Create deposit

Issues a deposit address the caller can send crypto to, on the asset they ask for.

POST /v1/billing/crypto/deposit

Addresshttps://api.hanzo.ai/v1/billing/crypto/deposit
MethodPOST
Operationpost_billing_crypto_deposit
AuthAuthorization: Bearer $HANZO_API_KEY

Issues a deposit address the caller can send crypto to, on the asset they ask for.

The address credits the CALLER'S own wallet and nobody else's: the payer is the validated principal, never a body value. Asking again reuses the caller's open intent rather than minting a second address, so a refresh cannot spray key generations — and a payer who sent to the address they saw earlier is still credited.

No balance moves here. The chain watcher credits on real confirmations, so what comes back is an address, a status and the terms: the minimum that credits, any fee, the confirmations required, and one line of instructions. Once the transfer is that deep the deposit is credited as cash to the caller's balance (GET /v1/billing/balance, cash) and its status is succeeded.

The asset is checked against GET /v1/billing/crypto/options before anything is minted. A chain, a token or a pair the rail does not accept is 400, and the answer lists the accepted chains, tokens and assets. A deposit rail with nothing watched is 503 — nothing sent now can be credited, and the Gateway rail or a card is the way to pay until it reopens.

A named handler, not a closure, so zipdoc can lift this prose into the registry.

Request

3 fields, body application/json (required).

FieldInTypeRequiredDescription
amountCentsbodyinteger (int64)—AmountCents is what the payer intends to send, for the record.
chainbodystring—Chain is the network to receive on, one of GET /v1/billing/crypto/options chains.
tokenbodystring—Token is the asset on that chain, one of the options' tokens.

Response

StatusBodyMeaning
200billing.CryptoDepositok
defaultproblem-detailsrefused

200 body — 14 fields.

FieldInTypeAlwaysDescription
addressTagbodystring—AddressTag is the destination tag the payment must carry, on a chain whose address is shared.
amountCentsbodyinteger (int64)—AmountCents is what the payer said they would send, in USD cents, when the address was asked for: a record of intent, not a quote.
chainbodystring—Chain is the network to send on.
confirmationsbodyinteger (int64)—Confirmations is how deep the transfer being confirmed is now; zero until one is seen.
creditedCentsbodyinteger (int64)—CreditedCents is what the transfer this intent confirmed credited, in USD cents, once it succeeded.
depositAddressbodystring—DepositAddress is where to send it.
expiresAtbodystring—ExpiresAt is when this address stops being handed out again (RFC3339).
feeCentsbodyinteger (int64)—FeeCents is deducted from every deposit before it is credited: the cost of sweeping it out of the custody address.
idbodystring—ID names the intent; read it back at GET /v1/billing/crypto/deposit/{id}.
instructionsbodystring—Instructions says, in one line, what to send where and when it is credited.
minimumCentsbodyinteger (int64)—MinimumCents is the smallest deposit, in USD cents, that credits anything; less credits nothing.
requiredConfirmationsbodyinteger (int64)—RequiredConfirmations is how many blocks deep the transfer must be before it is credited.
statusbodystring—Status is pending until a transfer to the address is seen, confirming while the chain buries it, and succeeded once it is credited as cash in the payer's balance (GET /v1/billing/balance, cash).
tokenbodystring—Token is the asset to send; this intent credits that token alone.

Failure carries the platform error shape — see Errors.

Examples

hanzo billing crypto deposit create
import { Configuration, BillingApi } from 'hanzoai';

const api = new BillingApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postBillingCryptoDeposit({ amountCents: 0, chain: "<chain>" });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import BillingApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = BillingApi(client).post_billing_crypto_deposit(amount_cents=0, chain="<chain>")
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.BillingAPI.PostBillingCryptoDeposit(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, billing_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = billing_api::post_billing_crypto_deposit(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.BillingApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new BillingApi(client).postBillingCryptoDeposit();
curl -X POST https://api.hanzo.ai/v1/billing/crypto/deposit \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "amountCents": 0,
       "chain": "<chain>"
     }'

MCP reaches billing through the billing tool, which names its 45 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_billing_accounts"
         }
       }
     }'

Billing API · All Hanzo APIs · Interactive reference

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.