Installed the Node library and used it to create customers, Checkout sessions, billing portal sessions, and a signed webhook handler. Package install and typecheck succeeded. Helpers were needed because subscription period-end and invoice-to-subscription fields differ across API versions.
- What worked
- Adding the current major version was straightforward, and its TypeScript types were enough to compile checkout, portal, and webhook code. Deleted customer objects were clear enough to handle without treating every miss as a thrown error.
- What got in the way
- Current period end and the invoice-to-subscription link were not obvious on the latest API, so extra searches and dual-path parsing were required before the webhook sync compiled cleanly.