Skip to main content

PayPal setup for Drupal Commerce

Bootiga documentation

PayPal setup for Drupal Commerce

Connect PayPal to your store and test the complete payment flow.

Use this guide when you want to connect PayPal to a Drupal Commerce store. It summarizes the setup flow in practical steps and links to the official Drupal Commerce PayPal documentation for deeper technical details.

Before you start

  • Have access to the PayPal account that will receive payments.
  • Decide whether you are configuring Sandbox mode for testing or Live mode for real transactions.
  • Keep the store checkout flow ready so you can test the full purchase process after saving the gateway.

Create a PayPal app

  • Open the PayPal Developer Portal and sign in with your PayPal account.
  • Go to the apps and credentials area and create a REST API app.
  • Create separate credentials for sandbox and live environments so testing never touches real payments.

Copy credentials

  • After creating the app, copy the Client ID and Secret values.
  • Use sandbox credentials only with a sandbox gateway and live credentials only with a live gateway.
  • Store secrets carefully and avoid sharing them in screenshots, tickets, or public documentation.

Configure the gateway

  • In Drupal Commerce, add or edit the PayPal Commerce Platform payment gateway.
  • Paste the Client ID and Secret into the gateway configuration form.
  • Choose the payment feature you want to offer: PayPal Smart Payment Buttons or credit card payments.

Smart Payment Buttons

  • Use Smart Payment Buttons when you want customers to start PayPal checkout directly from the cart or checkout flow.
  • Confirm that the PayPal Checkout checkout flow exists and is assigned correctly.
  • For a custom checkout flow, keep only the required review, completion, order summary, and PayPal process panes.

Credit cards

  • If you accept cards through PayPal Commerce Platform, complete the PayPal onboarding flow for card fields.
  • Use the sandbox onboarding flow for tests before moving to live mode.
  • Do not use the PayPal Checkout checkout flow for order types that should collect card details in the normal checkout.

Test before going live

  • Place a complete test order with sandbox credentials.
  • Check order state, payment state, confirmation emails, taxes, shipping, and refunds if your flow uses them.
  • Switch to live credentials only when the full checkout behaves as expected.

Source and advanced reference

  • This Bootiga guide is a practical summary based on the Drupal Commerce PayPal documentation.
  • For advanced details, review the official Drupal.org page linked below.

Official Drupal.org PayPal Commerce Platform setup.