Create a new metered cost for a product.
API key authentication
The cost type. Only metered costs are supported; they track usage via events.
metered Human-readable name for the cost.
Cost per unit, multiplied by measured quantity to compute total cost. Must be non-negative.
x >= 0ISO 4217 currency code (e.g. USD, EUR).
The product ID this cost belongs to.
^prod_[a-zA-Z0-9]+$Aggregation method for the metered event.
SUM, COUNT, AVG, MIN, MAX, UNIQUE_COUNT, LATEST CloudEvents type that identifies the metered event.
Unit label for metered costs (e.g. 'token', 'request'). Only valid for metered costs.
JSONPath to extract numeric value from event data. Required for SUM/AVG/MIN/MAX/LATEST aggregations.
Map of dimension name to JSONPath for group-by queries. Only valid for metered costs.
The merchant organization ID that owns this cost.
^org_[a-zA-Z0-9]+$Cost created successfully
Unique identifier for a cost
^cst_[a-zA-Z0-9]+$cost metered Decimal as string to avoid floating point precision loss.
Unique identifier for a product
^prod_[a-zA-Z0-9]+$Unique identifier for an organization
^org_[a-zA-Z0-9]+$SUM, COUNT, AVG, MIN, MAX, UNIQUE_COUNT, LATEST Soft-delete timestamp. Always null for active costs returned by the API.