Paypal Integration
Seth HobsonCommunityCreated by Seth Hobson
- Skill
- Tool integration
- Automation and integrations
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to integrating PayPal's payment services into web applications. It covers both client-side implementations using the JavaScript SDK for seamless checkout experiences and server-side REST API interactions for advanced control over order management, recurring billing, and transaction verification. The documentation includes patterns for handling asynchronous payment notifications via IPN and testing strategies using the PayPal sandbox environment.
What it does
- Implements PayPal Checkout for one-time payments and guest transactions.
- Configures recurring billing and subscription plans.
- Provides server-side patterns for order creation and capture via REST API.
- Facilitates asynchronous payment status updates using IPN webhooks.
- Supports refund management and transaction verification.
- Offers testing guidance using sandbox credentials and test accounts.
When to use it
- When adding PayPal as a payment gateway to an e-commerce platform.
- When building subscription-based services requiring recurring billing.
- When you need to handle payment notifications and status updates programmatically.
- When implementing custom checkout UI flows that require server-side order control.
Advantages
- Supports both simple client-side buttons and complex server-side API flows.
- Includes robust patterns for verifying asynchronous payment notifications.
- Provides clear guidance on using the sandbox environment for development and testing.
- Covers essential e-commerce requirements like refunds and recurring billing.
Usage examples
- “How do I implement a basic PayPal checkout button on my frontend?”
- The skill provides a JavaScript snippet using the PayPal SDK to render Smart Payment Buttons and handle the order capture process.
- “How can I verify a payment on my backend after the user completes the checkout?”
- The skill demonstrates a Python function using the REST API to capture an order ID and confirm the transaction status.
- “How do I handle PayPal IPN notifications in a Flask application?”
- The skill provides a code pattern for a webhook endpoint that receives, verifies, and processes IPN data based on payment status.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/wshobson/paypal-integration/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip paypal-integration.zip -d .agents/skills
Documentation by Seth Hobson
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'Files
- ATTRIBUTION.mdAdded by AutoGineer990 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md3.9 KiB
- references/details.md8.4 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Seth Hobson
- Publisher
- Seth Hobson (Community)
- Source
- wshobson/agents · plugins/payment-processing/skills/paypal-integration · commit 4bde316
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Seth Hobson or Seth Hobson.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download paypal-integration.zip