Get a customer's usage this period
Each of the customer's plans billed by use: used, included and percent per metric, what the next bill comes to so far (amount_so_far), when the allowance starts again (reset_at), the prepaid credit left (credit) and, when your shop sells credit, what the customer may buy (buy_credit), and, when your shop uses spending limits, the subscription's limit (spend_limit). No prices per metric. A shopper's token reads only its own customer (me works). With usage billing turned off, data is empty. Here customer_id is the Comecero customer id, not your own id. Kept for 5 minutes.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
customer_id*stringThe Comecero customer id, or me.
Success.
application/json- response
object?stringAlways list.
data?array<>One entry per active plan billed by use on the customer's subscriptions, at most 20.
curl -X GET 'https://api.comecero.com/api/v1/customers/string/usage'{ "object": "list", "data": [ { "object": "customer_usage", "subscription_id": "SB0123456789", "plan_name": "Team plan", "currency": "USD", "amount_so_far": "12.5", "period_start": "2026-11-01T00:00:00Z", "period_end": "2026-12-01T00:00:00Z", "reset_at": "2026-12-01T00:00:00Z", "as_of": "2026-11-12T10:00:00Z", "metrics": [ { "metric_name": "AI tokens", "unit_label": "token", "used": 830000, "included": 1000000, "percent": 83 } ], "credit": { "balance": "37.5", "expiry": null, "at_zero": "charge" }, "buy_credit": { "presets": [ "10", "25" ], "min": "5", "max": "100", "at_zero": "charge" }, "spend_limit": { "object": "usage_spend_limit", "subscription_id": "SB0123456789", "currency": "USD", "amount": "50", "default": null, "effective": "50", "source": "customer", "spent": "12.5", "committed": "0", "remaining": "37.5", "reset_at": "2026-12-01T00:00:00Z", "customer_can_set": true, "revision": 1 } } ]}List a customer's events GET
A customer's events for one UTC day, newest hour first. Kept for 24 months. Events show here up to about 5 minutes after they are counted. `date` is today or earlier, at most 24 months ago. Secret and trusted tokens may call it; a limited token may not (`403`).
List a customer's credit history GET
The prepaid credit of one subscription's usage plans, every plan it has had: what was added, what bills took and what refunds took back, newest first, a page at a time. Entries have no description: that note is yours, so label them by `type`. A shopper's token reads only its own customer (`me` works). Every amount is in `currency`, the subscription's. With usage billing turned off, `data` is empty and `currency` is null. Here `customer_id` is the Comecero customer id, not your own id.