SpellcraftAI / stripe-edge

A simple, untyped Stripe API client for Edge Runtime.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stripe Edge

A simple, untyped (for now) Stripe API client for Edge.

Usage

await Stripe(
  // 'subscriptions', 'prices/:id' etc.
  endpoint,
  // endpoint parameters
  params,
  // { method, apiKey }
  options
)

Setup

Set the following env vars at runtime (Next.js etc. do this for you):

STRIPE_TEST_MODE="false"
STRIPE_SECRET_KEY=""
STRIPE_SECRET_TEST_KEY=""

The library will automatically use the correct key given test mode or not.

About

A simple, untyped Stripe API client for Edge Runtime.

License:MIT License


Languages

Language:TypeScript 73.1%Language:JavaScript 19.4%Language:CSS 7.5%