List customer charges
List customer charges.
Returns the customer's charges that are represented as either flat fee or usage-based charges.
Path parameters
ULID (Universally Unique Lexicographically Sortable Identifier).
Query parameters
Determines which page of the collection to retrieve.
The asc suffix is optional as the default sort order is ascending. The desc suffix is used to specify a descending order. Multiple sort attributes may be provided via a comma separated list. JSONPath notation may be used to specify a sub-attribute (eg: 'foo.bar desc').
Sort charges returned in the response.
Supported sort attributes are:
- id
- created_at
- service_period.from
- billing_period.from
Filter charges.
To filter charges by status add the following query param: filter[status][oeq]=created,active
Expand full objects for referenced entities.
Supported values are:
- real_time_usage: Expand the charge's real-time usage.
Response
Page paginated response.
Example response
{
"data": [
{
"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"
}
}
],
"meta": {
"page": {
"number": 1,
"size": 10,
"total": 100
}
}
}