Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
secondsky avatar

Payment Gateway Integration

  • 352 installs
  • 202 repo stars
  • Updated August 4, 2026
  • secondsky/claude-skills

payment-gateway-integration is a Claude Code skill that integrates Stripe, PayPal, or Square checkout, subscriptions, webhooks, and PCI-aware patterns for developers adding payments to web applications.

About

payment-gateway-integration is an MIT-licensed secondsky/claude-skills plugin that implements secure payment processing for Stripe (Node.js PaymentIntents, subscriptions, refunds), PayPal (order capture, refunds, webhooks via references/paypal-integration.md), and Square-style flows with signature-verified webhooks and idempotency keys. It ships Node.js service examples, webhook handlers using express.raw for Stripe signatures, and a 9-item security checklist covering SDK-only usage, HTTPS routes, sandbox testing, and minimal card-data retention. Use payment-gateway-integration when adding checkout, recurring billing, refund handling, or dispute webhooks to a monetized SaaS or e-commerce API.

  • payment-gateway-integration

Payment Gateway Integration by the numbers

  • 352 all-time installs (skills.sh)
  • +11 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #1,157 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/secondsky/claude-skills --skill payment-gateway-integration

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs352
repo stars202
Last updatedAugust 4, 2026
Repositorysecondsky/claude-skills

How do you integrate Stripe checkout and webhooks?

Use payment-gateway-integration for development tasks

Who is it for?

Full-stack developers adding Stripe, PayPal, or Square billing to Node.js APIs with subscriptions, refunds, and webhook verification.

Skip if: Teams only needing pricing strategy or tax compliance without gateway code—this skill implements payment processor integrations.

When should I use this skill?

User asks to add Stripe, PayPal, or Square checkout, subscriptions, webhooks, refunds, or PCI-compliant payment routes

What you get

Payment service code, webhook endpoints, subscription flows, and PCI security checklist completion

  • Payment service module
  • Webhook route handlers
  • Security checklist sign-off

By the numbers

  • Supports 3 payment gateways: Stripe, PayPal, and Square
  • Includes a 9-item payment security checklist

Files

SKILL.mdMarkdownGitHub ↗

Payment Gateway Integration

Integrate secure payment processing with proper error handling and compliance.

Stripe Integration (Node.js)

const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);

class PaymentService {
  async createPaymentIntent(amount, currency, customerId) {
    return stripe.paymentIntents.create({
      amount: Math.round(amount * 100), // Convert to cents
      currency,
      customer: customerId,
      automatic_payment_methods: { enabled: true }
    });
  }

  async createSubscription(customerId, priceId) {
    return stripe.subscriptions.create({
      customer: customerId,
      items: [{ price: priceId }],
      payment_behavior: 'default_incomplete',
      expand: ['latest_invoice.payment_intent']
    });
  }

  async refund(paymentIntentId, amount = null) {
    const params = { payment_intent: paymentIntentId };
    if (amount) params.amount = Math.round(amount * 100);
    return stripe.refunds.create(params);
  }
}

Webhook Handling

app.post('/webhooks/stripe', express.raw({ type: 'application/json' }), (req, res) => {
  const sig = req.headers['stripe-signature'];

  let event;
  try {
    event = stripe.webhooks.constructEvent(req.body, sig, process.env.STRIPE_WEBHOOK_SECRET);
  } catch (err) {
    return res.status(400).send(`Webhook Error: ${err.message}`);
  }

  switch (event.type) {
    case 'payment_intent.succeeded':
      await handlePaymentSuccess(event.data.object);
      break;
    case 'invoice.payment_failed':
      await handlePaymentFailed(event.data.object);
      break;
  }

  res.json({ received: true });
});

PayPal Integration

See references/paypal-integration.md for complete PayPal implementation with:

  • Order creation and capture
  • Refund processing
  • Webhook handling
  • Frontend SDK integration
  • Success/cancel callbacks

Security Checklist

  • [ ] Use official SDK only
  • [ ] Verify webhook signatures
  • [ ] Never log full card numbers
  • [ ] Store minimal payment data
  • [ ] Test in sandbox first
  • [ ] HTTPS for all payment routes
  • [ ] Handle all error cases
  • [ ] Use idempotency keys
  • [ ] Implement retry logic

Best Practices

Do:

  • Use official SDK libraries
  • Verify all webhook signatures
  • Log transaction IDs (not card data)
  • Test in sandbox environment
  • Handle all payment states
  • Implement proper error messages

Don't:

  • Process raw card data directly
  • Store sensitive payment info
  • Hardcode API keys
  • Skip webhook signature validation
  • Ignore failed payment events
  • Use test keys in production

Related skills

How it compares

Use payment-gateway-integration for processor SDK and webhook implementation; use pricing or billing-architecture skills when defining plans, not wiring gateways.

FAQ

Which payment providers does payment-gateway-integration support?

payment-gateway-integration covers Stripe, PayPal, and Square patterns with Node.js examples for PaymentIntents, subscriptions, refunds, and webhooks. PayPal details live in references/paypal-integration.md for orders, captures, and frontend SDK callbacks.

What security practices does payment-gateway-integration require?

payment-gateway-integration enforces official SDK usage, webhook signature verification, idempotency keys, HTTPS routes, sandbox testing, and never logging full card numbers. Its checklist has 9 items including minimal payment-data storage and retry logic.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.