EN

@core / stripe

1.0.0 ▾
verifiedMIT
GitHub

Shared Stripe client and one idempotent, signature-verified webhook endpoint dispatching events to every module

Code8 filesContext~545 tokensMCP stripescan passed

The exact tree that will be injected, after .genpmignore. Pinned to

src/lib/stripe/adapters/next.tsread-only · 43dfe91
// Adaptador Next.js: `app/api/stripe/webhook/route.ts` → `export { stripeWebhookRoute as POST } from '@/lib/stripe/adapters/next';`
import { handleStripeWebhook, WebhookSignatureError } from '../index.ts';

export async function stripeWebhookRoute(req: Request): Promise<Response> {
  try {
    return Response.json(await handleStripeWebhook(await req.text(), req.headers.get('stripe-signature')));
  } catch (e) {
    if (e instanceof WebhookSignatureError) return Response.json({ error: e.message }, { status: 400 });
    throw e;
  }
}

Report @core/stripe

Sign in with GitHub to report a package.