Skip to content
Limited-time offerevery video just HK$1only 1,000, first come first servedGet it now
Axiom Lab
Developer docs

Reference

API reference · Wallet and usage

Balance, statement and usage, and online top-up.

View Markdown

Wallet

GET/v1/wallet

API key requiredSuccess 200

Parameters

NameTypeDescription
X-Project-IDheaderstringThe project to act on; the default project when omitted; nullable

Response 200 application/json

NameTypeDescription
balance_centsrequiredinteger
held_centsrequiredintegerReserved for videos in production; released or charged when each one ends
available_centsrequiredinteger
low_balance_centsrequiredintegernullable
currencyrequiredstringAlways HKD: every amount is in Hong Kong dollar cents
organization_idrequiredstring
mock_left_centsintegerDemo payments only: how much more demo credit this organization can top up in total; absent when payments are real; nullable

Example

curl "https://axiomlab.online/v1/wallet" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Wallet Entries

GET/v1/wallet/entries

API key requiredSuccess 200

Parameters

NameTypeDescription
afterquerystringlength ≤ 64; nullable
limitqueryintegerDefault 50; range 1–200
X-Project-IDheaderstringThe project to act on; the default project when omitted; nullable

Response 200 application/json

NameTypeDescription
datarequiredarray<object>
data[].idrequiredstring
data[].organization_idrequiredstring
data[].kindrequiredstring
data[].amount_centsrequiredinteger
data[].hold_centsrequiredinteger
data[].job_idrequiredstringnullable
data[].noterequiredstringnullable
data[].actorrequiredstringnullable
data[].created_atrequirednumber
data[].currencyrequiredstringUnit of amount_cents and hold_cents: HKD, or USD for entries written before the wallet switched to HKD (the switch itself is an adjust entry whose note states the conversion rate)
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page; nullable
has_morebooleanDefault false

Example

curl "https://axiomlab.online/v1/wallet/entries" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Checkout

POST/v1/wallet/checkout

API key requiredSuccess 201

Parameters

NameTypeDescription
Idempotency-KeyrequiredheaderstringA unique value you generate and keep; reuse it when retrying so the request never runs twice; length 1–128
X-Project-IDheaderstringThe project to act on; the default project when omitted; nullable

Request body application/json

NameTypeDescription
amount_centsrequiredintegerHKD cents, HK$20–HK$100,000; range 2000–10000000

Response 201 application/json

NameTypeDescription
idrequiredstring
urlrequiredstring
amount_centsrequiredintegerHKD cents credited to the wallet once paid
currencystringDefault HKD
charge_currencystringCurrency Stripe charges: HKD, the wallet's own currency; Default HKD
charge_amountintegerAmount Stripe charges, in charge_currency cents (equal to amount_cents); Default 0

Example

curl -X POST "https://axiomlab.online/v1/wallet/checkout" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"amount_cents": 2000}'

Usage

GET/v1/usage

API key requiredSuccess 200

The amount billed to this project's wallet in [from, to) (default: the last 30 days) and its paid calls and job counts, grouped on request. group_by=job pages by job id with after.

Parameters

NameTypeDescription
fromquerynumberrange ≥ 0; nullable
toquerynumberrange ≥ 0; nullable
group_byquerystringDefault none
limitqueryintegerDefault 50; range 1–200
afterquerystringlength ≤ 32; nullable
X-Project-IDheaderstringThe project to act on; the default project when omitted; nullable

Response 200 application/json

NameTypeDescription
project_idrequiredstring
rangerequiredmap<string, number>
jobsrequiredmap<string, integer>
billed_centsrequiredintegerAmount charged to the wallet in the range, in cents of currency
currencyrequiredstringAlways HKD
group_byrequiredstring
groupsrequiredarray<object>nullable
next_cursorrequiredstringnullable

Example

curl "https://axiomlab.online/v1/usage" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

← All endpoints