Get a billing agreement
One agreement. Secret and trusted tokens may call it; a limited token may not (403).
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
agreement_id*stringThe agreement id.
Success.
application/json- response
Links your id for a customer to one of their Comecero subscriptions.
object?stringAlways billing_agreement.
agreement_id?stringYour id, or agr_ plus 32 characters.
customer_id?stringYour id for the customer: the external_customer_id in usage events.
subscription_id?stringThe Comecero subscription the usage is billed next to.
currency?stringThe subscription's currency.
status?stringactive, or ended after its last late-usage pass.
"active""ended"effective_from?stringWhen billing starts.
date-timeeffective_to?|When billing stops.
date-timebilled_through?stringUsage is billed up to this hour.
date-timelast_billing_run_id?|The last completed billing run.
billing_region?stringBilling region. Defaults to us.
"us""uk""eu"test?booleanTest or live.
curl -X GET 'https://api.comecero.com/api/v1/usage/agreements/string'{ "object": "billing_agreement", "agreement_id": "agr_cust_8412", "customer_id": "cust_8412", "subscription_id": "SB0123456789", "currency": "USD", "status": "active", "effective_from": "2026-11-01T00:00:00Z", "effective_to": null, "billed_through": "2026-11-01T00:00:00Z", "last_billing_run_id": null, "billing_region": "us", "test": false}Create or update a billing agreement POST
Links your id for a customer (the `external_customer_id` your app sends to the usage meter) to one of their Comecero subscriptions, which pays for the usage. Send an existing `agreement_id` to update it, and `effective_to` to end it. It answers `201` for a create and for an update. Only one agreement per customer can cover any hour, and the currency must be the subscription's. Secret and trusted tokens may call it; a limited token may not (`403`).
Get usage this period so far GET
Used, included, percent and amount so far for each metered entitlement, worked out as the next bill will be, before prepaid credit. Kept for 5 minutes, so it can be a few minutes behind. Secret and trusted tokens may call it; a limited token may not (`403`).