Skip to main content
skill CX Codex

payment-gateway-integration · aj-geddes — Claude Code skill: take payments

A skill for wiring Stripe, PayPal and Square into your backend: charges, subscriptions, webhooks. Useful when you build billing or a store.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill payment-gateway-integration -a claude-code
Open on GitHub

What payment-gateway-integration does

The skill walks through connecting payment gateways to a server: running transactions, managing subscriptions, handling webhooks and dealing with error cases. It ships a short Python example — Stripe config read from environment variables plus a service class that creates a PaymentIntent.

The bulk of it lives in references/: Stripe with Python/Flask, a Node.js/Express version, PayPal integration and subscription management. A separate section covers practices — verify webhook signatures, use idempotency keys, never store full card numbers, test in sandbox. Stripe keys come from the environment as STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY and STRIPE_WEBHOOK_SECRET, so set those before you start.

The skill tells you not to trust client-side validation and not to ignore webhook events. Worth checking your own code on both counts, since that is where payments usually go missing.

What it helps with

  • charge a card through Stripe and update the order status
  • set up recurring billing and renewals
  • receive and verify a payment webhook
  • handle a refund or a dispute
  • add PayPal or Square to the same backend

Example prompts for the agent

  • wire Stripe into our Flask backend and create a PaymentIntent
  • set up Stripe webhook handling with signature verification
  • add subscriptions and recurring charges to our billing

How to install payment-gateway-integration

1Skills CLI (Vercel)

npx skills add aj-geddes/useful-ai-prompts --skill payment-gateway-integration -a claude-code

2Manually: put the files in place

~/.claude/skills/payment-gateway-integration/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/payment-gateway-integration/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about payment-gateway-integration

How do I install payment-gateway-integration in Claude?

Run npx skills add aj-geddes/useful-ai-prompts --skill payment-gateway-integration -a claude-code. The skill lands at ~/.claude/skills/payment-gateway-integration/SKILL.md.

What does payment-gateway-integration do?

It helps you integrate Stripe, PayPal and Square into a backend: process payments, run subscriptions, accept webhooks and handle errors.

Which reference guides are included?

Four: Stripe with Python/Flask, Node.js/Express Stripe integration, PayPal integration and subscription management. They sit in the references/ directory.

Source text

SKILL.md · MIT
---
name: payment-gateway-integration
description: >
  Integrate payment gateways like Stripe, PayPal, and Square with backends for
  payment processing, subscription management, and webhook handling. Use when
  building e-commerce platforms, implementing billing systems, and handling
  payments securely.
---

# Payment Gateway Integration

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## 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:

```python
# 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](references/stripe-integration-with-pythonflask.md) | Stripe Integration with Python/Flask |
| [Node.js/Express Stripe Integration](references/nodejsexpress-stripe-integration.md) | Node.js/Express Stripe Integration |
| [PayPal Integration](references/paypal-integration.md) | PayPal Integration |
| [Subscription Management](references/subscription-management.md) | 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

© aj-geddes · MIT · aj-geddes/useful-ai-prompts

Similar skills

Everything for Backend and APIs →

payment-gateway-integration by other authors comes first.

payment-gateway-integration secondsky A skill for wiring Stripe, PayPal or Square into your app: payment intents, subscriptions, webhooks and refunds. Useful when you build checkout or billing. CX Codex +1 454installs payment-integration mrgoonie A skill for wiring up payments: SePay and VietQR, Polar, Stripe, Paddle, Creem.io. Useful when you need checkout, subscriptions and webhooks in one pass. CX Codex +1 349installs stripe-integration Seth Hobson This skill covers Stripe Checkout, subscriptions, webhooks, refunds, and saved payment methods. Use it when a project needs one-time or recurring payments. CX Codex 13,404installs payment-processing Seth Hobson A plugin for payment work: wires up Stripe and PayPal, helps build checkout, subscriptions and PCI compliance. Useful when payment code has to go into a project and you would rather not start from scratch. CX Codex ★ 41,729repo stars payment-testing kindlmann A testing skill for end-to-end payment flows against Stripe, Adyen, and PayPal sandboxes. Helps automate card declines, 3DS challenges, and webhook verification. CX Codex +1 978installs stripe-best-practices stripe This skill guides Stripe API choices, payment flows, and integration security. Use it when building, testing, or reviewing Stripe code. CX Codex +1 98,100installs stripe-payments jezweb This skill wires Stripe payments into a web app: Checkout Sessions, subscriptions, webhooks and the customer portal. Useful when you need to start taking money. CX Codex +1 1,100installs

From the same set118

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor