PayPal
Accept PayPal payments using a popup-based authentication flow.
PaymentKit.js handles the PayPal flow through a secure popup window. Customers authenticate with PayPal without leaving your checkout page.
Setup
CDN
NPM/ES Modules
Submit payment
Unlike card payments, PayPal doesn’t need input elements. Submit directly when the customer clicks your PayPal button:
The popup must be triggered by a direct user action (button click) to avoid being blocked by popup blockers.
Options
Error handling
PayPal errors are returned in the errors.paypal field as descriptive strings: