
PayPal Integration
FreeSeamlessly integrate PayPal payment processing into your applications.
Free · Opens the source repo
What PayPal Integration does
The PayPal Integration skill provides developers with the tools necessary to implement PayPal payment processing in their applications. It supports various features including Express Checkout, subscriptions, and refund management, making it a comprehensive solution for e-commerce and online transactions. This skill is particularly useful for those building checkout flows or handling payment disputes, as it simplifies the integration process and ensures compliance with PayPal's requirements.
At its core, the skill covers essential payment products such as one-time payments through PayPal Checkout, recurring billing with PayPal Subscriptions, and the ability to send payouts to multiple recipients. Developers can choose between client-side integration using the JavaScript SDK for a streamlined user experience or server-side integration with the REST API for greater control over the payment flow. This flexibility allows for customization according to the specific needs of the application.
Additionally, the skill includes support for Instant Payment Notification (IPN), which provides asynchronous updates on payment status, ensuring that developers can handle payment confirmations and disputes effectively. The documentation includes quick start examples for both frontend and backend implementations, allowing developers to get up and running quickly. For those looking to test their integration, the skill provides sandbox credentials and example testing scripts to validate the payment flow.
Overall, this skill is designed for developers and designers who need to implement PayPal as a payment option in their applications, whether for e-commerce sites, subscription services, or marketplaces. Its comprehensive features and clear documentation make it a valuable addition to any developer's toolkit.
When to use it
Use this skill when you need to add PayPal as a payment option, set up subscriptions, or manage refunds in your application.
When not to use it
This skill may not be suitable for applications that require payment processing through other gateways or for those needing advanced customizations beyond what PayPal offers.
What you can build with it
E-commerce Site Checkout
Integrate PayPal as a payment option on your e-commerce site to streamline the checkout process for users.
Subscription Service Setup
Implement recurring billing for a subscription service, allowing automatic renewals and easy management of subscriber payments.
Refund Management System
Set up a refund management system to handle payment disputes and process refunds efficiently.
How to install PayPal Integration
View source1. Install with the skills CLI
npx skills add wshobson/agents/paypal-integration --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by wshobsonPayPal 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'
Frequently asked questions about PayPal Integration
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
