checkout

PayPal Checkout Best Practices

PayPal recommends four types of best practices for PayPal Checkout integrations:

Buyer checkout experience and flow

Buyer 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: Place the PayPal button upstream on your product page or shopping cart page to create a faster checkout flow and reduce friction for the buyer.

You can place the PayPal 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 only needs to review the information and then confirm the purchase.

If necessary, the customer can change the billing or shipping information before they confirm. Because the information can be modified, the sales and shipping amounts are not shown as part of this flow.

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 checkout with PayPal

Allow 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

Allow customers to make guest credit card payments by simply redirecting your buyers 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 because credit card information is collected on PayPal.com
  • PayPal security for your credit-card paying customers
  • Global acceptance as guest payments are available internationally

Tip: For details, see Buyers 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. This provides three benefits:

  • Buyers are not confused by the price because they can see the line item details.
  • Buyers 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 buyer’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 buyer instantly choose another funding source without leaving your web page. For more information, see Manage funding source failure.

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

Improve the mobile experience with the viewport tag

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 buyers. This increases conversions and cross-border sales.

Review and configure these settings from your PayPal account:

  • 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. For further details, see Block accidental payments.
  • Credit card statement name: PayPal recommends that you review the business name that will appear on the buyer’s statement. If you have multiple businesses or websites, use our dynamic descriptors to post the business name that appears on the buyer’s statement. See Add your credit card statement name for more information.
  • 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. For details, see Block payments from payers with non-U.S. PayPal accounts.

Check the accuracy of the business category and subcategory of your PayPal account

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, go to 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 buyers:

Provide graceful handling for "Internal Server" or "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 buyer 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 buyer consents to the purchase, but the funds are not placed on hold. Because the funds are held, PayPal recommends that you secure the buyer's authorization before they leave your website. This lets you confirm the buyer 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 will be called for any clicks
2. From there, 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

Improve checkout.js and button rendering performance as described in the Performance Best Practices PayPal Checkout GitHub repo.

Feedback

Have feedback?

Let us know.