PluginBench
Skill
Review
Audit score 70

paypal-integration

wshobson/agents

Integrate PayPal payments with express checkout, subscriptions, and refund management.

What is paypal-integration?

Add PayPal payment processing to your application with support for one-time payments, recurring billing, and webhook handling. Use this when building e-commerce checkout flows, processing online transactions, or managing subscription billing.

  • Process one-time payments via PayPal Checkout with express checkout experience
  • Set up recurring billing and subscription plans with automatic renewals
  • Handle PayPal webhooks (IPN) for asynchronous payment notifications
  • Process refunds and manage payment disputes
  • Send payouts to multiple recipients for marketplace and platform payments
  • Support international payments through PayPal

How to install paypal-integration

npx skills add https://github.com/wshobson/agents --skill paypal-integration
Prerequisites
  • PayPal Developer account and sandbox credentials
  • Client ID and Client Secret from PayPal Developer Dashboard
  • Test buyer and seller accounts for sandbox testing
Claude Code
Cursor
Windsurf
Cline

How to use paypal-integration

  1. 1.Create a PayPal Developer account and obtain your Client ID and Client Secret
  2. 2.Configure PayPal SDK with your credentials (sandbox mode for testing)
  3. 3.Implement frontend payment flow using PayPal Smart Buttons or custom checkout UI
  4. 4.Set up backend order creation and capture endpoints
  5. 5.Configure IPN webhook handlers to receive payment notifications
  6. 6.Test the complete payment flow using sandbox test accounts
  7. 7.Deploy to production with live credentials when ready

Use cases

Good for
  • Building an e-commerce checkout flow with PayPal Smart Payment Buttons
  • Implementing a SaaS subscription billing system with recurring charges
  • Processing refunds and handling payment disputes in a marketplace platform
  • Setting up webhook handlers to track payment status updates in real-time
  • Creating a multi-vendor payout system for marketplace sellers
Who it's for
  • E-commerce developers building checkout systems
  • Backend engineers implementing payment processing
  • Full-stack developers integrating subscription billing
  • Marketplace platform builders handling vendor payouts
  • Payment integration specialists

paypal-integration FAQ

What's the difference between client-side and server-side integration?

Client-side integration uses the PayPal JavaScript SDK with Smart Payment Buttons for a hosted checkout experience with minimal backend code. Server-side integration uses the REST API for full control over the payment flow and custom checkout UI, requiring more backend implementation.

Do I need to handle IPN (Instant Payment Notification)?

IPN is optional but recommended for asynchronous payment updates and webhooks. It allows you to track payment status changes in real-time without polling. You must verify IPN messages before processing them.

Can I test payments before going live?

Yes, use PayPal's sandbox environment with sandbox credentials and test accounts. Create test buyer and seller accounts at developer.paypal.com to simulate the complete payment flow.

What payment types does this support?

This skill supports one-time payments via PayPal Checkout, recurring billing with subscriptions, and payouts to multiple recipients for marketplace scenarios.

How do I handle refunds?

The skill supports refund processing and payment dispute management through PayPal's REST API. Implement refund endpoints that call PayPal's refund API with the transaction ID.

Full instructions (SKILL.md)

Source of truth, from wshobson/agents.


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

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'