stripe-integration

Stripe payment integration with Node.js SDK. Covers Checkout Sessions, Payment Intents, Subscriptions, Customer Portal, webhooks, and Stripe Elements. Use when implementing checkout flows, payment processing, subscription billing, webhook handlers, or payment forms with Stripe Elements. Use for stripe, payments, checkout, subscriptions, billing, webhooks, payment intents, stripe elements.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "stripe-integration" with this command: npx skills add oakoss/agent-skills/oakoss-agent-skills-stripe-integration

Stripe Integration

Overview

Stripe provides a complete payments platform with server-side SDKs (Node.js) and client-side libraries (Stripe.js, React Stripe.js). The Node.js SDK handles server operations like creating Payment Intents, managing Subscriptions, and verifying webhooks. The React Stripe.js library provides pre-built UI components (PaymentElement, Elements provider) for secure client-side payment collection.

When to use: One-time payments, recurring subscriptions, usage-based billing, marketplace payouts, hosted checkout pages, custom payment forms, webhook-driven fulfillment.

When NOT to use: Cryptocurrency payments (not supported), regions where Stripe is unavailable, simple static product sales without payment processing (use a hosted storefront).

Quick Reference

PatternAPIKey Points
Hosted checkoutstripe.checkout.sessions.create()Stripe-hosted page, supports payment, subscription, setup modes
Payment Intentstripe.paymentIntents.create()Server-side, returns client_secret for client confirmation
Confirm paymentstripe.confirmPayment({ elements, clientSecret })Client-side, requires Elements instance
Create subscriptionstripe.subscriptions.create()Use payment_behavior: 'default_incomplete' for SCA
Update subscriptionstripe.subscriptions.update()Set proration_behavior explicitly
Cancel subscriptionstripe.subscriptions.cancel()Use prorate: true to credit unused time
Customer Portalstripe.billingPortal.sessions.create()Self-service billing management, returns short-lived URL
Webhook verifystripe.webhooks.constructEvent()Requires raw body, signature header, and endpoint secret
Elements provider<Elements stripe={stripePromise} options={options}>Wraps payment components, pass clientSecret or mode
PaymentElement<PaymentElement />Renders all supported payment methods automatically
Retrieve + expandstripe.checkout.sessions.retrieve(id, { expand })Expand nested objects to reduce API calls
Searchstripe.paymentIntents.search({ query })Stripe Query Language for filtering

Common Mistakes

MistakeCorrect Pattern
Parsing webhook body as JSON before verificationUse express.raw({ type: 'application/json' }) to pass raw body to constructEvent
Hardcoding payment method typesUse automatic_payment_methods or let Checkout choose based on currency and region
Creating PaymentIntent client-sideCreate on server, pass only client_secret to client
Not awaiting elements.submit() before confirmCall elements.submit() first to trigger validation, then confirmPayment
Missing return_url in confirmPaymentAlways provide return_url for redirect-based payment methods
Using test keys in productionStore keys in environment variables, validate STRIPE_SECRET_KEY prefix (sk_live_ vs sk_test_)
Not handling requires_action statusCheck PaymentIntent status after confirmation, handle 3D Secure or other authentication
Creating Customer Portal session without settingsSave portal settings in Dashboard first, otherwise API returns an error
Not expanding related objectsUse expand parameter to include nested objects like latest_invoice.payment_intent
Ignoring webhook idempotencyUse event.id to deduplicate, webhook events can be delivered more than once

Delegation

  • Payment flow architecture: Use Explore agent to discover integration patterns
  • Webhook debugging: Use Task agent for end-to-end event tracing
  • Code review: Delegate to code-reviewer agent for security review of payment handlers

References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

playwright

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

ui-ux-polish

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

tanstack-form

No summary provided by upstream source.

Repository SourceNeeds Review