Get a customer's automatic top-up
One subscription's automatic top-up of its prepaid credit: whether the shop offers it, whether it is on and why not, the amounts and the card the customer accepted, this month's caps and what they used, and the latest top-up. Send its revision back when you change it. 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 automatic top-up.
application/json- response
A customer's automatic top-up of one subscription's prepaid credit: while it is on and the credit falls below below_amount, one top-up of add_amount is bought (giving principal of credit), charged to the saved card the customer accepted, and not again until the credit is back at or above below_amount and falls below it again. Each top-up is tried once and never retried. A failed or unknown payment, a chargeback or a change of the default card turns it off, and only the customer's fresh consent turns it on again. While the shop does not offer it (it stopped top-up or credit sales), no top-up is made and an accepted consent shows as paused: it starts again by itself once offered again, and can still be turned off. Comecero switching usage billing off for the shop, or the subscription's last usage plan ending, turns it off instead. Amounts are decimal strings in currency.
object?stringsubscription_id?stringcurrency?stringThe currency of the subscription's usage plans, which every amount is in. With no single usage plan left, the currency the top-up was saved in.
offered?booleanWhether the shop offers automatic top-up now (usage_customer_settings.auto_top_up.enabled, with credit sales on).
enabled?booleanWhether it is on. False whenever it is not offered.
paused?booleanThe customer's consent stands but the shop does not offer it now (it stopped top-up or credit sales): nothing is charged, it starts again by itself once offered again, and it can still be turned off. Show the customer a way to turn it off. Comecero switching usage billing off turns it off instead, and so does the subscription's last usage plan ending (within the hour, paused or not).
status?stringoff: never turned on, or turned off by the customer. active: on, and it tops up the next time the credit falls below below_amount. awaiting_rearm: on, it topped up, and waits for the credit to be back at or above below_amount first. cap_reached: on, but this month's caps are used up until next_reset_at. disabled: stopped for disabled_reason.
"off""active""awaiting_rearm""cap_reached""disabled"disabled_reason?|Why it was stopped, while it is off. merchant_disabled also while the shop does not offer it (it comes back on when the shop offers it again). disputed: a credit purchase was charged back. payment_method_changed: the default card is no longer the one the customer agreed to. payment_failed, payment_unknown: a top-up's payment failed, or its result is not known yet. price_changed: one top-up would now give other credit or charge more than the customer agreed to (a new price or tax). subscription_ended: the subscription ended.
"customer_disabled""merchant_disabled""disputed""payment_method_changed""payment_failed""payment_unknown""price_changed""subscription_ended"nullbelow_amount?|Top up when the credit is below this. Null before it was ever turned on.
add_amount?|The amount each top-up buys, as its invoice line is priced (tax included where prices include tax).
principal?|The credit one top-up gives, as the customer accepted it: the price before tax, so less than add_amount where prices include tax. Null before it was ever turned on.
authorized_max_gross?|The most one top-up may charge, tax included, as the customer accepted it. A later price above it is not charged.
monthly_max_count?|The most top-ups this month in force now, the lower of the cap the customer accepted and the shop's now (a shop's raise never grows a consent). Null when not offered and never set up.
monthly_max_amount?|The most top-ups may charge this month, tax included, the lower of the cap the customer accepted and the shop's now; null for no cap.
month?stringThe UTC month the caps count in, as YYYY-MM.
month_count?integerThe top-ups this month across the customer's subscriptions in this currency, those under way too.
month_amount?stringWhat they charge, tax included.
next_reset_at?stringWhen the monthly caps start again (the first of next month, UTC).
date-timepayment_method?|The saved card a top-up charges, as the customer may see it. No vault or gateway ids.
last_attempt?|The latest top-up, with its state, gross, currency and trigger_at only. See the attempts route for the rest.
revision?integerGoes up by one with every change; 0 before any. Send it back as expected_revision.
0 <= valuedate_modified?|date-timecurl -X GET 'https://api.comecero.com/api/v1/customers/string/usage/string/auto_top_up'{ "object": "usage_auto_top_up", "subscription_id": "SB0123456789", "currency": "USD", "offered": true, "enabled": true, "status": "active", "disabled_reason": null, "below_amount": "10", "add_amount": "20", "principal": "16.67", "authorized_max_gross": "20", "monthly_max_count": 3, "monthly_max_amount": "200", "month": "2026-11", "month_count": 1, "month_amount": "20", "next_reset_at": "2026-12-01T00:00:00Z", "payment_method": { "type": "credit_card", "brand": "Visa", "ending": "4242" }, "last_attempt": null, "revision": 1, "date_modified": "2026-11-15T12:00:00Z"}List a customer's spending limit changes GET
Every change of the customer's spending limit on one subscription, newest first (the last 500): limits set and cleared, raises and one-time extras with the words the customer accepted, and extras taken back. A shopper's token reads only its own customer's (`me` works) and gets neither the address (`ip`) nor who by id (`by_id`).
Turn a customer's automatic top-up on or off PATCH
On: send `enabled` true with a `quote_id` from `POST .../auto_top_up/quotes` and `consent_accepted` true. Only the customer's own login can turn it on, since it is their consent to the quote's terms; the consent (the exact `consent_text`, the amounts, the card, who and from where) is kept as evidence, and the top-up is bound to that card. Accepting the same quote again changes nothing and answers the same. Accepting a new quote while it is on changes its amounts. Off: send `enabled` false; you or the customer may turn it off, and turning off what is off changes nothing. `expected_revision` is required, so a change made since you read it is never overwritten. The `Idempotency-Key` header is required: the request is kept (its body, then its answer, for a day) before anything changes, so a retry with the same key and body answers as the first did and changes nothing twice, and the same key with another body is refused.