
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-codeInstalls 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- Test Quality Analysis469
- Api Reference Documentation465
- Tanstack Router461
- Systematic Debugging457
- Interaction Design456
- Mutation Testing456
- Api Error Handling455
- Internationalization I18n455
- Security Headers Configuration454
- Seo Optimizer453
- Sequential Thinking448
- Bun Sqlite442
- Websocket Implementation440
- Mobile App Debugging439
- Root Cause Tracing438
- App Store Deployment437
- Database Schema Design437
- Recommendation Engine437
- Seo Keyword Cluster Builder437
- Bun Sveltekit436
- Push Notification Setup436
- Drizzle Orm D1435
- Api Response Optimization434
- Api Pagination433