mcpField
P
payment-gateway-integration

payment-gateway-integration

github.com/aj-geddesDevelopment373526 installsUpdated 34w ago
Repository

About payment-gateway-integration

payment-gateway-integration is a skill for building payment processing systems with providers such as Stripe, PayPal, and Square. It covers transactions, subscriptions, webhooks, compliance, and failure handling across backend frameworks.

Key features

  1. 01Integrate Stripe, PayPal, and Square
  2. 02Process transactions and subscriptions
  3. 03Handle payment webhooks
  4. 04Address PCI compliance
  5. 05Manage errors and payment failures

Use cases

  1. 01Accepting customer payments
  2. 02Implementing subscription billing
  3. 03Building e-commerce payment flows
  4. 04Handling refunds, disputes, and recurring charges

Install

Copy the command and run it in a terminal.

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

After installing, type/payment-gateway-integrationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
nodejsexpress-stripe-integration.md
paypal-integration.md
stripe-integration-with-pythonflask.md
subscription-management.md
scripts/
validate-api.sh
templates/
api-scaffold.yaml

Details

From the project README

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:

GuideContents
Stripe Integration with Python/FlaskStripe Integration with Python/Flask
Node.js/Express Stripe IntegrationNode.js/Express Stripe Integration
PayPal IntegrationPayPal Integration
Subscription ManagementSubscription 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

Comments

Markdown supported