JA
ベータ版の翻訳

@core / stripe

1.0.0 ▾
認証済みMIT
GitHub

共有 Stripe クライアントと、署名検証済みで冪等な単一 Webhook(各モジュールへイベントを配信)

コード8 ファイルコンテキスト約 545 トークンMCP stripeスキャン合格

.genpmignore 適用後に組み込まれる正確なツリーです。固定先:

src/lib/stripe/adapters/next.ts読み取り専用 · 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;
  }
}

@core/stripe を報告

パッケージを報告するには GitHub でログインしてください。

GitHub で続ける