secondsky avatar

Payment Gateway Integration

Covers the essentials for integrating Stripe, PayPal, or Square into your app with working code for payment intents, subscriptions, refunds, and webhook verification. The examples are Node.js focused and include the nitty-gritty details like converting to cents, handling signature verification, and expanding invoice objects. The security checklist is actually useful (verify signatures, use idempotency keys, never log card numbers). What's good here is it doesn't try to abstract away the payment provider, it just shows you the practical patterns for each one. You'll still need to read the official docs for your specific use case, but this gets you past the initial setup hurdles and reminds you about the compliance stuff you might forget.

skills.sh installs
469
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill payment-gateway-integration --agent claude-code

Installs into .claude/skills of the current project.

Files

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'];

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
Backend & APIs, Finance & Trading
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1jezweb avatargoogle-gemini-apijezweb/claude-skillsIntegrate Gemini API with @google/genai SDK (NOT deprecated @google/generative-ai). Text generation, multimodal (images/video/audio/PDFs), function calling, thi467skills.sh installs
2jezweb avataropenai-apijezweb/claude-skillsBuild with OpenAI stateless APIs - Chat Completions (GPT-5.2, o3), Realtime voice, Batch API (50% savings), Embeddings, DALL-E 3, Whisper, and TTS. Prevents 16 465skills.sh installs
3manutej avatarvector-database-managementmanutej/luxor-claude-marketplaceComprehensive guide for managing vector databases including Pinecone, Weaviate, and Chroma for semantic search, RAG systems, and similarity-based applications460skills.sh installs
4yoanbernabeu avatarsupabase-audit-authenticatedyoanbernabeu/supabase-pentest-skillsCreate a test user (with explicit permission) to audit what authenticated users can access vs anonymous users. Detects IDOR, cross-user access, and privilege es446skills.sh installs
5aj-geddes avatarserver-side-renderingaj-geddes/useful-ai-promptsImplement server-side rendering with template engines, view layers, and dynamic content generation. Use when building server-rendered applications, implementing433skills.sh installs
6daydreammy avatartushare-apidaydreammy/tushare-openclaw-skilltushare api433skills.sh installs