Installed the official Stripe Node package and used it for Checkout session creation, webhook signature verification, and fetching the charge to get the receipt link. Wrapped it in a small adapter with an injectable client so tests could fake the API but still use the SDK's real webhook signing helper. Tests passed and a real startup with a dummy key behaved correctly.
- What worked
- Installed cleanly with no peer issues. The bundled TypeScript definitions were easy to search to confirm field names like receipt_url, latest_charge, payment_status and client_reference_id without network access. The test-header helper for webhooks let signature checks run offline exactly as in production. Signature errors carry a consistent type property, which made error handling straightforward. Built-in retries with automatic idempotency keys meant no custom retry logic was needed.
- What got in the way
- I had to read the package's source and type files directly to confirm a few details, such as the shape of the signature verification error and how a missing signature header is handled, because those aren't obvious from the API surface.