recur-webhooks

Verify HMAC-SHA256 signatures and process Recur webhook events idempotently.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/flsteven87/three_kingdoms_strategy --skill recur-webhooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: recur-webhooks
Source: https://github.com/flsteven87/three_kingdoms_strategy/tree/main/.agents/skills/recur-webhooks
Command: npx skills add https://github.com/flsteven87/three_kingdoms_strategy --skill recur-webhooks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Secure, scalable webhook handling for Recur payments requires rigorous signature verification and idempotent processing to prevent duplicate actions and ensure correct entitlement states.

Core Features & Use Cases

  • Signature verification using HMAC-SHA256 with Base64-encoded payloads.
  • Idempotent event handling to deduplicate webhook deliveries.
  • Endpoints and handlers for checkout.completed, subscription.activated, subscription.cancelled, subscription.renewed, subscription.past_due, order.paid, and refund.created.
  • Payload schema and testing guidance for local development and staging.

Quick Start

Start the webhook listener and verify signature validation along with idempotent handling using a test event.

Frequently Asked Questions about recur-webhooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify Recur webhook signatures in a FastAPI backend?

You verify Recur webhook signatures by computing HMAC-SHA256 over the Base64-encoded payload and comparing it against the signature header. This confirms the request originated from Recur before processing payment events.

How can I handle duplicate Recur webhook deliveries for subscription events?

Handle duplicate Recur webhook deliveries by implementing idempotent event processing. Store processed event IDs and check them before executing business logic, preventing duplicate entitlement changes for subscription.activated or subscription.renewed events.

What Recur webhook events do I need to handle for subscription entitlement changes?

You need to handle checkout.completed, subscription.activated, subscription.cancelled, subscription.renewed, subscription.past_due, order.paid, and refund.created events to manage entitlement states across your React frontend and FastAPI backend.

Does this webhook integration support both FastAPI backends and React frontends?

Yes, the webhook integration routes events to appropriate business logic across FastAPI backends and React frontends. It provides a robust endpoint, signature validation utilities, and payload schemas for managing entitlement changes.

How do I test Recur webhook signature validation and idempotency locally?

You test Recur webhook validation and idempotency by starting the webhook listener and sending a test event. The implementation includes testing guidance for verifying signature validation and deduplication handling in local and staging environments.

Why do I need idempotent event handling for payment webhooks?

Idempotent event handling for payment webhooks prevents duplicate actions when Recur retries failed deliveries. Without deduplication, processing the same checkout.completed or order.paid event twice can corrupt subscription entitlements and cause billing errors.