Search code examples
paypalpaypal-sandboxpaypal-rest-sdk

Paypal OAuth Implementation to onboard merchants on our site


We have an app where we want to onboard Merchants to connect their Paypal account and then they can accept money from the customers directly through our webapp. I read through the docs and am a little lost on how to start.

What I understood is : Using this document Paypal Doc we first need to generate authorization code then generate refresh and access token. But this document is for Paypal Here.

Also on the Customer Side should I use Smart Buttons Doc where I can generate the order Id and execute the capture step on the Server side using the access token generated for the Merchants in the first part.

Am I heading in the right direction?


Solution

  • If you also need to do things like manage refunds via the API, have the merchants generate a REST client ID and secret via https://www.paypal.com/signin?intent=developer&returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Fapplications and copy this information into your configuration interface

    If you don't need to do that, you can integrate PayPal Checkout with your own API credentials, and set a 'payee' object, https://developer.paypal.com/docs/checkout/integration-features/custom-payee/