comecerodocs

Usage

Send usage events, read totals and inspect the events behind a bill.

Endpoints

post/customers/{customer_id}/credit_purchase_quotesQuote credit quantityget/usage/summaryRead counted usageget/usage/eventsList a customer's eventsget/customers/{customer_id}/usageGet a customer's usage this periodget/customers/{customer_id}/usage/{subscription_id}/credit_historyList a customer's credit historyget/customers/{customer_id}/usage/{subscription_id}/spend_limitGet a customer's spending limitpatch/customers/{customer_id}/usage/{subscription_id}/spend_limitRaise a customer's spending limit with their consentput/customers/{customer_id}/usage/{subscription_id}/spend_limitSet a customer's spending limitpost/customers/{customer_id}/usage/{subscription_id}/spend_limit/quotesQuote a spending limit raise or a one-time extradelete/customers/{customer_id}/usage/{subscription_id}/spend_limit/burstTake back this period's one-time extraput/customers/{customer_id}/usage/{subscription_id}/spend_limit/burstOpt in to this period's one-time extraget/customers/{customer_id}/usage/{subscription_id}/spend_limit/changesList a customer's spending limit changesget/customers/{customer_id}/usage/{subscription_id}/auto_top_upGet a customer's automatic top-uppatch/customers/{customer_id}/usage/{subscription_id}/auto_top_upTurn a customer's automatic top-up on or offpost/customers/{customer_id}/usage/{subscription_id}/auto_top_up/quotesQuote an automatic top-upget/customers/{customer_id}/usage/{subscription_id}/auto_top_up/attemptsList a customer's automatic top-upspost/customers/{customer_id}/credit_purchasesBuy prepaid creditpost/v1/eventsSend usage events

Guides that use it

API endpoint and requests

The base URL of the Comecero API, why every call must use HTTPS, and the headers and JSON body format that every request and response uses.

Reports and analytics

MRR, churn, sales, card approval, storefront visits and usage for your shop, in the dashboard, the API and Claude, with what each number means.

Reports API

Read every analytics report for your shop with GET /api/v1/reports/{name}, including MRR, churn, card approval, storefront visits and usage.

Sell prepaid credit

Let customers buy prepaid usage credit with an invoice, add it once payment completes, and follow the balance, credit history, refunds and spending limits.

Credit units and purchases

Configure a credit unit, publish currency rates, price metered usage, and follow quoted purchases through payment, posted balances, refunds, and receipts.

Credits and burndown

Sell prepaid credit, add it safely with an idempotency key, read the balance, and see exactly what is used first when usage is billed.

Follow usage

See usage this period so far, the shopper's own usage, the events behind a bill, and webhook alerts when a customer nears their allowance.

How usage is billed

Billing periods, late usage, usage on the renewal invoice, the separate usage invoice, prepaid credit, billing runs, held bills and test mode.

Usage with subscriptions

Sell a plan with a monthly fee and usage on top. How usage follows the subscription through renewals, plan changes, cancellations and failed payments.

Usage billing API

Every usage billing route on the Comecero API, grouped by resource, with who may call it and a link to its full page in the API reference.

Usage meter API

The one usage meter route your server calls. Send usage events to POST /v1/events with a usage key, and read every field, answer and status code.