PayPal Integration

SkillCommerce & finance

paypal-integration is a skill that guides an AI agent through adding PayPal payment processing to an app or website. It covers express checkout, subscriptions, refunds, and IPN webhook handling, from frontend Smart Payment Buttons to backend order capture and verification.

Use PayPal Integration in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add PayPal Integration and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the PayPal Integration skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Have a PayPal developer account with client credentials available.

PayPal IntegrationStart free

What your AI can do with it

  • Build express checkout flows with PayPal Smart Payment Buttons
  • Capture and verify orders server-side via the PayPal REST API
  • Set up recurring billing with PayPal Subscriptions
  • Handle IPN webhooks with required verification
  • Process refunds and payment disputes
  • Run sandbox testing examples before going live

Getting started

  1. Have a PayPal developer account with client credentials available.
  2. Add the skill to your agent's available skills.
  3. Ask the agent to implement the payment flow you need, such as checkout, subscriptions, or refunds.
  4. Test the integration in sandbox mode before switching to live.

What this skill tells your AI

The instructions your AI receives, as published by wshobson/agents in plugins/payment-processing/skills/paypal-integration/SKILL.md and read by ahel’s review.

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'

Signals

GitHub stars
40k
Forks
4k
Last commit
Sep 2026

ahel review

  • S4info
    community integration, published by wshobson, not paypal

Automated review, not a security audit. Ruleset v1+k2.

Others that do the same job

Questions

What payment features does it cover?
One-time payments and express checkout via PayPal Checkout, recurring billing through PayPal Subscriptions, payouts to multiple recipients, refunds, dispute workflows, and IPN webhook handling.
Does it support sandbox testing?
Yes. The skill includes sandbox testing examples, and the backend configuration can be set to sandbox or live mode.
Client-side or server-side integration?
Both. The JavaScript SDK with Smart Payment Buttons needs minimal backend code, while the REST API approach gives full control over the payment flow and a custom checkout UI.
Does it handle international payments?
Supporting international payments is listed as a use case, and the SDK setup includes a currency parameter.
Advanced
Item type
skill
Key
paypal-integration-wshobson
Source
github.com/wshobson/agents