Skip to content

docs: choose the billing account for an API subscription - #1508

Merged
simeng-li merged 4 commits into
simeng-log-14189-37-docs-automate-tenant-creation-page-endpoint-referencefrom
simeng-log-14223-45-r4-docs-docs-milestone
Sep 30, 2026
Merged

simeng-li merged 4 commits into
simeng-log-14189-37-docs-automate-tenant-creation-page-endpoint-referencefrom
simeng-log-14223-45-r4-docs-docs-milestone

Conversation

@simeng-li

Copy link
Copy Markdown
Contributor

Summary

Refs LOG-14223. Stacked on #1507.

Adds a "Choose the billing account" section to the Subscribe a tenant to the Pro plan page, for accounts that hold more than one billing account:

  • GET /api/me/stripe-customers to list them, with an example response and what name, email and isDefault mean.
  • customerId as an optional body field of POST /api/tenants/{tenantId}/subscription to charge a specific billing account for one subscription.
  • PATCH /api/me/stripe-customers/{customerId} with { "isDefault": true } to change the default, and its 204 / 404 / 422 answers.
  • The rule that a tenant that was on a paid plan before keeps its billing account (422 customer_fixed), and that same-key retries must name the same billing account.
  • Two new rows in the errors table (404 customer_not_found, 422 customer_fixed) and the idempotency_key_mismatch row now mentions the billing account.

The Console picker is not documented here: it explains itself in the dialog.

Testing

N/A

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Deploying logto-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 20ed7e4
Status: ✅  Deploy successful!
Preview URL: https://37c4d3d2.logto-docs.pages.dev
Branch Preview URL: https://simeng-log-14223-45-r4-docs.logto-docs.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Deploying logto-docs-tutorials with  Cloudflare Pages  Cloudflare Pages

Latest commit: 20ed7e4
Status: ✅  Deploy successful!
Preview URL: https://7574d743.logto-docs-tutorials.pages.dev
Branch Preview URL: https://simeng-log-14223-45-r4-docs.logto-docs-tutorials.pages.dev

View logs

@simeng-li
simeng-li marked this pull request as ready for review September 28, 2026 06:59
@simeng-li
simeng-li requested review from a team, charIeszhao and wangsijie and removed request for a team September 28, 2026 06:59
Comment thread docs/logto-cloud/subscribe-tenant-to-pro.mdx Outdated
@simeng-li
simeng-li merged commit 4780882 into simeng-log-14189-37-docs-automate-tenant-creation-page-endpoint-reference Sep 30, 2026
19 checks passed
@simeng-li
simeng-li deleted the simeng-log-14223-45-r4-docs-docs-milestone branch September 30, 2026 03:50
simeng-li added a commit that referenced this pull request Sep 30, 2026
* docs: add the subscribe a tenant to the pro plan api guide

* docs: say only a production tenant starts on the free plan

* docs: choose the billing account for an API subscription (#1508)

* docs: choose the billing account for an api subscription

* docs: say a retry ignores the billing account it names

* docs: a retry must name the same billing account

* docs: say which billing account an omitted customerId charges
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants