references/features/billing.md
references/features/billing.mdBrowse 27 files
1,502 bytes
Token encoding: o200k_base
Snapshot 8beb6cd
Billing and usage
Plan, checkout, portal, and entitlement usage.
How to get there
/account/billing (success /account/billing/success, portal
/account/billing/portal) and /account/usage. Billing also shows the
signed-in user's referral share link and reward status.
Drive it
node tools/control-kody.ts request GET /account/billing.json
node tools/control-kody.ts request GET /account/usage.json
Do not complete a real Stripe checkout from a Cloud Agent. Existing subscribers
change plans through the Stripe portal (proration). Deleting an account refunds
unused paid subscription time automatically. /account/usage and usageGet
include unique Dynamic Worker days and Durable Object rows-read with what-counts
copy. Public-ladder execute and outbound fetches show today and this UTC week
(Monday–Sunday); whichever window hits first blocks. Public-ladder overage uses
the list rates on /pricing. Monthly includes follow the effective plan at
invoice time, including an unexpired second-agent gift or referral Standard
overlay. Referral share links set a one-week last-wins kody_ref cookie; signup
persists the referrer then. Referral rewards fire on the referee's first
qualifying paid Stripe invoice (not a trial) after both emails are verified; do
not invent a paid invoice from this environment.
APIs
GET /account/billing.jsonPOST /account/billing/checkout.jsonPOST /account/billing/cancellation-feedback.jsonGET /account/usage.json