Get a customer's spending limit
The spending limit on one subscription's usage: the customer's own, the shop's default and the one in force, with the revision to send back when you change it, and this period's one-time extra (burst, burst_offered). Secret and trusted tokens also get every change made to it (changes). A shopper's token reads only its own customer (me works). Here customer_id is the Comecero customer id, not your own id.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
customer_id*stringThe Comecero customer id, or me.
subscription_id*stringThe customer's subscription.
The spending limit.
application/json- response
A customer's spending limit on one subscription's usage, in the usage plan's currency. The limit covers usage charges only, before tax: not the plan's regular price, and not tax, which is added on the invoice as usual. Usage paid with prepaid credit counts toward it too, and usage past it in a period is neither billed nor drawn from credit: the limit is shared out across the usage first, and only that share is paid with credit or cash. A limit of 0 means no usage spend. A change applies at once to usage not billed yet; what this period's bills already committed still counts, so a limit below it means no more usage spend this period. The customer gets a warning email at 50 and 80% and an email at 100%; at 100% you get the usage:spend_limit_reached webhook, once per period and limit (again after a change). While your shop uses spending limits, a period that has ended, and its late usage, is billed under the limit in force at its end: the customer's own limit and your allow_spend_limit and default_spend_limit as they were then. While it uses none (allow_spend_limit false and default_spend_limit null), an ended period whose first bill runs then has no limit, and late usage for a period billed under a limit keeps the limit that bill used. Amounts are decimal strings.
object?stringsubscription_id?stringcurrency?stringThe currency of the subscription's usage plans, which every amount is in.
amount?|The customer's own limit. Null when they set none, when the shop does not let customers set one (customer_can_set false), or when it was set for a plan in another currency.
default?|The shop's limit for customers who set none (default_spend_limit). Null when there is none.
effective?|The limit now, amount or else default. Null when there is none.
source?|Where effective comes from, customer (their own) or default (the shop's). Null when there is no limit.
"customer""default"nullspent?stringThe usage spend this period so far, before tax: what the period's bills already took (committed) and the usage not billed yet, credit paid and cash, every usage plan of the subscription.
committed?stringThe part of spent that bills of this period already charged.
remaining?|What is left of this period's limit, before tax, never below 0, with this period's one-time extra (burst) while it is in force. Null when there is no limit.
reset_at?|When the period ends and spent starts again from 0. Null when not known.
date-timecustomer_can_set?booleanWhether the shop lets customers set their own limit (allow_spend_limit).
revision?integerGoes up by one with every change; 0 before any. Send it back as expected_revision to change the limit only if nobody changed it since.
0 <= valuechanges?array<>Every change, newest first (the last 500), as evidence for a dispute. Secret and trusted tokens only: left out for a shopper's token.
burst_offered?booleanWhether the customer can ask for a one-time extra this period now (POST .../spend_limit/quotes with operation burst): the shop offers one, the limit in force is above 0, and this period has had none. Left out when the shop never set spend_limit_burst.
burst?This period's one-time extra, in any status. Left out when the period has none.
effective_limit_amount?stringThe most this period's usage may be charged, before tax: the limit in force (effective) plus the one-time extra while it is in force, never below what this period's bills already committed. After the extra is taken back, the limit, or what was committed if that is more. Left out when the period has no extra (the most is then effective).
curl -X GET 'https://api.comecero.com/api/v1/customers/string/usage/string/spend_limit'{ "object": "usage_spend_limit", "subscription_id": "SB0123456789", "currency": "USD", "amount": "50", "default": null, "effective": "50", "source": "customer", "spent": "12", "committed": "0", "remaining": "38", "reset_at": "2026-12-01T00:00:00Z", "customer_can_set": true, "revision": 1, "changes": [ { "at": "2026-11-12T09:30:00Z", "by_type": "customer", "by_id": "0093717976099CuAiEBXu4", "from": null, "to": "50", "ip": "203.0.113.7" } ]}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.
Raise a customer's spending limit with their consent PATCH
Accepts a raise quoted with `POST .../spend_limit/quotes` (`operation` `raise`): the limit becomes the quote's `amount`, and the customer's consent (the quote's `consent_text`, when and from where) is kept in the change log as evidence. Only from the customer's own login, before the quote's `expires_at` (10 minutes, never past the end of the billing period it was made in), in that same period, and only while the limit and the shop's settings are as they were quoted. The same quote sent again answers what the first request answered and changes nothing more. An `Idempotency-Key` header is required, new for each change, so a retry after a timeout answers the first answer (for a day) even if the change was made but its answer was lost; the key with another body is refused. The customer gets an email confirming it (notification `subscription:spend_limit_changed`, when it is on) and you get the `usage:spend_limit_changed` webhook. A plain `PUT` still sets, lowers or clears the limit.