Hanzo AI
OpenapiBilling

Replace recharge

Sets the caller's auto-reload rule, and answers with the rule as stored.

PUT /v1/billing/recharge

Addresshttps://api.hanzo.ai/v1/billing/recharge
MethodPUT
Operationput_billing_recharge
AuthAuthorization: Bearer $HANZO_API_KEY

Sets the caller's auto-reload rule, and answers with the rule as stored.

ENABLING REQUIRES A CARD ON FILE (400), because the sweep charges off-session: a rule naming no chargeable method is a promise the schedule cannot keep. A non-positive amount and a negative threshold are refused the same way, each naming the field that was wrong.

The rule is the caller's OWN. The org comes from the validated principal and the body names none, so there is no field a write could be steered through onto another tenant's schedule.

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

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
amountCentsbodyinteger (int64)
currencybodystring
enabledbodyboolean
thresholdCentsbodyinteger (int64)

Response

StatusBodyMeaning
200billing.AutoRechargeok
defaultproblem-detailsrefused

200 body — 7 fields.

FieldInTypeAlwaysDescription
amountCentsbodyinteger (int64)
currencybodystring
enabledbodyboolean
lastRechargedAtbodystring
storedbodyboolean
subjectbodystring
thresholdCentsbodyinteger (int64)

Failure carries the platform error shape — see Errors.

Examples

hanzo billing recharge replace

Billing API · All Hanzo APIs · Interactive reference

How is this guide?

On this page