Donations on files.flamenet.io were being charged to the Extant 2000 platform account, not to FlameNet. A Stripe call that names no connected account is answered against the platform itself — with a 200, a receipt and a real charge — so the page looked correct and the only symptom was which balance the money turned up in.
What changes
FN_DONATE_ACCOUNT is sent as Stripe-Account on the Checkout Session call. The charge becomes a direct charge on FlameNet (acct_1Txvmy…): its balance, its fees, its payout, FLAMENET on the statement. Leaving it blank still means "charge whatever account this key belongs to" — the right answer for a self-hoster — and boot now logs which of the two it is doing.
FN_DONATE_PUBLISHABLE_KEY is the platform'spk_, not the connected account's: a direct charge is confirmed by the platform key scoped with stripeAccount, and the account's own key is the wrong half of that pair.
The payment form opens on the page (ui_mode=embedded_page + initEmbeddedCheckout) instead of handing the donor to checkout.stripe.com and bouncing them back. Card fields are still Stripe's own frame, so this stays out of PCI scope.
Environment.value — blank means absent. Compose sets every VAR: ${VAR:-} to "" and Environment.get returns that, so != nil read an unconfigured deployment as a configured one. The refusals are now specific: a missing publishable key, mismatched key modes, or an FN_DONATE_ACCOUNT that isn't an account id each name themselves rather than rendering a form that cannot work.
⚠️ui_mode=embedded is dead
The current API version rejects it: "The ui_mode value embedded is no longer supported. Use embedded_page instead." Nothing pins a Stripe-Version, so the account default decides — this arrived as a 400 on a live donate page, not as a build failure. Worth knowing before anything else here is written against a documented value.
Verified in production
Deployed to files.flamenet.io before this MR was opened, and checked rather than assumed:
a live session created through the page is No such checkout.session under the platform key alone, and resolves with Stripe-Account: acct_1Txvmy… — ui_mode=embedded_page, livemode=true;
in a real browser the Stripe frame mounts in the page, the URL never leaves /donate, and the console is clean;
boot logs donations are taken on connected account acct_1Txvmy….
No card was entered, so the last inch — a completed charge landing in the FlameNet balance — is untested.
Notes for review
Prod currently runs an image built from a worktree at e04b5a7 plus these changes, not from main; /srv/prod/files/README-donate.md on the box says so. Merging and redeploying from main is what makes that temporary state go away.
The unshipped storage paragraph in your working copy of donate.leaf is deliberately not included — this MR is only the payment flow.
Donations on **files.flamenet.io** were being charged to the **Extant 2000 platform account**, not to FlameNet. A Stripe call that names no connected account is answered against the platform itself — with a 200, a receipt and a real charge — so the page looked correct and the only symptom was which balance the money turned up in.
### What changes
- **`FN_DONATE_ACCOUNT`** is sent as `Stripe-Account` on the Checkout Session call. The charge becomes a **direct charge on FlameNet** (`acct_1Txvmy…`): its balance, its fees, its payout, `FLAMENET` on the statement. Leaving it blank still means "charge whatever account this key belongs to" — the right answer for a self-hoster — and boot now logs which of the two it is doing.
- **`FN_DONATE_PUBLISHABLE_KEY`** is the **platform's** `pk_`, not the connected account's: a direct charge is confirmed by the platform key scoped with `stripeAccount`, and the account's own key is the wrong half of that pair.
- **The payment form opens on the page** (`ui_mode=embedded_page` + `initEmbeddedCheckout`) instead of handing the donor to `checkout.stripe.com` and bouncing them back. Card fields are still Stripe's own frame, so this stays out of PCI scope.
- **`Environment.value`** — blank means absent. Compose sets every `VAR: ${VAR:-}` to `""` and `Environment.get` returns that, so `!= nil` read an unconfigured deployment as a configured one. The refusals are now specific: a missing publishable key, mismatched key modes, or an `FN_DONATE_ACCOUNT` that isn't an account id each name themselves rather than rendering a form that cannot work.
### ⚠️ `ui_mode=embedded` is dead
The current API version rejects it: *"The ui_mode value `embedded` is no longer supported. Use `embedded_page` instead."* Nothing pins a `Stripe-Version`, so the account default decides — this arrived as a **400 on a live donate page**, not as a build failure. Worth knowing before anything else here is written against a documented value.
### Verified in production
Deployed to `files.flamenet.io` before this MR was opened, and checked rather than assumed:
- a live session created through the page is **`No such checkout.session`** under the platform key alone, and resolves with `Stripe-Account: acct_1Txvmy…` — `ui_mode=embedded_page`, `livemode=true`;
- in a real browser the Stripe frame mounts in the page, the URL never leaves `/donate`, and the console is clean;
- boot logs `donations are taken on connected account acct_1Txvmy…`.
No card was entered, so the last inch — a completed charge landing in the FlameNet balance — is untested.
### Notes for review
- Prod currently runs an image built from a worktree at `e04b5a7` plus these changes, **not** from `main`; `/srv/prod/files/README-donate.md` on the box says so. Merging and redeploying from `main` is what makes that temporary state go away.
- The unshipped storage paragraph in your working copy of `donate.leaf` is deliberately **not** included — this MR is only the payment flow.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Donations on files.flamenet.io were being charged to the Extant 2000 platform account, not to FlameNet. A Stripe call that names no connected account is answered against the platform itself — with a 200, a receipt and a real charge — so the page looked correct and the only symptom was which balance the money turned up in.
What changes
FN_DONATE_ACCOUNTis sent asStripe-Accounton the Checkout Session call. The charge becomes a direct charge on FlameNet (acct_1Txvmy…): its balance, its fees, its payout,FLAMENETon the statement. Leaving it blank still means "charge whatever account this key belongs to" — the right answer for a self-hoster — and boot now logs which of the two it is doing.FN_DONATE_PUBLISHABLE_KEYis the platform'spk_, not the connected account's: a direct charge is confirmed by the platform key scoped withstripeAccount, and the account's own key is the wrong half of that pair.ui_mode=embedded_page+initEmbeddedCheckout) instead of handing the donor tocheckout.stripe.comand bouncing them back. Card fields are still Stripe's own frame, so this stays out of PCI scope.Environment.value— blank means absent. Compose sets everyVAR: ${VAR:-}to""andEnvironment.getreturns that, so!= nilread an unconfigured deployment as a configured one. The refusals are now specific: a missing publishable key, mismatched key modes, or anFN_DONATE_ACCOUNTthat isn't an account id each name themselves rather than rendering a form that cannot work.⚠️
ui_mode=embeddedis deadThe current API version rejects it: "The ui_mode value
embeddedis no longer supported. Useembedded_pageinstead." Nothing pins aStripe-Version, so the account default decides — this arrived as a 400 on a live donate page, not as a build failure. Worth knowing before anything else here is written against a documented value.Verified in production
Deployed to
files.flamenet.iobefore this MR was opened, and checked rather than assumed:No such checkout.sessionunder the platform key alone, and resolves withStripe-Account: acct_1Txvmy…—ui_mode=embedded_page,livemode=true;/donate, and the console is clean;donations are taken on connected account acct_1Txvmy….No card was entered, so the last inch — a completed charge landing in the FlameNet balance — is untested.
Notes for review
e04b5a7plus these changes, not frommain;/srv/prod/files/README-donate.mdon the box says so. Merging and redeploying frommainis what makes that temporary state go away.donate.leafis deliberately not included — this MR is only the payment flow.🤖 Generated with Claude Code
mentioned in commit
aa45b9fb82