Integrate PayPal payment processing with support for express

Paypal integration

by wshobson · MIT license · ★ 39,857 on GitHub · updated Sep 21

Paypal integration cover

Integrate PayPal payment processing with support for express checkout, subscriptions, and refund management. Use when implementing PayPal payments, processing online transactions, or building e-commerce checkout flows.

---
name: paypal-integration
description: Integrate PayPal payment processing with support for express checkout, subscriptions, and refund management. Use when implementing PayPal payments, processing online transactions, or building e-commerce checkout flows.
---

# PayPal Integration

Master PayPal payment integration including Express Checkout, IPN handling, recurring billing, and refund workflows.

## When to Use This Skill

- Integrating PayPal as a payment option
- Implementing express checkout flows
- Setting up recurring billing with PayPal
- Processing refunds and payment disputes
- Handling PayPal webhooks (IPN)
- Supporting international payments
- Implementing PayPal subscriptions

Overview

Master PayPal payment integration including Express Checkout, IPN handling, recurring billing, and refund workflows.

Manual install (npx, ZIP)
Claude Codenpx skills add wshobson/agents --skill paypal-integration -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \ | tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/payment-processing/skills/paypal-integration
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/f9ebfa8e77dd5f6d56f9/paypal-integration.zip" -OutFile "$env:TEMP\paypal-integration.zip"; Expand-Archive "$env:TEMP\paypal-integration.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.9 KB
  • references/1 file · 8.4 KB
Read the files here
wshobson/4236bb92 files
SKILL.md
Show the full text157 lines

PayPal Integration

Master PayPal payment integration including Express Checkout, IPN handling, recurring billing, and refund workflows.

When to Use This Skill

  • Integrating PayPal as a payment option
  • Implementing express checkout flows
  • Setting up recurring billing with PayPal
  • Processing refunds and payment disputes
  • Handling PayPal webhooks (IPN)
  • Supporting international payments
  • Implementing PayPal subscriptions

Core Concepts

1. Payment Products

PayPal Checkout

  • One-time payments
  • Express checkout experience
  • Guest and PayPal account payments

PayPal Subscriptions

  • Recurring billing
  • Subscription plans
  • Automatic renewals

PayPal Payouts

  • Send money to multiple recipients
  • Marketplace and platform payments
2. Integration Methods

Client-Side (JavaScript SDK)

  • Smart Payment Buttons
  • Hosted payment flow
  • Minimal backend code

Server-Side (REST API)

  • Full control over payment flow
  • Custom checkout UI
  • Advanced features
3. IPN (Instant Payment Notification)
  • Webhook-like payment notifications
  • Asynchronous payment updates
  • Verification required

Quick Start

// Frontend - PayPal Smart Buttons
<div id="paypal-button-container"></div>

<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&currency=USD"></script>
<script>
  paypal.Buttons({
    createOrder: function(data, actions) {
      return actions.order.create({
        purchase_units: [{
          amount: {
            value: '25.00'
          }
        }]
      });
    },
    onApprove: function(data, actions) {
      return actions.order.capture().then(function(details) {
        // Payment successful
        console.log('Transaction completed by ' + details.payer.name.given_name);

        // Send to backend for verification
        fetch('/api/paypal/capture', {
          method: 'POST',
          headers: {'Content-Type': 'application/json'},
          body: JSON.stringify({orderID: data.orderID})
        });
      });
    }
  }).render('#paypal-button-container');
</script>
# Backend - Verify and capture order
from paypalrestsdk import Payment
import paypalrestsdk

paypalrestsdk.configure({
    "mode": "sandbox",  # or "live"
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET"
})

def capture_paypal_order(order_id):
    """Capture a PayPal order."""
    payment = Payment.find(order_id)

    if payment.execute({"payer_id": payment.payer.payer_info.payer_id}):
        # Payment successful
        return {
            'status': 'success',
            'transaction_id': payment.id,
            'amount': payment.transactions[0].amount.total
        }
    else:
        # Payment failed
        return {
            'status': 'failed',
            'error': payment.error
        }

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Testing

# Use sandbox credentials
SANDBOX_CLIENT_ID = "..."
SANDBOX_SECRET = "..."

# Test accounts
# Create test buyer and seller accounts at developer.paypal.com

