Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Javascript Integration for PayPal Button and PayPal Checkout

Subscribe to updates I use paypal-checkout

Statistics on paypal-checkout

Number of watchers on Github 331
Number of open issues 93
Average time to close an issue 6 days
Main language JavaScript
Average time to merge a PR 1 day
Open pull requests 4+
Closed pull requests 14+
Last commit over 1 year ago
Repo Created over 3 years ago
Repo Last Updated over 1 year ago
Size 61 MB
Organization / Authorpaypal
Page Updated
Do you use paypal-checkout? Leave a review!
View open issues (93)
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating paypal-checkout for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

PayPal Checkout

Gitter chat Build Status dependencies Status devDependencies Status

A set of components allowing easy integration of PayPal Buttons and PayPal Checkout into your site, powered by xcomponent.

Try it in our Demo App

Learn more in our Dev Docs

Deep Dive in our YouTube Training

Demo App Source

Create a PayPal REST Application

Which Integration is right for me?

  • Do you want the simplest possible PayPal Integration? If so, you should stick with the Basic PayPal Checkout Button which allows you to just drop a button straight into your page. This will allow your customer to pay with PayPal, and we'll notify you when they're done.

  • Do you want a button which gives you finely grained control over your transaction; creating and finalizing transactions from your server side using PayPal's REST api? If so you should use the Advanced Javascript Integration, which will allow you to create and finalize the transaction yourself on your server side using the PayPal Payments REST API.

  • Do you use React.js, Angular.js or Ember.js to render your page? If so, you should use the React.js, Angular.js or Ember.js Elements, which provide native support for each of these frameworks, so you can drop PayPal Buttons in any of your front-end views.

  • Do you have a mark integration? In this case, you should look at the Mark Integration docs to decide how best to integrate PayPal Checkout

Create a PayPal REST Application


  1. Add checkout.v4.js to your page:
   <script src="" data-version-4></script>
  1. Drop the following component onto your page:

PayPal Checkout Button

PayPal Button

This component renders a PayPal button onto your page, which will take care of opening up PayPal for you and guiding your customer through the payment process. After the payment is complete, we will notify you using a javascript callback, and you can take your customer to a success page.

Integrate the button component

Integrating with the PayPal REST API

If you want to use the advanced javascript integrations, you will need a way to create payment tokens on your server side. The simplest way to do this is using the PayPal Payments REST API

Integrating with the PayPal REST API


Please feel free to follow the Contribution Guidelines to contribute to this repository. PRs are welcome, but for major changes please raise an issue first.

Quick Setup

Set up your env:

npm install -g flow-typed
npm install
flow-typed install

Run tests:

npm test

Build checkout.js:

npm run build

Debugging messages

To enable output of additional debugging messages to the console, set the data-log-level attribute of the script element to e.g. info (default value is warn):

   <script src="" data-version-4 data-log-level="info"></script>

Test Tasks

npm test
Flags Description
--clear-cache Clear Babel Loader and PhantomJS cache
--debug Debug mode. PhantomJS, Karma, and CheckoutJS
--quick Fastest testing. Minimal output, no coverage
--browser Choose Browser


Here is a full list of features provided by this library

paypal-checkout open issues Ask a question     (View All Issues)
  • almost 3 years Babel issue causes default keyword to not be quoted
  • almost 3 years Logging endpoint sends back Access-Control null/null
  • almost 3 years Split tests
  • almost 3 years Native integration - pass down window.ppnativexo
  • almost 3 years Detect and log when v3 style button is rendered but hidden
  • almost 3 years IE - detect UA compatible header, emit warning if absent
  • almost 3 years Add test for IE intranet mode
  • almost 3 years How can I start initiating Digital Goods transactions?
  • almost 3 years Support showing spinner overlay programatically
  • almost 3 years Prevent PayPal from logging in the console.
  • almost 3 years Button makes extra call to /api/locale
  • almost 3 years braintree docs
  • almost 3 years doc improvements
  • almost 3 years Braintree Integration should follow regular iframe/popup rules
  • almost 3 years Billing Agreement without sale button
  • almost 3 years Test for onCancel not passed to button
  • almost 3 years Double scroll-bar for iframe in windows
  • almost 3 years State change to non-iframe eligible page breaks out to full page, instead of going to framebust page
  • almost 3 years Call execute() rest api for actions.payment.execute
  • almost 3 years Keep published checkout.js and paypalobjects checkout.js in sync
  • almost 3 years Flow type checking does not fail build
  • almost 3 years Large header size breaks auth api call
  • almost 3 years paypal.Button.react is undefined
  • almost 3 years Disable lightbox in situations where re-authentication is forced
  • almost 3 years Support related_resources in actions.payment.get
  • almost 3 years Re-Size the Mini-Browser Window
  • almost 3 years stop flow in onClick callback
  • almost 3 years checkout.js with Google Apps Script - it's confused about the window to use
  • almost 3 years Export mechanism for setting locale
  • almost 3 years We shouldn't be able to launch paypal flow multiple times for the same product
paypal-checkout open pull requests (View All Pulls)
  • branded buy now button
  • Point client-side logs at /xoplatform/logger, add x-app-name header
  • small typo on the Reactjs implementation
  • SPB for LATAM
paypal-checkout questions on Stackoverflow (View All Questions)
  • Paypal Checkout - don't ask for delivery address for non-members?
  • Paypal Checkout REST API server side code not clear
  • Getting all list of item to be displayed at paypal checkout (PHP)
  • Paypal checkout - Removing VAT to Israel non-residents
  • Braintree Paypal Checkout error : SFSafariViewController does not switch back to app
  • Rails 5 shopping cart system with paypal checkout
  • Paypal checkout uses webapp screen and displays no logo or company name
  • How to close the Paypal Checkout window if no ckeckout is done
  • Paypal credit card payment with Paypal checkout HTML button
  • Basic PayPal Checkout Button giving a 500 internal server error in Firefox
  • Integrate Paypal checkout laravel php
  • How to pre-populate phone in paypal checkout?
  • Created a custom styled PayPal checkout button on Shopify, but I was previously told this wasn't possible
  • How to show item name in paypal checkout pages by html buttons
  • Customize Paypal checkout page
  • Paypal Checkout Express LandingPage not working
  • PayPal HTML buttons broken for large shopping carts on new PayPal checkout
  • PayPal checkout - credit card tab by default
  • PayPal checkout options
  • New vs old PayPal checkout pages, still random selected?
  • Can I remove "(Optional) Join PayPal for faster future checkout" from my paypal checkout?
  • Magento 2 paypal checkout not working for AED
  • Disable Auto login on PayPal checkout
  • Is there a way to automatically set paypal checkout page in the language of the customer?
  • Cart not cleared after Paypal Checkout opencart version
  • How to make a secure paypal checkout payment with php
  • rails paypal checkout page not showing
  • PayPal checkout with Invalid log after successful message. Kindly suggest what mistake I am doing
  • How to Validate Transaction id (TXN) during paypal checkout
  • PayPal Checkout - Open credit card tab by default
paypal-checkout list of languages used
Other projects in JavaScript