Charges
Update a charge
Update charge configuration including pricing, ranges, and filters.
patch/api/charges/{id}
Path parameters
idstring required
Charge ID
Request body
Example request
{
"graduatedRanges": [
{
"toValue": 100,
"perUnitAmount": 0.1
}
],
"filters": [
{
"key": "region",
"values": [
"us-east"
]
}
]
}Response
Charge updated
Example response
{
"id": "clx1234567890",
"planId": "clxplan123",
"billableMetricId": "clxbm123",
"chargeModel": "GRADUATED",
"billingTiming": "IN_ARREARS",
"invoiceDisplayName": "API Usage",
"minAmountCents": 100,
"graduatedRanges": [
{
"id": "clx1234567890",
"toValue": 1000,
"perUnitAmount": "0.0100",
"flatAmount": "0.0000"
}
],
"filters": [
{
"id": "clx1234567890",
"key": "region",
"values": [
"us-east"
]
}
]
}