Skip to main content
POST
Add account balance with x402

Authorizations

x-api-key
string
header
required

An API key (chance_sk_live_…) from https://harness.chance.cc/keys.

Query Parameters

usd
integer

Whole US dollars to add. Use either usd or credits, not both.

Required range: 1 <= x <= 2000
credits
integer

Legacy credit quantity; use either usd or credits, not both. Limits are deployment-specific.

Required range: 20 <= x <= 10000
account
string

Public top-up code (chance_topup_…). Use it instead of an API key to pay for another account. Ignored when an API key is sent.

Response

Settled and credited. PAYMENT-RESPONSE carries the settlement.

credited
integer
Example:

200

usd
string
Example:

"10.00"

creditsRemaining
integer

New balance. Only returned when the request authenticated with an API key.

Example:

203

txHash
string | null

Base settlement transaction.

payer
string

Address that signed the payment.

replayed
boolean

True when this payment was already credited and the original result is returned.