Change the button from Sandbox to Production
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
I integrated on a site the payment button.
I ran all the tests in Sandbox without any problems.
The button is the standard one that is generated to which I added javascript code to change the value and the return page
<script
src="https://www.paypal.com/sdk/js?client-id=xxxxu_Te57qBkvhtttKnIt1CEyyyyaIgtJZwYCxORrisrvuX6AXKFMilTZZ_...">
</script>
<div style="max-width:550px; display: inline-block;">
<div id="paypal-button-container"></div>
</div>
<script>
what I changed in the transition from sandbox to real is only the client-id
But I can't get the button to work and in the brower console I have these error messages
{
"err": "Error: /v2/checkout/orders returned status 403 (Corr ID: f8372090db9a9).\n\n{\"name\":\"NOT_AUTHORIZED\",\"details\":[{\"issue\":\"PERMISSION_DENIED\",\"description\":\"You do not have permission to access or perform operations on this resource.\"}],\"message\":\"Authorization failed due to insufficient permissions.\",\"debug_id\":\"f8372090db9a9\",\"links\":[{\"href\":\"https://developer.paypal.com/docs/api/orders/v2/#error-PERMISSION_DENIED\",\"rel\":\"information_link\"}]}\n
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for posting to the PayPal community.
From your error message, it appears that the API call to "/v2/checkout/orders" is returning a 403 error, which signifies that the client does not have permission to access the requested resource. This could be due to a number of reasons, including incorrect permissions on your PayPal account and incorrect client credentials.
If a third-party eCommerce partner is performing API operation on your behalf, you(i.e merchant) should be on-boarded and necessary API permissions should be granted to the Partner(API Caller).
Documentation Link: PayPal Multiparty Payments,
Merchants can manually grant permission to a third-party eCommerce to access specific information in your PayPal account and perform PayPal API operations on your behalf.
Login to PayPal.com >> Settings >> Account Settings >> Website payments >> API Access >> Pre-built payment solution >> Grant API permission >> Contact your "Third-party software eCommerce" for Third Party Permission Username >> Enter the username.
Documentation link: Grant a Third Party Permissions
If you are still facing issues, please create an MTS ticket via - https://www.paypal-support.com/s/?language=en_US with all the relevant information, including your client ID, the exact API call you're making, and the full error message you're receiving.
Sincerely,
Pravallika
PayPal/Braintree
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- "System error. Please try again later" when connecting to paypal sandbox account with my android app in Sandbox Environment
- subscription_id has disappeared in REST APIs
- How to Setting up the PayPal Payflow Pro on Shopify in Sandbox & Production mode? in Payflow
- permission_denied response in call to patch order when paying by Card in Braintree Client-side Integration (JS, iOS, Android SDKs)
- Credentials from sandbox to live in NVP/SOAP APIs