Licence server: billing engine error codes (LIC-BILLING-*)
Answered by the billing engine of the licence server (subscriptions and renewals held by the licence server, Stripe
only charges; plan: billing-engine.md, guide: billing-engine.md)
as application/problem+json (type, title, status, code). The routes that use the engine (purchases, plan
changes, cancel, pay now, update card) add their own refusals (session, CSRF, rate limits).
| Code | Status | Where | Meaning | What to do |
|---|---|---|---|---|
LIC-BILLING-OFF | 503 | every engine call | [billing] enabled = false, or Stripe is not configured. | Turn the engine on (operator). |
LIC-BILLING-NOT-FOUND | 404 | change, cancel, resume, pay now | No such subscription (or not the caller's). | Reload the list. |
LIC-BILLING-STATE | 409 | change, cancel, resume, pay now | Not possible in the current status (for example an increase while past due, resume after the period ended, pay now with nothing owed). | Pay what is owed first, or start a new purchase. |
LIC-BILLING-EXISTS | 409 | purchase | The item already has a running subscription. | Change that subscription instead. |
LIC-BILLING-DECLINED | 402 | purchase with the saved card, increase | The card was declined; nothing changed. | Update the card and try again. |
LIC-PRECONDITION-FAILED | 412 | change, cancel, resume | The subscription changed since it was read (version / If-Match). | Reload it and try again. |
LIC-PAYMENT-CURRENCY | 422 | purchase | OXXO or SPEI in a currency other than Mexican pesos. | Pay by card, or buy in MXN. |
LIC-STRIPE-UNAVAILABLE | 502 | every call that reaches Stripe | Stripe did not answer; nothing was charged twice (each charge has its own idempotency key). | Try again later. |
LIC-BILLING-NO-CARD | 409 | phone-number order (POST /v1/voice/accounts/{company}/dids/orders) | The engine charges each number's fee to the card on file, and the account has none. | Add a card on the account page, then order again. |
LIC-BILLING-ACTION-REQUIRED | 402 | voice bundle and Global eSIM bundle purchase or change (problem with manage_url) | The bank asks the customer to confirm the payment; manage_url is the hosted page. The product starts (or the change applies) when it is paid. | Open the page and confirm the payment. |
The licence checkout (POST /v1/checkout, POST /v1/portal/checkout) answers with the engine as before (url of the
page to pay on, the OXXO voucher or the SPEI instructions), plus subscription, paid and trial_days. A coupon
that is not usable is LIC-COUPON-INVALID (422) as before; the engine computes the discount itself (no Stripe coupon).