← 返回
效率工具 Key 中文

Stripe Webhook Replay Lab

Replay signed Stripe webhook payloads to a local or staging endpoint for idempotency and retry debugging.
将已签名的 Stripe webhook 载荷重放至本地或预发布环境端点,支持幂等性和重试调试。
daniellummis
效率工具 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 501
下载
💾 9
安装
1
版本
#latest

概述

Stripe Webhook Replay Lab

Use this skill to replay the same signed Stripe webhook event multiple times against your endpoint and validate idempotency behavior.

What this skill does

  • Loads a Stripe event payload from a JSON file or inline env var
  • Generates valid Stripe Stripe-Signature headers using your webhook secret (whsec_...)
  • Replays the exact same payload N times to simulate duplicate deliveries/retries
  • Prints per-attempt HTTP status and latency with a pass/fail summary

Inputs

Required:

  • STRIPE_WEBHOOK_URL (target endpoint)
  • STRIPE_WEBHOOK_SECRET (Stripe endpoint secret used to verify signatures)

Payload source (choose one):

  • STRIPE_EVENT_PATH (default: fixtures/sample-checkout-session-completed.json)
  • STRIPE_EVENT_JSON (inline JSON payload; overrides STRIPE_EVENT_PATH)

Optional:

  • REPLAY_COUNT (default: 2)
  • REPLAY_DELAY_SECONDS (default: 0)
  • REQUEST_TIMEOUT_SECONDS (default: 15)
  • ACCEPT_HTTP_CODES (comma-separated exact HTTP codes accepted as success; default empty = any 2xx)

Run

STRIPE_WEBHOOK_URL=http://localhost:8000/webhooks/stripe \
STRIPE_WEBHOOK_SECRET=whsec_test_123 \
bash scripts/replay-stripe-webhook.sh

Force five duplicate deliveries with a small delay:

STRIPE_WEBHOOK_URL=http://localhost:8000/webhooks/stripe \
STRIPE_WEBHOOK_SECRET=whsec_test_123 \
REPLAY_COUNT=5 \
REPLAY_DELAY_SECONDS=0.2 \
bash scripts/replay-stripe-webhook.sh

Use inline payload JSON:

STRIPE_WEBHOOK_URL=http://localhost:8000/webhooks/stripe \
STRIPE_WEBHOOK_SECRET=whsec_test_123 \
STRIPE_EVENT_JSON='{"id":"evt_test","type":"checkout.session.completed","object":"event","data":{"object":{"id":"cs_test"}}}' \
bash scripts/replay-stripe-webhook.sh

Output contract

  • Prints payload event id/type when available
  • Logs each replay attempt: status code + elapsed milliseconds
  • Exit 0 if all attempts pass success criteria
  • Exit 1 if any attempt fails or inputs are invalid

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 15:01 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

GitHub Actions Trigger Health Audit

daniellummis
审计 GitHub Actions 运行状态,按触发事件和工作流划分,快速定位并优先处理不稳定的自动化源。
★ 0 📥 713
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,444
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,219