OpenMeter Customers
Void credit grant
Void a credit grant, forfeiting the remaining unused balance.
Voiding is a forward-looking, irreversible operation. Credits already consumed by usage remain unaffected — only the remaining balance is forfeited. The grant reads as voided status afterwards. Payment state is not adjusted when payment_adjustment is none, so invoice-backed or externally collected payments may still collect the original amount. Only active grants can be voided; voiding a pending, expired, or fully consumed grant returns a conflict. Retrying a successful void is an idempotent success.
post/openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void
Path parameters
customerIdstring required
ULID (Universally Unique Lexicographically Sortable Identifier).
Example:01G65Z755AFWAKHE12NY0CQ9FH
creditGrantIdstring required
ULID (Universally Unique Lexicographically Sortable Identifier).
Example:01G65Z755AFWAKHE12NY0CQ9FH
Request body
Response
CreditGrant updated response.
Example response
{
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"labels": {
"env": "test"
},
"created_at": "2023-01-01T01:01:01.001Z",
"updated_at": "2023-01-01T01:01:01.001Z",
"deleted_at": "2023-01-01T01:01:01.001Z",
"currency": "USD",
"purchase": {
"currency": "USD"
},
"tax_config": {
"tax_code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"invoice": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"line": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"filters": {
"features": [
"input_tokens",
"output_tokens"
]
},
"effective_at": "2023-01-01T01:01:01.001Z",
"key": "019ae40f-4258-7f15-9491-842f42a7d6ac",
"expires_at": "2023-01-01T01:01:01.001Z",
"voided_at": "2023-01-01T01:01:01.001Z"
}