Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Add a PayPal Donate Button with React

An example donate form using the React components for the PayPal JS SDK.

🔗   react-paypal-js GitHub repository

🔗   See a live demo of this sample app on CodeSandbox

App Donate form screenshot


1. Clone or download the code in this repo.

animation showing where to clone or download the code

💡   Git Guide on the 'git clone' command

2. Navigate to the app directory and install the dependencies

cd paypal-donate-button-react

Install with npm

npm install


Install with yarn


3. Start the app

Start with npm

npm run dev

Start with yarn

yarn run dev

Test in Sandbox

To use your own sandbox credentials instead of the test client ID, log in to the developer dashboard and get your client ID from your default application.

💡   If you need help setting up your developer dashboard or finding your client ID, follow the first step in the getting started documentation to get API credentials

Change the clientID from "test" to your client ID in the DonateApp() component found in src/DonateApp.jsx.

export function DonateApp() {
  return (
        "client-id": "test",
        components: "buttons",
        currency: "USD",
      <h1>Donate to Kitty's Care</h1>
        <img src="" alt="Kitty Looking Cute" />
      <DonateForm />

Links to Documentation

React components for the PayPal JS SDK GitHub Repository
Sample donate button code in Storybook
PayPal JavaScript SDK Complete Reference
CodeSandbox sample app


No releases published


No packages published