skillfed

payment-integration

Build secure payment systems using Stripe Checkout, Elements, and PaymentIntents while managing subscription lifecycles, webhook events, and tax calculation. Covers idempotent webhook handling, PCI compliance patterns, refund processing, and RevenueCat integration for mobile subscriptions.

Payment Integration helps you add Stripe payment processing and subscription billing to web and mobile applications.

AI-generated summary based on this skill's SKILL.md

85 20 MIT updated by travisjneuman

Install

travisjneuman/.claude/payment-integration · repository language: JavaScript

git clone https://github.com/travisjneuman/.claude
cp -r .claude/skills/payment-integration ~/.claude/skills/payment-integration
npx skillfed install travisjneuman/.claude/payment-integration

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How to integrate Stripe payments into my web or mobile app?

payment-integration enables Stripe integration through Checkout, Elements, and PaymentIntents APIs. For web apps, use Stripe Checkout for hosted payment pages or Elements for custom forms. Mobile apps can leverage PaymentIntents with native SDKs or RevenueCat for subscription management. The skill covers secure token handling, PCI-compliant flows that avoid raw card data, and test card setup for development.

What's the difference between Stripe Elements vs Checkout?

payment-integration addresses both approaches: Stripe Elements gives you UI component control for custom payment forms with client-side tokenization, while Checkout provides a pre-built, hosted payment page requiring minimal setup. Elements suits custom branding; Checkout prioritizes security and conversion. Both avoid handling raw card data. Choose Elements for full design control or Checkout for faster, lower-friction deployments.

How do I build webhook handlers with idempotency and error handling?

payment-integration covers reliable webhook handling by implementing idempotency keys to safely retry failed events without duplicate processing. Store event IDs to detect replays, validate webhook signatures using Stripe's signing secret, and handle transient failures with exponential backoff. Log all webhook activity for audit trails. This prevents double-charging, duplicate subscriptions, and race conditions in payment state updates.

How can I set up usage-based or metered billing with Stripe?

payment-integration explains metered billing by creating usage records tied to subscription items, then letting Stripe calculate charges at invoice time. Configure meter events, set billing thresholds, and handle proration when customers change plans mid-cycle. The skill covers tax calculation integration and invoice tracking to ensure accurate recurring and usage-based charges.

What are Stripe API security best practices for payment processing?

payment-integration emphasizes PCI compliance by never handling raw card data—always use tokenized payment methods via Elements or Checkout. Store API keys securely (never in client code), validate webhook signatures server-side, use HTTPS for all requests, and implement rate limiting. Rotate secrets regularly and audit access logs. Follow least-privilege principles for API key scopes.

How do I enable customer self-service billing and handle failed payments?

payment-integration covers customer portals for self-service invoice access, payment method updates, and subscription management. Implement dunning workflows to retry failed payments with exponential backoff, notify customers of issues, and offer alternative payment methods. Use Stripe's billing portal or build custom flows. Track invoice status and automate retry schedules to reduce churn.

SKILL.md

rendered from the published skill — quoted content, verbatim

Payment Integration

Overview

This skill covers implementing payment processing and subscription billing in web and mobile applications. It addresses Stripe integration (Checkout, Elements, PaymentIntents), subscription lifecycle management, webhook handling with idempotency, PCI compliance, metered and usage-based billing, tax calculation, refund processing, and RevenueCat for mobile subscriptions.

Use this skill when adding payment processing, building subscription billing, handling Stripe webhooks, implementing pricing pages, managing payment failures, or integrating mobile in-app purchases.


Core Principles

  1. Never handle raw card data - Use Stripe Elements or Checkout to keep card numbers off your servers entirely. This keeps you at PCI SAQ-A (the simplest compliance level) rather than SAQ-D.
  2. Webhooks are the source of truth - Never trust client-side payment confirmation. A successful PaymentIntent on the client means nothing until your webhook handler confirms payment_intent.succeeded. Build your system around webhook

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
skills/payment-integration/SKILL.md

Related skills

Tags

payment-processing subscription-management webhook-integration compliance-security billing-automation customer-self-service revenue-optimization error-recovery consumption-pricing financial-operations