Stripe Webhook Replay Lab for Openclaw

A developer tool for replaying signed Stripe webhook events to verify idempotency and simulate retry behaviors.

daniellummis
v1.0.0
Mar 6, 2026
0
857
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install stripe-webhook-replay-lab

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install stripe-webhook-replay-lab using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Stripe Webhook Replay Lab?

The Stripe Webhook Replay Lab is a specialized utility within the Openclaw Skills ecosystem designed to simplify the testing of payment integration endpoints. It allows developers to take a Stripe event payload, sign it with a legitimate webhook secret, and replay it multiple times against a local or staging server. This ensures that your application correctly handles duplicate event deliveries and maintains data integrity through robust idempotency logic.

By automating the generation of the Stripe-Signature header using HMAC-SHA256, this skill removes the manual complexity of spoofing Stripe events. It provides a controlled environment to simulate various delivery scenarios, helping you identify edge cases in your webhook handlers before they reach production.

Stripe Webhook Replay Lab Use Cases

  • Testing idempotency logic by replaying the same checkout session event multiple times to ensure no duplicate records are created.
  • Debugging signature verification code in local development without triggering real events from the Stripe Dashboard.
  • Simulating retry storms to see how your backend handles high-frequency duplicate payloads.
  • Validating specific failure modes by sending malformed or modified JSON payloads while maintaining a valid signature.

How Stripe Webhook Replay Lab Works

  1. The skill identifies the target payload source from either a local JSON file or an inline environment variable.
  2. It generates a cryptographic Stripe-Signature using the provided webhook secret, ensuring the target endpoint accepts the request as authentic.
  3. The script loops for a user-defined number of attempts, sending the signed POST request to the specified webhook URL.
  4. Between attempts, the skill can implement a configurable delay to simulate staggered retries.
  5. It captures and logs the HTTP response code and request latency for every attempt, providing a final pass/fail summary based on successful status codes.

Stripe Webhook Replay Lab Setup

To use this skill, ensure you have bash, curl, openssl, and python3 installed on your system. Set the required environment variables and run the script from your terminal:

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

You can customize the behavior by adding variables like REPLAY_COUNT=5 or REPLAY_DELAY_SECONDS=0.5 to the command.

Stripe Webhook Replay Lab Data Schema & Taxonomy

The skill manages data through environment variables and local JSON fixtures. Below is the primary configuration schema:

Variable Type Description
STRIPE_EVENT_PATH String Path to the JSON fixture file (e.g., fixtures/sample.json).
STRIPE_EVENT_JSON String Raw JSON string used to override the file-based payload.
STRIPE_WEBHOOK_SECRET String The whsec_... secret used for signature generation.
ACCEPT_HTTP_CODES String Comma-separated list of successful HTTP status codes.
Output Console Standard output logging event type, ID, status codes, and latency.

Stripe Webhook Replay Lab Advanced Features

  • Signature generation logic that mimics Stripe's official SDKs for perfect compatibility.
  • Configurable success criteria allowing you to define exactly which HTTP status codes represent a successful handle within Openclaw Skills.
  • Support for custom delays and timeouts to simulate real-world network conditions during webhook delivery.
  • Flexible payload injection allowing for rapid testing of different event types without modifying script files.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins bashcurlopensslpython3
Github Stars: 0
forks: 0

Featured*