OpenMeter Customers
Create customer charge
Create customer charge.
post/openmeter/customers/{customerId}/charges
Path parameters
customerIdstring required
ULID (Universally Unique Lexicographically Sortable Identifier).
Example:01G65Z755AFWAKHE12NY0CQ9FH
Request body
Example request
{
"labels": {
"env": "test"
},
"currency": "USD",
"invoice_at": "2023-01-01T01:01:01.001Z",
"service_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"tax_config": {
"stripe": {
"code": "txcd_10000000"
},
"tax_code_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"tax_code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"amount_before_proration": {
"currency": "USD"
},
"full_service_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"billing_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
}
}Response
Charge created 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",
"customer": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"subscription": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"phase": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"item": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
}
},
"currency": "USD",
"invoice_at": "2023-01-01T01:01:01.001Z",
"service_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"full_service_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"billing_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"advance_after": "2023-01-01T01:01:01.001Z",
"tax_config": {
"stripe": {
"code": "txcd_10000000"
},
"tax_code_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"tax_code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"amount_after_proration": {
"currency": "USD"
},
"system_intent": {
"labels": {
"env": "test"
},
"invoice_at": "2023-01-01T01:01:01.001Z",
"service_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"full_service_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"billing_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"amount_before_proration": {
"currency": "USD"
},
"deleted_at": "2023-01-01T01:01:01.001Z"
}
}