Skip to content
Console
Menu

Generated Assets

Workflows

Getting Started

Authentication

KV Store

Usage events

A Usage Event is rated usage, immutable: what a settled reservation or a direct record produced.

A Usage Event is rated usage, immutable: what a settled reservation or a direct record produced.

Service Sylphx Money · Resource type money.sylphx.com/UsageEvent · Name pattern orgs/{org}/projects/{project}/envs/{env}/usage_events/{usage_event} · Shape record

#Fields

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/usage_events/{usage_event}.
uidstringuevt_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
subjectSubjectWho used it. Required.
subject_proofstringAs on UsageReservation. Required.
actor_proofstringAs on UsageReservation.
meterstringThe meter's lookup key. Required.
quantityint64How much, in the meter's base unit. Required.
occurred_timetimestampWhen the work happened. Required.
amount_nanostringThe rated amount, nano-minor, a decimal string. Output only.
usage_reservationstringThe reservation it settled, when it did. Output only.
lateboolSettled after the reservation expired; the usage is still recorded. Output only.

#Methods

Every method of the collection, in the registry's order, with the scope it needs. The full request, response and examples are one link away.

MethodCallWhat it does
POSTcreateRecords usage directly, only for a meter the merchant marked reservation-optional.
GETlistLists usage events, newest first.
POSTcheck_standingReads a subject's standing: active, past due or suspended, whether a payment method is on file, headroom and the threshold.

#create

Records usage directly, only for a meter the merchant marked reservation-optional.

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/usage_events · scope billing:metering:write · effect write · Request, response and examples

#list

Lists usage events, newest first.

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/usage_events · scope billing:read · effect read · paginated · Request, response and examples

#check_standing

Reads a subject's standing: active, past due or suspended, whether a payment method is on file, headroom and the threshold.

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/usage_events:checkStanding · scope billing:read · effect read · Request, response and examples