integrating-stripe-webhooks

integrating-stripe-webhooks is a skill for Claude Code from pr-pm/prpm. It costs 38 tokens per session (1,605 once invoked), scanned A, original, MIT.

A guide to implementing Stripe webhook endpoints, which receive event notifications from Stripe, with reliable signature verification.

In plain words
What is it for?
Use it when creating webhooks or troubleshooting raw-body errors, signature failures, 404 routes, and subscription period fields.
Why use it?
It helps fix failures caused when a web framework parses the request body before Stripe can verify its signature.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when creating webhooks or troubleshooting raw-body errors, signature failures, 404 routes, and subscription period fields.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pr-pm/prpm/integrating-stripe-webhooks
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pr-pm/prpm --skill integrating-stripe-webhooks
Clone the repo
git clone --depth 1 https://github.com/pr-pm/prpm

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for integrating-stripe-webhooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/pr-pm/prpm/integrating-stripe-webhooks/github.svg)](https://agentmods.dev/skills/pr-pm/prpm/integrating-stripe-webhooks)
Your own site
<a href="https://agentmods.dev/skills/pr-pm/prpm/integrating-stripe-webhooks"><img src="https://agentmods.dev/badge/skills/pr-pm/prpm/integrating-stripe-webhooks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for integrating-stripe-webhooks

Your own site · 80×15
<a href="https://agentmods.dev/skills/pr-pm/prpm/integrating-stripe-webhooks"><img src="https://agentmods.dev/badge/skills/pr-pm/prpm/integrating-stripe-webhooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,605 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.01605
Opus 5.5 $0.00015 $0.00642
Sonnet 5.5 $0.00008 $0.00321
Haiku 4.5 $0.00004 $0.00161

Measured 1mo ago against content hash 23b0d1ae732d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

integrating-stripe-webhooks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/integrating-stripe-webhooks/SKILL.md · 220 lines

How it starts

The opening of the file, as written. The whole thing — 220 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Integrating Stripe Webhooks

Overview

Stripe webhooks require raw request bodies for signature verification. Most web frameworks parse JSON automatically, breaking verification. This skill provides framework-specific solutions for the raw body problem and documents common TypeScript type mismatches.

When to Use

Use this skill when:

  • Getting "Raw body not available" errors from Stripe webhooks
  • Webhook signature verification fails with 400 errors
  • Implementing new Stripe webhook endpoints
  • Getting TypeError: Cannot read property 'current_period_start' from subscription events
  • Webhooks return 404 (route registration issues)

Don't use for:

  • General Stripe API integration (not webhooks)
  • Frontend Stripe Elements implementation
  • Stripe checkout session creation (use Stripe docs)

Quick Reference

Problem Solution
Raw body not available Configure custom body parser (see framework examples)
Signature verification fails Use raw body bytes/buffer, not parsed JSON
404 on webhook endpoint Register webhook route inside API prefix
current_period_start undefined Access from subscription.items.data[0] not root
URI validation errors URL-encode dynamic parameters with encodeURIComponent()

Critical: Raw Body Parsing

THE PROBLEM: Stripe's constructEvent() requires the exact bytes received to verify the signature. JSON parsing modifies the body, breaking verification.

THE SOLUTION: Access raw body before any parsing middleware.

Framework Examples

Node.js - Fastify (most common for new projects):

// In main server file, BEFORE registering routes
server.addContentTypeParser('application/json',
  { parseAs: 'buffer' },
  async (req: any, body: Buffer) => {
    req.rawBody = body;  // Store for webhooks
    return JSON.parse(body.toString('utf8'));  // Parse for other routes
  }
);

// In webhook handler
const rawBody = (request as any).rawBody;
const event = stripe.webhooks.constructEvent(
  rawBody, signature, webhookSecret
);

Read the full file on GitHub · 220 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 220 lines · 38 tokens per session scan A 23b0d1ae732d

Subscribe to this mod's changes

integrating-stripe-webhooks is a skill published in the GitHub repository pr-pm/prpm (123 stars, last pushed 11d ago), licensed MIT. It adds 38 tokens to every session and 1,605 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

fastapi_stripe

A Stripe Checkout implementation takes four steps.

iloveitaly/llm-ide-rules · 4 tokens

stripe-backend

Centralized LLM prompt instructions for Copilot and Cursor, including scripts to convert and sync rules for Python, React, Shell, and TypeScript. Designed for rapid reuse and contribution across projects.

iloveitaly/llm-ide-rules · 3 tokens

implement-fastapi-routes

The file docstring contains a description of the FastAPI routes we need to implement. Implement these routes.

iloveitaly/llm-ide-rules · 5 tokens

stripe-apps

Use when building, modifying, or reviewing a Stripe App — or when the user describes something that implies one (e.g. "add a panel to the customer page", "customize my Stripe Dashboard", "react to Stripe events from my app", "connect my service to Stripe without sharing API keys"). Covers the full app development…

fcakyon/claude-codex-settings · 207 tokens

tray-status-pedido

API de Status de Pedido da Tray (recurso /orders/statuses). Cobre o CRUD completo do CATÁLOGO de status de pedido da loja: listar, consultar por ID, criar, atualizar e excluir tipos de status, definindo nome, descrição, cores hexadecimais (backgroundcolor/fontcolor) e o tipo de fluxo (type: open/closed/cancelled).…

tray-tecnologia/tray-api-ai-plugin · 155 tokens

tray-multicd

API de Multi-CD (Centros de Distribuição) da Tray. Cobre o CRUD de centros de distribuição (/multicd/distribution-centers: listar, consultar, criar, atualizar e excluir CDs) e a gestão de estoque distribuído por CD (/multicd/stock/detailed/product/:id, /multicd/stock/detailed/variant/:id e PUT…

tray-tecnologia/tray-api-ai-plugin · 204 tokens