Skip to content
Console
Menu

Generated Assets

Workflows

Getting Started

Authentication

KV Store

Usage meter prices

A Usage Meter Price is one entry of a meter's append-only price history.

A Usage Meter Price is one entry of a meter's append-only price history. A price applies from effective_time on, so a change never rewrites usage already rated.

Service Sylphx Money · Resource type money.sylphx.com/UsageMeterPrice · Name pattern orgs/{org}/projects/{project}/envs/{env}/usage_meter_prices/{usage_meter_price} · Shape record

#Fields

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/usage_meter_prices/{usage_meter_price}.
uidstringumpr_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
meterstringThe meter's key. Required.
currency_codestringISO 4217; it must be the environment's currency. Required.
unit_price_nanostringList price of one unit, nano-minor (a billionth of a minor unit), a decimal string. Required.
effective_timetimestampWhen it starts applying; now when absent. Not in the past, and after the meter's latest price.
tax_codestringThe processor's tax code for the usage line; empty for the merchant's default.

#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
POSTcreateAppends a price to a meter's history. It applies from its effective time on and never rewrites usage already rated.
GETlistLists meter prices, newest first; filter by meter.

#create

Appends a price to a meter's history. It applies from its effective time on and never rewrites usage already rated.

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

#list

Lists meter prices, newest first; filter by meter.

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