def test_payment_flow():
    """Test complete payment flow."""
    client = PayPalClient(SANDBOX_CLIENT_ID, SANDBOX_SECRET, mode='sandbox')

    # Create order
    order = client.create_order(10.00)
    assert 'id' in order

    # Get approval URL
    approval_url = next((link['href'] for link in order['links'] if link['rel'] == 'approve'), None)
    assert approval_url is not None

    # After approval (manual step with test account)
    # Capture order
    # captured = client.capture_order(order['id'])
    # assert captured['status'] == 'COMPLETED'
1---
2name: paypal-integration
3description: Integrate PayPal payment processing with support for express checkout, subscriptions, and refund management. Use when implementing PayPal payments, processing online transactions, or building e-commerce checkout flows.
4---
5 
6# PayPal Integration
7 
8Master PayPal payment integration including Express Checkout, IPN handling, recurring billing, and refund workflows.
9 
10## When to Use This Skill
11 
12- Integrating PayPal as a payment option
13- Implementing express checkout flows
14- Setting up recurring billing with PayPal
15- Processing refunds and payment disputes
16- Handling PayPal webhooks (IPN)
17- Supporting international payments
18- Implementing PayPal subscriptions
19 
20## Core Concepts
21 
22### 1. Payment Products
23 
24**PayPal Checkout**
25 
26- One-time payments
27- Express checkout experience
28- Guest and PayPal account payments
29 
30**PayPal Subscriptions**
31 
32- Recurring billing
33- Subscription plans
34- Automatic renewals
35 
36**PayPal Payouts**
37 
38- Send money to multiple recipients
39- Marketplace and platform payments
40 
41### 2. Integration Methods
42 
43**Client-Side (JavaScript SDK)**
44 
45- Smart Payment Buttons
46- Hosted payment flow
47- Minimal backend code
48 
49**Server-Side (REST API)**
50 
51- Full control over payment flow
52- Custom checkout UI
53- Advanced features
54 
55### 3. IPN (Instant Payment Notification)
56 
57- Webhook-like payment notifications
58- Asynchronous payment updates
59- Verification required
60 
61## Quick Start
62 
63```javascript
64// Frontend - PayPal Smart Buttons
65<div id="paypal-button-container"></div>
66 
67<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&currency=USD"></script>
68<script>
69 paypal.Buttons({
70 createOrder: function(data, actions) {
71 return actions.order.create({
72 purchase_units: [{
73 amount: {
74 value: '25.00'
75 }
76 }]
77 });
78 },
79 onApprove: function(data, actions) {
80 return actions.order.capture().then(function(details) {
81 // Payment successful
82 console.log('Transaction completed by ' + details.payer.name.given_name);
83 
84 // Send to backend for verification
85 fetch('/api/paypal/capture', {
86 method: 'POST',
87 headers: {'Content-Type': 'application/json'},
88 body: JSON.stringify({orderID: data.orderID})
89 });
90 });
91 }
92 }).render('#paypal-button-container');
93</script>
94```
95 
96```python
97# Backend - Verify and capture order
98from paypalrestsdk import Payment
99import paypalrestsdk
100 
101paypalrestsdk.configure({
102 "mode": "sandbox", # or "live"
103 "client_id": "YOUR_CLIENT_ID",
104 "client_secret": "YOUR_CLIENT_SECRET"
105})
106 
107def capture_paypal_order(order_id):
108 """Capture a PayPal order."""
109 payment = Payment.find(order_id)
110 
111 if payment.execute({"payer_id": payment.payer.payer_info.payer_id}):
112 # Payment successful
113 return {
114 'status': 'success',
115 'transaction_id': payment.id,
116 'amount': payment.transactions[0].amount.total
117 }
118 else:
119 # Payment failed
120 return {
121 'status': 'failed',
122 'error': payment.error
123 }
124```
125 
126## Detailed patterns and worked examples
127 
128Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
129 
130## Testing
131 
132```python
133# Use sandbox credentials
134SANDBOX_CLIENT_ID = "..."
135SANDBOX_SECRET = "..."
136 
137# Test accounts
138# Create test buyer and seller accounts at developer.paypal.com
139 
140def test_payment_flow():
141 """Test complete payment flow."""
142 client = PayPalClient(SANDBOX_CLIENT_ID, SANDBOX_SECRET, mode='sandbox')
143 
144 # Create order
145 order = client.create_order(10.00)
146 assert 'id' in order
147 
148 # Get approval URL
149 approval_url = next((link['href'] for link in order['links'] if link['rel'] == 'approve'), None)
150 assert approval_url is not None
151 
152 # After approval (manual step with test account)
153 # Capture order
154 # captured = client.capture_order(order['id'])
155 # assert captured['status'] == 'COMPLETED'
156```
157 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 39,857
Checked
Source
wshobson/agents ↗
Creator
wshobson · 179 listings
View creator

