On this page
No Headings
Last updated: June 24, 2026
Important: New integrations should use the PayPal JavaScript SDK v6.
This integration uses the PayPal JavaScript SDK v5, and it's to troubleshoot existing integrations only.
PayPal Expanded Checkout helps you present custom credit and debit card fields to your payers so they can pay using your site's branding. Unlike standard PayPal Checkout, Expanded Checkout gives you control over the visual presentation of card fields. Use it when you need to match checkout to your own brand experience.
If you do not need custom branding, use standard PayPal Checkout instead.
If you integrated expanded checkout with the HostedFields component, see
Integrate PayPal buttons and Hosted
Fields.
The integration uses the PayPal JavaScript SDK v5 to render hosted card fields and PayPal buttons on your page. Your payers can pay with PayPal, debit and credit cards, Pay Later, Venmo, and alternative payment methods. The SDK handles which buttons appear based on your configuration.
When a buyer selects card payment, card fields render on your page, and the buyer fills in their card details. Optionally, you can collect a billing address using your own input elements and pass it along with the order. After the buyer submits, the order goes to PayPal servers for processing.
The PayPal Card Fields component renders on your page and can be customized to match your user experience. You can load the PayPal buttons component alongside the Card Fields component. This gives your buyer the option to select which payment method they want to use. The PayPal buttons component appears on your page based on the configuration you set in the JavaScript SDK.
<script> tag fetches the PayPal JavaScript SDK when your checkout page renders.cardFields.submit method.createOrder callback sends a request to your server to create a PayPal order.createOrder callback returns an orderId back to your page.createOrder call, the buyer sees a 3DS User Authentication from the card-issuing bank.onApprove callback returns a liabilityShift response that your page can use to determine how to process the order.createOrder process, the onApprove callback sends a capture request to your server.