I too was struggling like hell to solve this, but finally after reading the documentation 1000 times I got to know where I was facing the issue. In order to get the data-client-token value, we need to invoke 2 APIs: 1. https://api-m.sandbox.paypal.com/v1/oauth2/token : This retrieves the access token (Refer this for more information: Get Access Token) 2. Then using the access token, we can retrieve the client token using the following API https://api-m.sandbox.paypal.com/v1/identity/generate-token (Refer this for more information: Generate Client Token ) Now the use the client token in the script <script src="https://www.paypal.com/sdk/js?components=buttons,hosted-fields&client-id=<Client ID>" data-client-token="<Client Token from Step 2>"></script> Paypal documentation surely needs to be improved!!!
... View more