curl --request POST \
--url https://api.paygentic.io/v0/billableMetrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"unit": "<string>",
"merchantId": "<string>",
"productId": "<string>",
"aggregation": "SUM"
}'
{
"id": "<string>",
"object": "billableMetric",
"name": "<string>",
"description": "<string>",
"merchantId": "<string>",
"unit": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"aggregation": "SUM",
"productId": "<string>"
}
Create a new billable metric for a merchant organization. A Billable Metric
represents a metric that can be used to measure the usage of a Product
. It contains information about the metric, such as its name, description, and units.
curl --request POST \
--url https://api.paygentic.io/v0/billableMetrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"unit": "<string>",
"merchantId": "<string>",
"productId": "<string>",
"aggregation": "SUM"
}'
{
"id": "<string>",
"object": "billableMetric",
"name": "<string>",
"description": "<string>",
"merchantId": "<string>",
"unit": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"aggregation": "SUM",
"productId": "<string>"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Billable metric created successfully
The response is of type object
.