checkout

PayPal Checkout Best Practices

PayPal recommends these best practices for PayPal Checkout integrations:

Customer checkout experience and flow

Customer experience best practices improve checkout speed, and reduce checkout friction and the drop-off rate:

Implement the Pay Now experience

This checkout flow displays a Pay Now button immediately after the customer finishes interacting with the PayPal window. This reduces both the number of steps in the checkout process and the drop-off rate. Always implement the Pay Now experience when:

  • You know the final amount of the order before PayPal checkout begins.
  • Your website collects shipping and billing information before PayPal checkout begins.

Tip: See the Pay Now checkout experience in the PayPal Demo Store.

Choose the optimal button location

To increase conversion rates, choose the best location for the PayPal button on your site:

Add the PayPal Checkout button to your product page or shopping cart

Tip: To create a faster checkout flow and reduce friction for the customer, place the PayPal Checkout button upstream on your product or shopping cart page.

You can place the PayPal Checkout button upstream on your product page or on your shopping cart page so that it's visible before your customer starts the checkout flow.

When a customer is ready to make a purchase, they simply click the conveniently located PayPal Checkout button. The billing and shipping information is automatically provided from the customer's PayPal account. This saves the customer the time of manually entering this information. The customer reviews the information and confirms the purchase.

If necessary, the customer can change the billing or shipping information before they confirm. The sales and shipping amounts are not part of this flow because the information might change.

See an example of shopping cart placement in the PayPal Demo Store.

Add PayPal alongside other funding instruments on a shopping cart page

On a shopping cart page where you offer multiple funding options, use a radio button to display the PayPal acceptance mark alongside other funding instruments. In this scenario, the PayPal acceptance mark and button appear at the end of the checkout flow.

The customer enters their billing and shipping information on your shopping cart page and then clicks the radio button to choose PayPal to complete their purchase. A confirmation page displays the total amount of the purchase, including shipping and tax information. Because the shipping information is provided from your shopping cart page and not by PayPal, this information cannot be changed. The customer confirms the information and clicks the PayPal Pay Now button.

See a PayPal acceptance mark in the PayPal Demo Store. In demo, click Proceed to Checkout.

Get the code example to add a PayPal acceptance mark to your site.

Enable guest customers to check out with PayPal

Enable customers to check out as a guest and choose PayPal as their payment option. Using the data provided by PayPal, the customer can optionally create an account as the final step of the checkout process.

Tip: See a guest checkout in the PayPal Demo Store.

Enable guest credit card payments

Enable customers to make guest credit card payments by simply redirecting your customers to PayPal. The web flow automatically provides this feature. To pay with a credit card, customers click the slider on the bottom-right side of the screen.

Guest credit cards offer merchants these benefits:

PayPal-provided PCI compliance Credit card information is collected on PayPal.com.
PayPal security For your credit-card paying customers.
Global acceptance Guest payments are available internationally.

Tip: For details, see Customers Can Checkout Without a PayPal Account.

Pass line item details in API calls

PayPal recommends that you pass line item details such as item name, quantity, cost, shipping cost, discounts, taxes, and so on, in the createPayment and executePayment methods to provide these benefits:

  • Customers are not confused by the price because they can see the line item details.
  • Customers can see the line item details in the email PayPal sends when a transaction completes.
  • As a merchant, you see the line item details in your PayPal transaction history. This helps you track and reconcile with your own systems.

Tip: See line item details in the PayPal Demo Store.

Handle insufficient funds error

If a customer’s selected funding source fails with an instrument declined error, implement the recovery process in the onAuthorize function of the checkout.js script. The recovery process lets the customer instantly choose another funding source without leaving your web page. For more information, see Manage funding source failure.

Note: Before you place your checkout button on your live site, complete negative testing to verify the checkout flow handles funding source errors. For more information see, Negative testing for REST API.

Improve the mobile experience

Mobile web browsers typically render web pages wider than the physical screen. To render the width of the web page to the width of the screen, add the viewport tab to the head element of your script:

<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <script src="https://www.paypalobjects.com/api/checkout.js"></script>
</head>

Account configuration

Account configuration best practices improve global conversions, avoid declined transactions, and help you manage your account more effectively:

Review payment receiving preferences

PayPal helps you accept payments globally and provide a native checkout experience to global customers. This increases conversions and cross-border sales.

Review and configure these settings from your PayPal account:

Setting Description See
Invoice ID If your systems pass an invoice ID to PayPal, review the setting, because PayPal, by default, will block payments if you pass a duplicate invoice ID. Block accidental payments
Credit card statement name PayPal recommends that you review the business name that will appear on the customer’s statement. If you have multiple businesses or websites, use our dynamic descriptors to post the business name that appears on the customer’s statement. Add your credit card statement name
International payments If your business has an international presence, review the settings that affect how you get paid. By default, PayPal allows you to receive payments from international PayPal customers and maintain non-USD currency balances. Block payments from payers with non-U.S. PayPal accounts

Check the accuracy of your PayPal account business category and subcategory

To avoid transaction declines, review the category and sub-category under the business information section on your production account to ensure these values are accurate. This setting dictates your Merchant Category Code (MCC), which is then relayed to the processor. The processor uses this information, along with other transaction data, to accept or reject the transaction.

For more information, see the business profile page for your account.

Define a generic email address or distribution list for a PayPal account

To effectively manage your account, use a generic email address, such as accounting@merchant.com. This prevents disruption of service or confusion if an individual whose email address is associated with the account leaves your company, or their email ID becomes inactive.

To manage your account's email address, or add an address, go to the email page in your PayPal profile.

Payment capture

Payment capture best practices help you secure payment from customers:

Handle internal server and PayPal unavailable errors

If an API request returns a 500 internal server error code, attempt the request three more times. Make sure to pass the same request ID on the retries to enforce idempotency. If communication still doesn’t work, provide a graceful exit to your customer with an appropriate error message. For more information, see Handle checkout flow errors.

Capture funds before shipping

PayPal honors funds for three days after an authorization. To ensure payment, capture funds within the three-day honor period. If you try to capture funds after the honor period and the authorization fails, your request to capture funds may be declined. Therefore, always ship the product after funds are successfully captured.

Authorize before the customer leaves your website

If you use the Order payment type, note that the customer consents to the purchase, but the funds are not placed on hold. Because the funds are held, PayPal recommends that you secure the customer's authorization before they leave your website. This lets you confirm the customer has adequate funds to pay for the items in their cart.

Performance and analytics

Performance and analytics best practices enable you to track button clicks and improve button rendering performance.

Add click tracking

Customize this code to send clicks to your preferred tracking platform:

/*
PayPal Button - Click Tracking
------------------------------

1. Pass an `onClick` callback to the PayPal button, which is called for any clicks.
2. Call your preferred analytics service.
*/

paypal.Button.render({
  payment: function (data, actions) {
    ...
  },
  onAuthorize: function (data, actions) {
    ...
  },
  onClick: function () {
    // This handler will be called for every click on the PayPal button
    // Fire off any analytics beacons from here

    // Google analytics example (taken from https://developers.google.com/analytics/devguides/collection/analyticsjs/events)
    ga('send', {
      hitType: 'event',
      eventCategory: 'Checkout',
      eventAction: 'button_click'
    });
  }
}, '#paypal-button-container');

Improve performance

To improve checkout.js and button rendering performance, see the Performance Best Practices.

Feedback