PayPal Integration
PayPal is an alternative payment method offered alongside Stripe at checkout.
Setup
- Create a PayPal business account at paypal.com (opens in a new tab)
- Go to developer.paypal.com (opens in a new tab) → create a REST API app
- In admin → Settings → Payment:
- Enter client ID from your app
- Enter client secret
- Toggle Sandbox mode for testing
- Configure webhook in PayPal developer console:
- Endpoint:
https://your-domain.com/commerce-api/v1/webhooks/paypal - Subscribe to:
PAYMENT.CAPTURE.COMPLETED,PAYMENT.CAPTURE.REFUNDED
- Endpoint:
Supported features
- Checkout payments — customer pays via PayPal
- PayPal Credit / Pay in 4 — surfaced automatically when eligible
- Refunds — triggered from return processing
Flow
- Customer picks PayPal at checkout
- Frontend opens PayPal approval popup
- Customer approves in PayPal
- On return,
POST /payment/paypal/capturecompletes the order - Webhook confirms capture
Sandbox
Use sandbox credentials with PayPal sandbox accounts (opens in a new tab). Test buyer accounts let you simulate the full flow without real money.