CluPilotCloud/app/Services/Stripe
nexxo ca575e6df1 Let the catalogue ask Stripe what it already has
Nothing here could. The client could create, archive and unarchive a Price and
had no way to list one, so a run that died between Stripe's create and our
insert left an orphan our table never learned about — and once the key expired,
the next run made a second live Price for the same money.

Paged to the end like invoiceLines(), because a family Product collects a Price
per version, term, treatment and rate change, and stopping at the first page
would leave the orphan unfound and mint the duplicate anyway.

updatePriceMetadata() alongside it: metadata is one of the few fields a Price
lets you change, which is why the metadata format is not part of a Price's
identity and why an adopted orphan is brought up to date rather than replaced.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 10:54:23 +02:00
..
FakeStripeClient.php Let the catalogue ask Stripe what it already has 2026-07-30 10:54:23 +02:00
HttpStripeClient.php Let the catalogue ask Stripe what it already has 2026-07-30 10:54:23 +02:00
IdempotencyKey.php One source for what counts as the same call 2026-07-30 10:46:46 +02:00
StripeCheck.php Manage the Stripe key from the console, behind a password and a test 2026-07-27 09:01:16 +02:00
StripeClient.php Let the catalogue ask Stripe what it already has 2026-07-30 10:54:23 +02:00