Before obtaining the Client ID and Client Secret, it is essential to have a PayPal business account. To create paypal business account follow this article https://www.paypal.com/in/brc/article/sign-up-business-account
After creating account follow these steps
- Open the website https://developer.paypal.com/developer/applications/ and log in to the dashboard of PayPal business account.
- After logging in, click to the MY APPS AND CREDENTIALS tab, and In the Rest API APPS section, select the CREATE APP button. This permits your system to validate the PayPal business account and process refunds.
- When the app is created, name it and select the previously created sandbox test account.
- After this, press the CREATE APP button.
- Once the app is created, its details will open, the screen will show you the Client ID along with the Secret Key. Press the Secret Key, and then the secret will show up to you.
- Finally, from this page, copy the client ID and secret for the sandbox environment and paste to the modified payment account page in your website/app.
Note: only administrators can disable these values; otherwise, these values do not expire.
At the upper right side of the PayPal business account, switch the sandbox tab to the live tab, and view the client id and secret values for the your business.