CluPilotCloud/app/Services/Billing
nexxo d6ec09a9b4 Recognise the product Stripe already has
The gap beside the guard. A run that creates a product and dies before storing
its id leaves an orphan exactly as a price does, and past the key's twenty-four
hours the next run makes a second one — after which activePricesFor() is asked
about the wrong product, price recognition goes blind for the whole family, and
every orphaned price on the first product is unreachable.

Two things are unlike the price side, deliberately. No money gate: a product
carries no amount, so its metadata is the whole of the proof. And a duplicate is
reported, never deactivated — archiving a price is provably harmless because
Stripe keeps billing subscriptions already on it, but deactivating a product
makes its prices unsellable and contracts can be running on those.

Silent about strangers, too. This asks for every active product on the account,
so an operator selling something else through it is an ordinary state, not a
finding worth a line on every run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 17:39:15 +02:00
..
AddonCatalogue.php Ask whether they are a consumer, and let one change their mind 2026-07-29 21:06:06 +02:00
AddonPrices.php Recognise the product Stripe already has 2026-07-30 17:39:15 +02:00
AdoptStripePrice.php Make the fake behave like Stripe where it matters 2026-07-30 17:14:46 +02:00
AdoptStripeProduct.php Recognise the product Stripe already has 2026-07-30 17:39:15 +02:00
CustomDomainAccess.php Serve the custom domain, not just announce it 2026-07-29 16:44:52 +02:00
DowngradeCheck.php Deliver the storage a customer actually buys 2026-07-29 19:13:10 +02:00
InvoiceArchive.php Leave the archive readable by whoever collects from it 2026-07-29 03:48:03 +02:00
InvoiceDocument.php Say the same thing to the customer, the register and the bank 2026-07-30 01:30:24 +02:00
InvoiceMath.php Charge the price the website shows, and hand a withdrawal back in full 2026-07-29 22:42:02 +02:00
InvoiceNumbers.php Lay the foundation for self-issued invoices: series, numbers, frozen documents 2026-07-29 00:57:06 +02:00
InvoiceRenderer.php Say the same thing to the customer, the register and the bank 2026-07-30 01:30:24 +02:00
IssueInvoice.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
PlanCatalogue.php Sell the year as well as the month, and say what it saves 2026-07-30 15:44:35 +02:00
PlanChange.php Book a downgrade for a date that cannot move, and sell a module once 2026-07-29 17:51:37 +02:00
PlanPrices.php Put the price recognition back, all 3526 lines of it 2026-07-30 16:35:55 +02:00
SampleInvoice.php Print every line at full price and take the discount off once, in euros 2026-07-29 01:59:56 +02:00
SetupFee.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
StorageAllowance.php Deliver the storage a customer actually buys 2026-07-29 19:13:10 +02:00
StripeInvoiceLines.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
TaxTreatment.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
WithdrawalRight.php Charge the price the website shows, and hand a withdrawal back in full 2026-07-29 22:42:02 +02:00