Skip to main content
@usenarrator/plugin-stripe The Stripe plugin reads SDK calls as the billing actions they perform. Creating a subscription names the customer, the price and the quantity. Amounts are explained in the currency’s smallest unit, so 1999 in USD reads as “1999 (cents)” and 500 in JPY says that yen has no smaller unit. Options such as trial_period_days, proration_behavior and expand become short bullets, and a webhook handler’s switch on event.type says what each event means.
The plugin declares library: { name: "stripe", versions: ">=14 <24" }. It only narrates files that import stripe or belong to a package that depends on it (see Dependency detection), and only calls on the Stripe client, so other SDKs with resources named customers or invoices are left alone. It reads both the current request options and the pre-v22 (id, options) form.

Examples

Subscriptions and payments
English
A webhook handler
English
Pagination
English

What it covers

  • Resource calls (create, retrieve, update, list, del, cancel, pay, voidInvoice and the rest) on subscriptions, customers, prices, products, invoices, payment intents, checkout sessions, coupons and nested resources.
  • Amounts in the currency’s smallest unit, including zero-decimal currencies, and prices with their billing interval.
  • Parameters such as trials, proration, payment behavior and expand, and request options such as idempotency keys, connected accounts and API versions.
  • Lists and pagination: one page, for await over every page, autoPagingEach and autoPagingToArray.
  • Webhooks: constructEvent and constructEventAsync, a switch on event.type with what each event means, event.data.object and previous attributes.
  • The client: new Stripe with its options.

Translating

The English phrasebook is exported as en and typed as StripePhrases.