foldrun 2.10.8 → 2.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/budgets-and-billing.md +24 -15
- package/package.json +1 -1
|
@@ -174,8 +174,9 @@ credit closest to expiring is always the credit being used. Spend draws on the c
|
|
|
174
174
|
on the balance. A new account starts with **300 trial credits**, no card
|
|
175
175
|
asked. Without a plan, credit costs 1¢ each, one run at a time, up to 3
|
|
176
176
|
workspaces, standard lane — a plan is cheaper from the first month you would have spent its fee
|
|
177
|
-
anyway. Changing plan
|
|
178
|
-
bundle
|
|
177
|
+
anyway. Changing plan is charged at once, prorated by Stripe; the new plan
|
|
178
|
+
and its bundle land when that invoice is paid — a change whose payment
|
|
179
|
+
fails leaves you on the plan you had. Ending one ends it with the cycle.
|
|
179
180
|
|
|
180
181
|
**Seats are unlimited** on every plan: agents work, people supervise, and a
|
|
181
182
|
per-seat fee would tax the approver the safety story depends on.
|
|
@@ -419,13 +420,16 @@ The bookkeeping rules behind the numbers, for whoever has to answer "why is
|
|
|
419
420
|
my balance this".
|
|
420
421
|
|
|
421
422
|
**One grant per plan cycle.** A cycle is the subscription, the plan and the
|
|
422
|
-
end of the period it pays for, and that is the grant's key.
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
423
|
+
end of the period it pays for, and that is the grant's key. A grant needs
|
|
424
|
+
the money: a paid checkout (or one with nothing to pay), the checkout
|
|
425
|
+
returning paid, or `invoice.paid` — whichever arrives first grants and the
|
|
426
|
+
rest find it done. `customer.subscription.updated` moves the plan's
|
|
427
|
+
status, never its credits: Stripe applies a price change even when its
|
|
428
|
+
invoice then fails. Each invoice grants the plan **it** paid for, read off
|
|
429
|
+
its own lines, not whatever the subscription has moved to since; and a
|
|
430
|
+
paid invoice for a period older than the one already granted grants
|
|
431
|
+
nothing. A plan change inside a period is a new cycle on the new plan; a
|
|
432
|
+
renewal is a new period. A change inside a period grants the new plan's bundle **pro-rated
|
|
429
433
|
by the share of the period left**, the way Stripe prorates the charge; a
|
|
430
434
|
renewal grants it whole. Going back to a plan already granted this period
|
|
431
435
|
switches the plan and its gates back but grants nothing again. Downgrades
|
|
@@ -500,12 +504,17 @@ is `<public url>/api/billing/stripe`, sending exactly:
|
|
|
500
504
|
| `charge.dispute.closed` | won: it goes back on; lost: it stays off |
|
|
501
505
|
|
|
502
506
|
Every delivery is logged — the event, the account, what was done or the
|
|
503
|
-
error, and a hash of the payload
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
507
|
+
error, and a hash of the payload. Since 28 Oct 2026 the event itself is
|
|
508
|
+
kept too, for the types above only, up to 256 KB, set when it first
|
|
509
|
+
arrives and emptied after **180 days**: Stripe keeps events for 30, and a
|
|
510
|
+
replay after that needs a copy. It carries what Stripe sends (names,
|
|
511
|
+
emails, addresses, a card's last four digits — never a full card number),
|
|
512
|
+
so only the super admin's console reads it and lists never load it. The
|
|
513
|
+
super admin lists the log at `GET /api/admin/stripe-events` and replays
|
|
514
|
+
one event with `POST /api/admin/stripe-events/<id>/replay` — Stripe's copy
|
|
515
|
+
while Stripe has it, the kept copy after — through the same handler; every
|
|
516
|
+
write it makes is keyed once, so a replay of an event that was handled
|
|
517
|
+
changes nothing.
|
|
509
518
|
|
|
510
519
|
## Plan gates
|
|
511
520
|
|