
Stripe -- Payment Integration Expert
SkillSkill
Your Stripe expert that builds checkout flows, manages subscriptions, and handles payment operations.
About
name: stripe description: > Implement Stripe checkout flows, subscriptions, webhooks, Connect platforms, and billing. USE WHEN: User needs to implement Stripe payments, subscriptions, webhooks, Connect marketplace, or billing infrastructure. DON'T USE WHEN: User needs general pricing strategy. Use Deal Flow for pricing models. Use Ledger for financial modeling. OUTPUTS: Checkout implementations, subscription flows, webhook handlers, Connect configurations, billing patterns, migration guides. version: 1.1.0 author: SpookyJuice tags: [stripe, payments, subscriptions, webhooks, billing] price: 19 author_url: "https://www.shopclawmart.com" support: "brian@gorzelic.net" license: proprietary osps_version: "0.1" content_hash: "sha256:424f9a055b3f5880b25d30c4f3a4ba06f6cb2258eb81eb26ff5a62e8f5b0da2a"
# Stripe
Version: 1.1.0 Price: $19 Type: Skill
Description
Production-grade Stripe integration patterns for the flows that actually ship in SaaS, marketplaces, and platforms. Stripe's API surface spans 400+ endpoints across payments, billing, connect, and identity — and the docs show happy paths that crumble the moment you hit proration edge cases, webhook ordering issues, or Connect compliance requirements. This skill gives you battle-tested implementations, not quickstart demos.
Prerequisites
- Stripe account (test mode is fine to start)
- API keys:
STRIPE_SECRET_KEYandSTRIPE_PUBLISHABLE_KEY - Stripe CLI installed for webhook testing:
brew install stripe/stripe-cli/stripe - For Connect: platform account with Connect enabled
Setup
- Copy
SKILL.mdinto your OpenClaw skills directory - Set environment variables:
export STRIPE_SECRET_KEY="sk_test_..." export STRIPE_PUBLISHABLE_KEY="pk_test_..." export STRIPE_WEBHOOK_SECRET="whsec_..." - Reload OpenClaw
Commands
- "Implement a checkout flow for [product type]"
- "Set up subscription management with [billing model]"
- "Build webhook handlers for [event types]"
- "Configure Stripe Connect for [marketplace model]"
- "Handle subscription proration for [upgrade/downgrade]"
- "Set up metered billing for [usage metric]"
- "Migrate from [old payment flow] to [new flow]"
Workflow
Checkout Flow Implementation
- Flow selection — Checkout Sessions (Stripe-hosted UI, fastest to implement, handles SCA automatically) vs. Payment Intents (custom UI, full control, more code). Choose Checkout Sessions unless you need pixel-perfect UI control.
- Product and price setup — create Products and Prices in Stripe (or via API). Decide: one-time vs. recurring, currency, tax behavior (inclusive vs. exclusive), and whether prices are defined in Stripe or dynamically at checkout time.
- Session creation — server-side endpoint that creates a Checkout Session with: line items, success/cancel URLs, metadata (your internal order ID), customer creation/reuse, and any custom fields.
- Idempotency — every Checkout Session creation uses an idempotency key derived from your order ID. This prevents double-charges when the user's browser retries on network errors.
- Success handling — the success page verifies payment status via the session ID (never trust the redirect alone). Poll the session or use
expand: ['payment_intent']to confirm payment succeeded before fulfilling. - Error and abandonment — handle: card declined, 3D Secure failures, expired sessions, and abandoned carts. Implement recovery emails for abandoned checkouts.
- Metadata propagation — attach your internal IDs to every Stripe object (session, customer, subscription) via metadata. This is your cross-reference for reconciliation.
Subscription Lifecycle
- Plan architecture — define your subscription model: flat-rate tiers, per-seat pricing, usage-based, or hybrid. Map each to Stripe Price objects with the correct billing scheme and recurring interval.
- Creation flow — Checkout Session in
subscriptionmode (recommended) or create Subscription via API. Handle: trial periods, promo codes, tax calculation, and initial payment failure. - Upgrade/downgrade — use
proration_behaviorcorrectly:create_prorationsfor immediate credit/charge,always_invoiceto bill immediately, ornoneto skip proration. The default often surprises teams. - Dunning and retry — configure Smart Retries in Stripe settings. Implement
invoice.payment_failedwebhook handler that: notifies the customer, updates your internal status, and triggers your grace period logic. - Cancellation —
cancel_at_period_end(access continues until period ends) vs. immediate cancel (refund decision required). Store cancellation reason for churn analysis. - Pause and resume — use
pause_collectionwithbehavior: 'void'(skip invoices) or'mark_uncollectible'. Track paused state in your system to limit feature access. - Billing portal — configure the Customer Portal for self-service plan changes, payment method updates, and invoice history. Customize allowed actions per plan.
Webhook Handler
- Endpoint setup — single
/webhooks/stripeendpoint with raw body parsing (no JSON middleware) for signature verification. Usestripe.webhooks.constructEvent()with your webhook secret. - Event routing — switch on
event.typewith typed handlers for each event. Critical events:checkout.session.completed,invoice.paid,invoice.payment_failed,customer.subscription.updated,customer.subscription.deleted. - Idempotent processing — store processed event IDs. Check before processing. Stripe retries failed webhooks for up to 3 days — your handler WILL see duplicates.
- Order of operations — Stripe doesn't guarantee event ordering. Your handler must be resilient to: receiving
invoice.paidbeforecheckout.session.completed, orsubscription.updatedbeforesubscription.created. - Error handling — return 200 immediately after queuing the event for processing. If your handler throws, Stripe retries with exponential backoff. Implement a dead-letter queue for events that fail processing after N retries.
- Local testing —
stripe listen --forward-to localhost:3000/webhooks/stripeduring development. Test each event type withstripe trigger [event_type].
Output Format
💳 STRIPE — IMPLEMENTATION GUIDE
Integration: [Checkout/Subscriptions/Connect/Webhooks]
Mode: [Test/Production]
Date: [YYYY-MM-DD]
═══ ARCHITECTURE ═══
[Flow diagram: client → server → Stripe → webhook → fulfillment]
═══ IMPLEMENTATION ═══
[Code snippets with inline comments explaining each decision]
═══ CONFIGURATION ═══
| Setting | Value | Why |
|---------|-------|-----|
| [config] | [value] | [rationale] |
═══ WEBHOOK EVENTS ═══
| Event | Handler | Action | Idempotency Key |
|-------|---------|--------|----------------|
| [event.type] | [handler] | [what it does] | [key strategy] |
═══ TESTING CHECKLIST ═══
☐ [Test scenario with expected behavior]
═══ COMMON PITFALLS ═══
- [Pitfall and how to avoid it]
Common Pitfalls
- Trusting the success URL — the success redirect URL proves nothing. Always verify payment status server-side via the Checkout Session or Payment Intent before fulfilling orders.
- Ignoring proration behavior — Stripe's default proration behavior may not match your business rules. Explicitly set
proration_behavioron every subscription update or you'll get surprise invoices. - Raw body parsing for webhooks — Stripe signature verification requires the raw request body. If your framework parses JSON before your webhook handler runs, verification will always fail.
- Webhook ordering assumptions — events arrive out of order. Never assume
checkout.session.completedarrives beforeinvoice.paid. Design handlers to work regardless of arrival sequence. - Connect compliance gaps — connected accounts in many countries require identity verification. Implement the
account.updatedwebhook to handle verification requirements and block payouts until accounts are verified.
Guardrails
- Never stores card numbers. All payment data stays in Stripe's vault. Your server never sees, logs, or stores raw card numbers. Use Stripe.js and Elements for client-side tokenization.
- Always uses idempotency keys. Every state-changing API call includes an idempotency key. This prevents double-charges, double-refunds, and duplicate subscriptions.
- Test mode first. All implementation and testing uses
sk_test_keys. Production keys are only used after the full integration is verified in test mode. - Webhook signatures are verified. Every webhook endpoint verifies the
Stripe-Signatureheader. Unverified webhooks are rejected. No exceptions. - Metadata is your lifeline. Every Stripe object created includes metadata linking it to your internal IDs. Without this cross-reference, reconciliation is impossible.
- PCI compliance awareness. Flags when an implementation approach would increase PCI scope and recommends alternatives that maintain SAQ-A eligibility.
- Cost transparency. Includes Stripe fee calculations in implementation recommendations so the user understands the per-transaction cost of each approach.
Support
Questions or issues with this skill? Contact brian@gorzelic.net Published by SpookyJuice — https://www.shopclawmart.com
Core Capabilities
- stripe
- payments
- subscriptions
- webhooks
- billing
Customer ratings
0 reviews
No ratings yet
- 5 star0
- 4 star0
- 3 star0
- 2 star0
- 1 star0
No reviews yet. Be the first buyer to share feedback.
Version History
This skill is actively maintained.
March 8, 2026
v2.1.0 — improved frontmatter descriptions for better OpenClaw display
March 1, 2026
v2.1.0 — improved frontmatter descriptions for better OpenClaw display
February 27, 2026
v1.1.0 — expanded from stub to full skill: checkout flows, subscription lifecycle, webhook handlers, Connect
One-time purchase
$24
By continuing, you agree to the Buyer Terms of Service.
Creator
SpookyJuice.ai
An AI platform that builds, monitors, and evolves itself
Multiple AI agents and one human collaborate around the clock — writing code, deploying infrastructure, and growing a shared knowledge graph. This page is a live dashboard of the running system. Everything you see is real data, updated in real time.
View creator profile →Details
- Type
- Skill
- Category
- Finance
- Price
- $24
- Version
- 3
- License
- One-time purchase
Works With
Works with OpenClaw, Claude Projects, Custom GPTs, Cursor and other instruction-friendly AI tools.
Works great with
Personas that pair well with this skill.