Buun Group Developers
Pages

Plans

What a person pays for lives at Buun Identity, product by product. A product asks for it each time it matters, with the access token it already holds.

Markdown

How a plan set in the staff console reaches a productHow a plan set in the staff console reaches a product

Reading a plan

http
GET /oauth/plans
Authorization: Bearer <access token>
json
{ "sub": "usr_...", "plans": [{ "product": "plotwork", "plan": "pro", "endsAt": null }] }
FieldMeaning
productA product id from @buun-group/core: plotwork, flung, gunspec, destroy, cryptflare
planThe plan's name, lower case, such as pro
endsAtWhen it ends, in milliseconds since the epoch, or null for no end

The address is also in the issuer's metadata as buun_plans_endpoint.

Who is told what

Calling clientTold
A Buun Group product's own clientThat product's plan, and no other
Another company's clientNone

Only a plan that is active and has not ended is listed. It is read at the moment of asking, so a plan staff cancel is gone at the next request. Never keep a plan in a token or a long cache.

Setting a plan

Until billing is built, staff set a plan by hand in the staff console: People, the person, Plans. The gateway's token exchange checks the same plan before it lets an agent reach a product.