Skip to content

Reference

PayPal

Set up PayPal OAuth for payment processing and account access

Connect your users to PayPal for payment processing, account information, and financial transaction data.

PropertyValue
Provider IDpaypal
CategoryPayments
PKCESupported
Token refreshAutomatic
EnvironmentsProduction and Sandbox
Redirect URIShown in Developer Portal

PayPal runs its sandbox on different OAuth endpoints, not just different API hosts. A sandbox client ID and secret are valid only against the sandbox, and live credentials only against production — they are not interchangeable.

Pick the environment when you configure the provider:

  • Developer Portal — an Environment selector appears on the PayPal configuration form.
  • CLI — pass --environment sandbox:
Terminal window
alter providers create --app <app> --provider paypal \
--environment sandbox \
--client-id <sandbox-client-id> --client-secret - \
--scopes openid,email \
--redirect-uri https://your.app/callback

PayPal client IDs are opaque — there is no documented format difference between sandbox and live IDs. The save-time credential check verifies the credentials against the environment you selected, so a credential that belongs to the other deployment is rejected with an explanation at save time rather than failing later at the first user connection. A sandbox configuration can only reach api-m.sandbox.paypal.com; it cannot call the live API.

Switch the existing configuration rather than deleting and rebuilding it. Change the environment and the credentials together — sandbox and live credentials are not interchangeable:

Terminal window
alter providers update --app <app> --provider paypal \
--environment production \
--client-id <live-client-id> --client-secret -

In the Developer Portal, the Environment selector is on the provider’s configuration page, next to the client ID and secret.

Go to the PayPal Developer Dashboard

Create a new app

Click Create App, enter an app name, and select Merchant or Platform as the app type.

Configure the redirect URI

Under App Settings, add the Alter callback URL from the Developer Portal to the Return URL field.

Get credentials

Copy the Client ID and Client Secret.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add PayPal provider

Go to OAuth Providers > Add Provider > PayPal.

Enter credentials

  • Client ID: Paste your PayPal Client ID
  • Client Secret: Paste your PayPal Client Secret

Select scopes

Choose the scopes the application needs.

Save

Click Save. The provider is now active.

ScopeDescription
openidAccess to OpenID Connect identity
emailAccess to user email address
profileAccess to user profile information
addressAccess to user address information
https://uri.paypal.com/services/paypalattributesAccess to PayPal account attributes
ScopeDescription
https://uri.paypal.com/services/expresscheckoutProcess Express Checkout payments on behalf of the account
https://uri.paypal.com/services/payments/futurepaymentsCharge the customer for future payments (Future Payments)
https://uri.paypal.com/services/wallet/sendmoneySend money from the account’s PayPal wallet

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
orders.createpayment, writePOST/v2/checkout/orders
orders.getreadGET/v2/checkout/orders/{id}
orders.patchpayment, writePATCH/v2/checkout/orders/{id}
orders.authorizepaymentPOST/v2/checkout/orders/{id}/authorize
orders.capturepaymentPOST/v2/checkout/orders/{id}/capture
orders.confirmpaymentPOST/v2/checkout/orders/{id}/confirm-payment-source
orders.track.createwritePOST/v2/checkout/orders/{id}/track
orders.trackers.patchwritePATCH/v2/checkout/orders/{id}/trackers/{tracker_id}

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.