Similar skills

See all →
SkillBuild and troubleshoot Cloudflare Basin analytics workflowscloudflare/skills · by cloudflareBuild and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL. Use for streaming data into R2 Iceberg tables, managing catalogs, or querying those tables; also use for requests using the former Data Platform, Pipelines, R2 Data Catalog, or R2 SQL names.★ 3k GitHub starsSkillBuild anything on ShopifyShopify/Shopify-AI-Toolkit · by ShopifyBuild anything on Shopify. One skill covering every Shopify developer surface: Use Shopify CLI, Admin API, ShopifyQL, Storefront GraphQL API, Partner API, Customer Account API, Payments Apps API, Shopify Functions, Polaris App Home, Polaris Admin Extensions, Polaris Checkout Extensions, Polaris Customer Account Extensions, POS UI, Hydrogen, Liquid, Custom Data, Shopify App Pricing, App Store Review, Developer Onboarding, Merchant Onboarding. Use it for any Shopify API, extension, theme, storefront, function, or CLI task — writing or explaining code, looking up operations, fields, components and valid values, validating generated code, and choosing which surface a request belongs to. Also use it when someone asks to make, build, open, or set up a store or shop that sells something, and when a prompt mentions or asks for any of: metafields or metaobjects, make me a store that sells pet supplies, mock.shop reference stores, build a storefront without an account — even without saying Shopify.★ 589 GitHub starsSkillBuild and customize Shopify storesTerminalSkills/skills · by TerminalSkillsBuild and customize Shopify stores — themes with Liquid, Storefront API, custom apps, and headless commerce with Hydrogen. Use when someone asks to build a Shopify store", "Shopify theme", "Liquid templates", "Shopify API", Shopify app", "headless Shopify", "Hydrogen storefront", "customize Shopify", Shopify product management", or "e-commerce with Shopify". Covers Liquid templating, theme development, Storefront/Admin APIs, custom apps, checkout extensions, and Hydrogen (React-based headless).★ 157 GitHub starsSkillBuilding or customizing a Shopify store across its threeShopify themes, apps & checkoutericrisco/rsc-harness · by ericriscoUse when building or customizing a Shopify store across its three code surfaces — themes (Liquid, Online Store 2.0 sections, blocks and JSON templates), apps (Remix with the versioned GraphQL Admin API and its query-cost model), and checkout (UI extensions, Functions, Web Pixels), plus the CLI flow and checkout-extensibility migration. NOT WooCommerce or PHP stores (that is `wordpress`), NOT the React layer of a headless storefront (that is `nextjs`), NOT non-Shopify payment integrations (that is `stripe`).★ 108 GitHub starsSkillGenerate, audit, optimizeSeerxo etsy SEOsemihbugrasezer/seerxo · by semihbugrasezerGenerate, audit, optimize, and research keywords for Etsy listings through the Seerxo remote MCP server or CLI. Use when a user wants an Etsy title, description, 13 tags, SEO score, listing rewrite, keyword ideas, quota help, or help connecting and testing Seerxo with Claude or ChatGPT.★ 28 GitHub starsMCPExpert China e-commerce operations specialist coveringChina E-Commerce Operatormsitarzewski/agency-agents · by msitarzewskiExpert China e-commerce operations specialist covering Taobao, Tmall, Pinduoduo, and JD ecosystems with deep expertise in product listing optimization, live commerce, store operations, 618/Double 11 campaigns, and cross-platform strategy.★ 154k GitHub stars

More from wshobson

SkillMaster C/.NET backend development patterns for buildingwshobson/agents · by wshobsonMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.★ 39.9k GitHub starsSkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliancewshobson/agents · by wshobsonImplement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.★ 39.9k GitHub starsSkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Designwshobson/agents · by wshobsonMaster Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.★ 39.9k GitHub starsSkillMigrate from AngularJS to Angular using hybrid modeAngular migrationwshobson/agents · by wshobsonMigrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.★ 39.9k GitHub starsSkillUnderstand anti-reversing, obfuscationAnti reversing techniqueswshobson/agents · by wshobsonUnderstand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.★ 39.9k GitHub starsSkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patternswshobson/agents · by wshobsonBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.★ 39.9k GitHub stars