Integrate PayPal payment processing with support for express
Paypal integration

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 Code
npx skills add wshobson/agents --skill paypal-integration -g -a claude-codeClaude 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-integrationWindows (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" -ForceClaude.ai / desktop
Codex, Cursor, other agents
Connects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md3.9 KBreferences/1 file · 8.4 KB
Read the files here
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¤cy=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 | |
| 2 | name paypal-integration |
| 3 | 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. |
| 4 | |
| 5 | |
| 6 | # PayPal Integration |
| 7 | |
| 8 | Master 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 | |
| 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¤cy=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 | |
| 97 | # Backend - Verify and capture order |
| 98 | from paypalrestsdk import Payment |
| 99 | import paypalrestsdk |
| 100 | |
| 101 | paypalrestsdk.configure({ |
| 102 | "mode": "sandbox", # or "live" |
| 103 | "client_id": "YOUR_CLIENT_ID", |
| 104 | "client_secret": "YOUR_CLIENT_SECRET" |
| 105 | }) |
| 106 | |
| 107 | def 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 | |
| 128 | Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient. |
| 129 | |
| 130 | ## Testing |
| 131 | |
| 132 | |
| 133 | # Use sandbox credentials |
| 134 | SANDBOX_CLIENT_ID = "..." |
| 135 | SANDBOX_SECRET = "..." |
| 136 | |
| 137 | # Test accounts |
| 138 | # Create test buyer and seller accounts at developer.paypal.com |
| 139 | |
| 140 | def 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 |
Details
- Updated
- Sep 21, 2026
- License
- MIT
- Stars on the repo
- ★ 39,857
- Checked
- Source
- wshobson/agents ↗
- Creator
- wshobson · 179 listings
Similar skills
See all →
SkillBuild and troubleshoot Cloudflare Basin analytics workflows
SkillBuild anything on Shopify
SkillBuild and customize Shopify stores
SkillBuilding or customizing a Shopify store across its threeShopify themes, apps & checkout
SkillGenerate, audit, optimizeSeerxo etsy SEO
MCPExpert China e-commerce operations specialist coveringChina E-Commerce OperatorMore from wshobson
SkillMaster C/.NET backend development patterns for building
SkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliance
SkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Design
SkillMigrate from AngularJS to Angular using hybrid modeAngular migration
SkillUnderstand anti-reversing, obfuscationAnti reversing techniques
SkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patterns