Before you start
- A key with the
billing:adminandbilling:portalscopes, created in Settings → Applications by a workspace admin. Setup endpoints refuse a key whose creator isn’t an admin. - A Stripe test-mode account while you build, so Stripe’s test cards work and nobody is charged.
1. Check where you stand
missing lists what’s left, in the order to do it, in words. Run this again
after each step below; when it’s empty, you’re done.
2. Connect Stripe
Stripe asks a person for consent, so an API key can’t connect it. Get the link and have an admin open it:setup.stripe reads {connected: true, accountName, mode}. Check
mode is test before going further.
3. Name your customer key
Pick the object that holds your customers in Settings → Payments (it carries a field mapping, so it’s set there). Then name the rest by key:"" clears a setting. See Payment
settings for the full list.
4. Add products
A product is a record in your Products object. Creating one pushes its price to Stripe:custral.products.list();
each product’s stripe field says whether Stripe has caught up (synced).
5. Add plans
A plan is what your customers see on their billing page. It names its monthly and yearly products by id or exact name:custral.plans.reorder({keys: ["starter", "growth", "scale"]}).
6. Choose what the page offers
downgradeTiming decides whether a
downgrade waits for the period end. See Billing page
settings.
7. Open a customer’s billing page
Doing it from Stella or MCP
The same setup is available as tools:get_billing_setup,
update_billing_settings, update_billing_page, list_products,
create_product, update_product, list_plans and upsert_plan. The writes follow
the same approval rules as Stella’s other write tools, and none of them charges
anyone.