PayPal Provider
PayPal enables payments from PayPal balance, credit cards, and bank transfers. With 400+ million active users worldwide, PayPal offers broad payment method coverage and trusted checkout experience.
Features
- 400M+ Users - Access PayPal's massive user base
- Multiple Payment Methods - PayPal balance, cards, bank transfers
- Global Coverage - Available in 200+ countries
Quick Setup
1. Create PayPal App
- Go to PayPal Developer Console
- Create a new app for your integration
- Note your Client ID and Client Secret
- Configure return URLs for your domain
2. Configuration
- Python
- TypeScript
from paymcp.providers import PayPalProvider
PayMCP(mcp, providers=[
PayPalProvider(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
sandbox=True
)
])
import { PayPalProvider } from 'paymcp/providers';
installPayMCP(mcp, {
providers: [
new PayPalProvider({
client_id: "YOUR_CLIENT_ID",
client_secret: "YOUR_CLIENT_SECRET",
sandbox: true
})
]
});
3. Test Your Integration
- Python
- TypeScript
@mcp.tool()
@price(amount=1.00, currency="USD")
def test_paypal_payment(message: str, ctx: Context) -> str:
"""Test PayPal payment integration"""
return f"PayPal payment successful! Message: {message}"
mcp.tool(
"test_paypal_payment",
{
description: "Test PayPal payment integration",
inputSchema: { message: z.string() },
price: { amount: 1.00, currency: "USD" },
},
async ({ message }, ctx) => {
return { content: [{ type: "text", text: `PayPal payment successful! Message: ${message}` }] };
}
);
Configuration Options
Required Parameters
providers = {
"paypal": {
"client_id": "YOUR_CLIENT_ID", # From PayPal Developer Console
"client_secret": "YOUR_CLIENT_SECRET", # From PayPal Developer Console
"sandbox": True, # True for testing, False for production
}
}
Optional Parameters
providers = {
"paypal": {
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"sandbox": False, # Production mode
"success_url": "https://yourapp.com/success",
"cancel_url": "https://yourapp.com/cancel",
}
}
User Experience:
- User calls tool → Gets PayPal checkout URL
- User clicks "Pay with PayPal" → PayPal login/payment
- User returns → Calls confirmation tool
- Tool executes after payment verification
Support
- PayPal Developer Docs: developer.paypal.com
- PayMCP Issues: GitHub Issues
- PayPal Developer Support: Available in Developer Console