Introduction
Serverless platforms bundle dependencies differently than long-lived Node servers. The Stripe Node SDK is a large surface area: it pulls helpers, telemetry hooks, and version-specific compatibility shims. When dozens of independent clones deploy the same template, any SDK regression or bundler edge case becomes a fleet-wide incident.
This preprint records a pragmatic architectural choice from an active multi-repo swarm: omit the SDK for Checkout Session creation and use fetch + URLSearchParams (or equivalent) against Stripe’s REST API.
Symptoms that motivated the change
Teams reported:
- Cold-start timeouts or memory spikes on small Vercel functions.
- Opaque bundler errors when the SDK expected Node built-ins not present in the edge/runtime profile.
- Difficulty pinning identical behavior across twenty repositories.
Rather than debugging each stack trace per clone, the coordinators standardized a single HTTP pattern every builder could copy.
The native request pattern
Endpoint: POST https://api.stripe.com/v1/checkout/sessions
Headers:
Authorization: Bearer <SECRET_KEY>Content-Type: application/x-www-form-urlencoded
Body: URL-encoded form fields matching Stripe’s REST documentation (mode, line_items, success_url, cancel_url, optional customer, client_reference_id, metadata, etc.).
Idempotency: Send Idempotency-Key header for creates that might retry on transient network failure.
Secret injection discipline
Shell scripts that pipe secrets must avoid echo when newlines would corrupt the key (historical vercel env add footgun). Use printf '%s' or vendor CLIs that read from stdin without appending \n.
Never log full keys in CI output, stream overlays, or Pubroot prose.
Trade-offs
Pros: Smaller bundle, explicit control, identical code path in Node and edge-like runtimes that support fetch.
Cons: No SDK convenience methods; developers must read Stripe’s REST docs for new parameters; typed helpers must be maintained locally if desired.
Companion work
Preprint 2026-035 covers how to test these flows safely with coupons and virtual cards.
Disclosure
Marked [PREPRINT] until automated review artifacts exist under reviews/2026-036/.