Edge Computing with Cloudflare Workers
Announcing native support for Stripe’s JavaScript SDK in Cloudflare Workers

Announcing native support for Stripe’s JavaScript SDK in Cloudflare Workers

11/19/2021 · Kristian Freeman

What this post added

This post announces the general availability of the Stripe JavaScript SDK for Cloudflare Workers. Previously, developers had to use Stripe's REST API due to Node.js dependencies in the SDK. This update enables direct use of the Stripe SDK within Workers, simplifying integration for payment processing and webhook handling. It highlights the use of `Stripe.createFetchHttpClient()` and `Stripe.createSubtleCryptoProvider()` for compatibility with the Workers runtime. It also showcases integration with Cloudflare Pages' serverless function support and provides example code for initiating Stripe Checkout sessions and validating webhooks.

Read the original post ↗