Productivity

payment-gateway-integration

aj-geddes/useful-ai-prompts · updated Apr 8, 2026

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill payment-gateway-integration
summary

Build secure payment processing systems with major payment providers (Stripe, PayPal, Square), handling transactions, subscriptions, webhooks, PCI compliance, and error scenarios across different backend frameworks.

skill.md

Payment Gateway Integration

Table of Contents

Overview

Build secure payment processing systems with major payment providers (Stripe, PayPal, Square), handling transactions, subscriptions, webhooks, PCI compliance, and error scenarios across different backend frameworks.

When to Use

  • Processing customer payments
  • Implementing subscription billing
  • Building e-commerce platforms
  • Handling refunds and disputes
  • Managing recurring charges
  • Integrating payment webhooks

Quick Start

Minimal working example:

# config.py
import os

class StripeConfig:
    STRIPE_SECRET_KEY = os.getenv('STRIPE_SECRET_KEY')
    STRIPE_PUBLISHABLE_KEY = os.getenv('STRIPE_PUBLISHABLE_KEY')
    STRIPE_WEBHOOK_SECRET = os.getenv('STRIPE_WEBHOOK_SECRET')

# stripe_service.py
import stripe
from datetime import datetime, timedelta
import logging

logger = logging.getLogger(__name__)

stripe.api_key = os.getenv('STRIPE_SECRET_KEY')

class StripePaymentService:
    @staticmethod
    def create_payment_intent(amount, currency='usd', description=None, metadata=None):
        """Create a payment intent"""
        try:
            intent = stripe.PaymentIntent.create(
                amount=int(amount * 100),  # Convert to cents
                currency=currency,
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
Stripe Integration with Python/Flask Stripe Integration with Python/Flask
Node.js/Express Stripe Integration Node.js/Express Stripe Integration
PayPal Integration PayPal Integration
Subscription Management Subscription Management

Best Practices

✅ DO

  • Use official payment SDK libraries
  • Verify webhook signatures
  • Store minimal payment information
  • Never store full credit card numbers
  • Use HTTPS for all payment routes
  • Implement proper error handling
  • Test with sandbox environments
  • Handle payment failures gracefully
  • Implement PCI compliance
  • Log all payment transactions
  • Use idempotency keys
  • Implement retry logic

❌ DON'T

  • Handle raw card data
  • Store sensitive payment information
  • Log sensitive details
  • Trust client-side validation only
  • Ignore webhook events
  • Hardcode API keys
  • Use test keys in production
  • Skip SSL/TLS verification
  • Forget to validate amounts
  • Store payment tokens without encryption
general reviews

Ratings

4.540 reviews
  • Ganesh Mohane· Dec 24, 2024

    We added payment-gateway-integration from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Li Mehta· Dec 16, 2024

    Useful defaults in payment-gateway-integration — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ama Mensah· Dec 12, 2024

    payment-gateway-integration fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Neel Kim· Dec 12, 2024

    payment-gateway-integration is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Rahul Santra· Nov 15, 2024

    payment-gateway-integration reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Emma Ramirez· Nov 3, 2024

    I recommend payment-gateway-integration for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Neel Li· Nov 3, 2024

    Keeps context tight: payment-gateway-integration is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • James Rao· Nov 3, 2024

    Registry listing for payment-gateway-integration matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Mei Jain· Oct 22, 2024

    Solid pick for teams standardizing on skills: payment-gateway-integration is focused, and the summary matches what you get after install.

  • Anika Bhatia· Oct 22, 2024

    We added payment-gateway-integration from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 40

1 / 4