Create a new metered cost for a product.
Documentation Index
Fetch the complete documentation index at: https://docs.paygentic.io/llms.txt
Use this file to discover all available pages before exploring further.
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 a numeric value from event data. Must start with $. (example: $.amount or $.payload.bytes). Required for SUM/AVG/MIN/MAX/LATEST aggregations.
^\$\.[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*$Map of dimension name to JSONPath for group-by queries. Each value must start with $. (example: $.region). 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.