Source:Documentation Index
Fetch the complete documentation index at: https://86d.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
modules/stripe · npm: @86d-app/stripe
The Stripe module implements the PaymentProvider interface from @86d-app/payments using raw fetch() calls to the Stripe REST API. There is no Stripe SDK dependency. It includes a webhook endpoint with HMAC-SHA256 signature verification and timestamp replay protection.
Installation
config.json:
Configuration
Your Stripe secret key. Use
sk_test_... for development and sk_live_... for production. The admin dashboard masks all but the first 7 characters.Webhook signing secret from the Stripe dashboard (
whsec_...). When provided, every incoming webhook request is verified using HMAC-SHA256 with a 5-minute timestamp tolerance. Without this value, all webhook requests are accepted, which is useful for local development but not suitable for production.PaymentProvider API
StripePaymentProvider implements the PaymentProvider interface. Use it directly when you need to create or manage payment intents in server-side code.
createIntent
Creates a Stripe PaymentIntent and returns a clientSecret in providerMetadata. Pass amount in the smallest currency unit (cents for USD).
confirmIntent
Confirms a PaymentIntent after the customer completes payment on the client side.
cancelIntent
Cancels an uncaptured PaymentIntent.
createRefund
Issues a full or partial refund. Omit amount for a full refund.
Status mapping
| Stripe status | Mapped status |
|---|---|
succeeded | succeeded |
canceled | cancelled |
processing, requires_capture | processing |
requires_payment_method, requires_confirmation, requires_action | pending |
Store endpoints
| Method | Path | Description |
|---|---|---|
POST | /stripe/webhook | Receive and verify Stripe webhook events |
Webhook setup
Register your endpoint in Stripe
In the Stripe dashboard, add a new endpoint:
How signature verification works
The webhook endpoint reads the raw request body before JSON parsing (required for HMAC integrity), then verifies theStripe-Signature header:
v1 signature from the header is compared using constant-time comparison to prevent timing attacks. Requests with invalid or expired signatures (older than 5 minutes) return 401.
Verification uses the Web Crypto API. No external dependencies.
Types
PaymentProvider interface from @86d-app/payments:

