Before you start
You need:- An API key with the
payout:destination:readandpayout:create_destinationscopes. - PayPal login enabled on the account. Contact Whop to turn it on. While it’s off,
supports_paypal_loginisfalseandPOST /payouts/paypal_link_sessionsreturns403. - A completed payout setup. Whop matches the PayPal account holder’s name against the name collected there.
- An
httpspage on your site where PayPal sends the user back.
POST /payouts/methods still accepts a typed PayPal email through fields. Use this flow when the payout method should be verified before it’s saved.
How the redirect works
The whole login happens in the account holder’s browser, in one tab. You never talk to PayPal directly and you register nothing with PayPal.- You start a PayPal login and send the browser to the returned
authorize_url. This is a PayPal page. - The holder logs in and consents. PayPal redirects the browser to Whop’s callback,
https://api.whop.com/api/v3/redirects/paypal_login. - Whop exchanges the code with PayPal, reads the account’s email, name and verification status, and mints a
paypal_link_token. - Whop redirects the browser to your
return_urlwith either?paypal_link_token=…or?error=…appended. - Your page reads the query string and calls Whop to save the payout method.
1. Find the payout method
List supported payout methods and pick the one withsupports_paypal_login: true.
2. Start the login
Create a PayPal link session and send the account holder to the returnedauthorize_url. It stops working at the returned expires_at, 15 minutes later.
return_url with paypal_link_token or error added to its query string:
The token is single use and lasts 15 minutes. If the holder opens
authorize_url after expires_at, Whop shows a plain “Invalid or expired link” page instead of redirecting.
3. Save the payout method
Create the saved payout method with the token in place offields. Use the same account_id, supported_payout_method_id and destination_currency the session started with. The token is bound to them. Whop saves the email PayPal returned and names the method.
400 with a message written for the holder. Show it as is. The token survives a refusal, so a transient error can be retried. A verification or name refusal needs a fresh login once they fix it.
The method now works like any other and can receive a payout.
What your user sees
PayPal’s consent screen names Whop as the app requesting their email, name, and verified status. The redirects back to yourreturn_url all happen in the same tab, so if you opened PayPal in a pop-up, your return page must notify its opener and close.
