Payezydevelopers
Sandbox

API reference / Billing

Get usage and fees for a month

GET/v1/orgs/{orgId}/billing/usage

Usage and fees by product for a month, fees already charged, and the estimated charges for the month (billing:view). Platforms also get usage per end-customer.

Before you call it

  • Permissionbilling:view

Parameters

ParameterWhat it does
orgIdpath, uuidrequiredThe organization the call acts on. For platform calls, your platform's id; for customer calls, the customer's organization id. Get them from getMe or the customer list.
periodquery, stringYYYY-MM (UTC month); defaults to the current month

Response 200

Usage

FieldWhat it does
org_idstring (uuid)requiredNo description in the spec yet.
period_startstring (date)requiredNo description in the spec yet.
period_endstring (date)requiredNo description in the spec yet.
currencystringrequiredNo description in the spec yet.
itemsBillingUsageLine[]requiredNo description in the spec yet.
items[].product_codestringrequiredNo description in the spec yet.
items[].product_namestringrequiredNo description in the spec yet.
items[].categorystringrequiredNo description in the spec yet.
items[].eventsintegerrequiredNo description in the spec yet.
items[].quantitystringrequiredNo description in the spec yet.
items[].volumestringrequiredNo description in the spec yet.
items[].feesstringrequiredNo description in the spec yet.
items[].chargedstringrequiredCollected when the transaction settled
items[].accruedstringrequiredBilled at the end of the month
totalsobjectrequiredNo description in the spec yet.
totals.feesstringrequiredNo description in the spec yet.
totals.chargedstringrequiredNo description in the spec yet.
totals.accruedstringrequiredNo description in the spec yet.
estimateBillingEstimaterequiredNo description in the spec yet.
estimate.usage_feesstringrequiredNo description in the spec yet.
estimate.recurring_feesstringrequiredNo description in the spec yet.
estimate.adjustmentsstringrequiredMonthly minimums and caps
estimate.creditsstringrequiredNo description in the spec yet.
estimate.totalstringrequiredNo description in the spec yet.
estimate.already_chargedstringrequiredNo description in the spec yet.
estimate.remainingstringrequiredWhat the month-end statement or invoice would ask for
customersBillingCustomerUsage[]Platforms only
customers[].org_idstring (uuid)requiredNo description in the spec yet.
customers[].namestringrequiredNo description in the spec yet.
customers[].eventsintegerrequiredNo description in the spec yet.
customers[].volumestringrequiredNo description in the spec yet.
customers[].feesstringrequiredNo description in the spec yet.