@xtandard/entitlements/billing/stripe
Stripe billing provider: webhook verification (Stripe-Signature),
subscription normalization, reconcile, Checkout / Billing Portal link-outs
and meter-event usage export — fetch + Web Crypto, no SDK.
import { … } from "@xtandard/entitlements/billing/stripe";Functions
Section titled “Functions”| Name | Summary |
|---|---|
createStripeProvider |
Create the Stripe provider (id: "stripe"). |
normalizeStripeSubscription |
Normalize a Stripe Subscription object. updatedAt is left unset (Stripe subscriptions carry no update time); the intake orders by event time. |
parseStripeSignature |
Parse a Stripe-Signature header into its timestamp and v1 signatures. |
signStripePayload |
Build a Stripe-Signature header for body (tests, local tooling). |
stripeForm |
Form-encode a nested object the way Stripe’s API expects (a[b][0][c]=…). |
stripeStatus |
Map a Stripe subscription status to ours (unknown → incomplete). |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
StripeProviderOptions |
Options for createStripeProvider. |
StripeSubscriptionObject |
The subset of a Stripe Subscription object the provider reads. |