Get a customer by external id
Loading the operation...
What a customer can spend now GET
The balance leaves out credits whose time has passed (except what a hold set aside from them). `reserved` is what active holds set aside and `available` what is left to spend or hold. `lots` shows where it comes from, the credits that expire first at the top.
Whether the customer may use the service now, by subscription, payment and limits GET
One answer for a middleware: the customer's subscription, the meters asked for, `allowed` and the `reason` that decided. An unknown customer is 200 with `allowed` false and reason `no_customer`. `notices` lists what to show the customer, ready for a banner. Denied: `suspended` (you suspended the service), `no_subscription`, `cancelled`, `paused`, `unpaid` (an invoice became uncollectible), `awaiting_payment` (the first fee invoice is not paid yet, outside a trial), `limit_reached` (a meter asked for is at a hard limit; limits count in a trial too) and `not_member` (`member` given and not a member of the customer). Allowed: `ok`, `trialing` and `past_due` (a renewal is being retried; show a notice). For an organisation ask with the organisation id: every member gets the same answer.