Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

PayPal authentication

PayPal authentication lets your users sign in with their PayPal account. Once connected, you can offer “Continue with PayPal” in your WeWeb app.

What this integration supports

  • Social sign in with PayPal (Log in with PayPal)
  • Redirect to different pages for success, error, and first-time users

Setup in the PayPal Developer Dashboard

You create an app in PayPal and register WeWeb’s return URL (the URL PayPal sends users back to after they approve sign in).

1. Create an app and get credentials

  1. Open the PayPal Developer Dashboard.
  2. Go to Apps & Credentials.
  3. Create an app (you can create one in Sandbox for testing, and one in Live for production).
  4. Copy:
    • Client ID
    • Client Secret

2. Enable “Log in with PayPal” and set the return URL

  1. In your app, find Other features.
  2. Enable Log in with PayPal, then open Advanced Settings.
  3. Set the Return URL to:
    • https://<your-domain>/api/auth/callback/paypal
  4. Choose which user information you want to request (start with the minimum you need).
  5. Add your Privacy policy URL and User agreement URL (PayPal allows https://example.com for testing).
  6. Save your changes.

If you use multiple environments, add a return URL for each environment (preview, staging, production).

IMPORTANT

PayPal sign in is easier to test on a real public domain. Localhost setups can be blocked depending on your PayPal configuration.

Connect PayPal in WeWeb

  1. In the WeWeb editor, go to Data & API → Auth → Integrating providers.
  2. Find PayPal and expand it.
  3. Turn on the Enable toggle.
  4. Paste:
    • Client ID
    • Client Secret
  5. Click Save.

WeWeb stores these values as environment variables (for example PROVIDER_PAYPAL_CLIENT_ID and PROVIDER_PAYPAL_CLIENT_SECRET).

Test sign in

  1. In Interface, add a “Continue with PayPal” button.
  2. Create a workflow on click and add Sign in with social provider.
  3. Set:
    • Provider: paypal
    • Success page, Error page, And (optional) New user page
  4. Preview your project and complete the PayPal sign-in flow.

For what to do after sign in (roles, private pages, and access checks), see Users and roles overview →.

Common pitfalls

Return URL mismatch

If PayPal shows an error about the return URL, the return URL in PayPal doesn’t match what your app is using.

  • In PayPal, confirm Other featuresLog in with PayPalAdvanced Settings includes https:///api/auth/callback/paypal.
  • Make sure you are testing on the same domain you registered (preview vs production).

Using sandbox credentials in production (or the other way around)

PayPal has separate credentials for sandbox and live.

  • Use sandbox Client ID / Client Secret in your staging environment while testing.
  • Use live Client ID / Client Secret in your production environment when you go live.

App review delays (live)

Live “Log in with PayPal” apps can require review before they work for real users.

  • Plan extra time for PayPal review for live apps.
  • Make sure your privacy policy and user agreement URLs are real before going live.

Reference

WeWeb settings

Setting in WeWebDescriptionWhere to find it in PayPal
Client IDIdentifies your PayPal app.PayPal Developer Dashboard → Apps & Credentials.
Client SecretSecret used to securely complete sign in.PayPal Developer Dashboard → Apps & Credentials.

FAQs

Which return URL should I set in PayPal?

Set your return URL to https://<your-domain>/api/auth/callback/paypal. Add one return URL per environment you use.

What provider value should I use in the workflow action?

Use paypal as the Provider value in the Sign in with social provider action.

Continue learning

Next, learn how to protect pages and data once users are signed in.

Users and roles overview →