/bubble-tutorials

How to integrate PayPal in Bubble

Learn how to integrate PayPal in Bubble with a clear step‑by‑step guide to streamline payments and boost your app's checkout experience.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web or mobile app? RapidDev builds Bubble apps with your growth in mind.

Book a Free Consultation

How to integrate PayPal in Bubble

The simplest reliable way to integrate PayPal in Bubble is to use PayPal’s REST API through Bubble’s API Connector. You create a PayPal app, get a temporary access token using PayPal’s OAuth endpoint, then call the “Create Order” API, redirect the user to PayPal to approve the payment, and finally call the “Capture Order” API from a backend workflow.

 

What You Need to Set Up

 

You need a PayPal Developer account and a Bubble API Connector setup. PayPal works by giving you a Client ID and Secret, which you exchange for an access token. That token is required for all payment calls. Because tokens expire, Bubble’s backend workflow is useful for capturing orders securely.

  • Create a PayPal sandbox app at developer.paypal.com
  • Copy your Client ID and Secret
  • Install Bubble’s API Connector plugin

 

API Connector Setup

 

First endpoint: get an access token. This uses Basic Auth with your Client ID and Secret.

// POST https://api-m.sandbox.paypal.com/v1/oauth2/token
// Headers: Authorization: Basic <base64(client:secret)>
// Body: grant_type=client_credentials

Second endpoint: create an order.

// POST https://api-m.sandbox.paypal.com/v2/checkout/orders
{
  "intent": "CAPTURE",
  "purchase_units": [{
    "amount": { "currency_code": "USD", "value": "10.00" }
  }],
  "application_context": {
    "return_url": "https://yourapp.com/return",
    "cancel_url": "https://yourapp.com/cancel"
  }
}

The response contains an approve link. In Bubble, send the user to this link using “Navigate to external website”.

 

Capturing the Payment

 

After the user approves, PayPal redirects them to your return\_url with a parameter called token. Trigger a backend workflow that receives this token and calls the “Capture Order” endpoint.

// POST https://api-m.sandbox.paypal.com/v2/checkout/orders/{order_id}/capture

If successful, PayPal returns the final payment details. Save them in your Bubble DB inside the backend workflow so nothing sensitive happens on the client.

 

Key Bubble Tips

 

  • Use backend workflows for order capture to keep secrets safe.
  • Use PayPal’s sandbox for testing until everything works.
  • Switch URLs from sandbox to live when ready.

 

Explore More Valuable No-Code Resources

How to integrate Bubble.io with Git?

Learn how to seamlessly integrate Bubble.io with Git through our comprehensive step-by-step guide. Perfect for beginners and professionals.

Explore

How to integrate Bubble.io with Reddit Ads?

Learn how to seamlessly integrate Bubble.io with Reddit Ads using our easy step-by-step guide. Boost your ad management today!

Explore

How to integrate Bubble.io with AWS S3?

Explore our step-by-step guide on integrating Bubble.io with AWS S3, making your app development process more efficient and secure.

Explore

How to integrate Bubble.io with Lucidchart?

Follow our step-by-step guide to seamlessly integrate Bubble.io with Lucidchart, enhancing your workflow & productivity.

Explore

How to integrate Bubble.io with Kentico?

Learn how to seamlessly integrate Bubble.io and Kentico with our comprehensive, easy to follow step-by-step guide.

Explore

How to integrate Bubble.io with Box?

Discover easy-to-follow steps for integrating Bubble.io with Box. Boost your workflow and secure your files seamlessly today.

Explore

Stuck in Bubble.io? We’re here to help!

Fix broken workflows | Optimize logic | Boost performance | Scale with confidence

4.9
Clutch rating 🌟
600+
Happy partners
17+
Countries served
190+
Team members

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Cookie preferences