Contact Us
Webflow Premium Partner Ehab Fayez
Back to Agent Skills
Data & Analytics

Stripe Payment Integration

Process payments, subscriptions, and invoicing with Stripe API for global commerce applications.

Claude Code Cursor Copilot Windsurf Gemini CLI Codex

Overview

Stripe is the most developer-friendly payment processing platform, providing APIs for one-time payments, subscriptions, invoicing, marketplace payments, and financial reporting. The stripe-node SDK offers a fully typed API covering all Stripe resources, with automatic pagination, webhook signature verification, and idempotent request support.

For checkout flows, Stripe provides multiple integration options: Stripe Checkout (hosted payment page), Stripe Elements (embeddable UI components), and the Payment Intents API (fully custom UI). The Payment Intents API handles the complete payment lifecycle including 3D Secure authentication, payment method confirmation, and error handling. Stripe supports 135+ currencies and dozens of payment methods including cards, bank transfers, wallets (Apple Pay, Google Pay), and BNPL.

Stripe Billing manages recurring subscriptions with support for trials, proration, metered billing, and usage-based pricing. The Customer Portal provides a pre-built interface for customers to manage their subscriptions, payment methods, and invoices. Webhooks notify your application of events like successful payments, failed charges, and subscription changes. Stripe Connect enables marketplace and platform payments with split payments and connected accounts.

Who Is This For?

  • Implement one-time payment checkout with Stripe Checkout
  • Build subscription billing with trials and proration
  • Handle webhook events for payment lifecycle management
  • Create a marketplace with Stripe Connect split payments

Installation

Setup for Claude Code
npm install stripe

Configuration

import Stripe from "stripe"

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!)

// Create a checkout session
const session = await stripe.checkout.sessions.create({
  mode: "subscription",
  line_items: [{
    price: "price_xxxxx",
    quantity: 1,
  }],
  success_url: "https://myapp.com/success?session_id={CHECKOUT_SESSION_ID}",
  cancel_url: "https://myapp.com/pricing",
})

// Verify webhook
const event = stripe.webhooks.constructEvent(
  body, signature, process.env.STRIPE_WEBHOOK_SECRET!
)