PayPal API 403 PERMISSION_DENIED on get order and capture order

martianmaikel
New Community Member

I'm trying to finish my checkout with PayPal for my Laravel App for 2 days but capturing the order just doesn't work.

I followed the instructions https://developer.paypal.com/docs/checkout/standard/integrate/  and everything works fine - I genera...

{
"debug_id": "xxx",
"details": [
{
"description": "You do not have permission to access or perform operations on this resource.",
"issue": "PERMISSION_DENIED"
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/orders/v2/#error-PERMISSION_DENIED",
"rel": "information_link"
}
],
"message": "Authorization failed due to insufficient permissions.",
"name": "NOT_AUTHORIZED"
}

I already found out, that it could be something with the transaction search option checked AND waiting 9 hours to get the new scope if I requested a token with transaction search unchecked. So I checked it, waited about 14 hours and I'm still don't getting it into the scope of the access token 

"scope":"https://uri.paypal.com/services/billing-agreements https://api.paypal.com/v1/payments/.* https://uri.paypal.com/services/vault/payment-tokens/read openid Braintree:Vault https://api.paypal.com/v1/vault/credit-card/.* https://uri.paypal.com/services/subscriptions".
 
What could possible cause this problem?

 

Login to Me Too
1 REPLY 1

Kavyar
Moderator
Moderator

Good day @martianmaikel 

 

Thank you for posting to the PayPal community.

 

I would suggest to please contact your website developer or the third party eCommerce support to cross check your using same SANDBOX/LIVE  REST API Credentials(Client ID & Secret) while performing the below API calls.

 

https://developer.paypal.com/api/rest/authentication/

https://developer.paypal.com/api/rest/postman/ 

 

Merchant should first perform Create Order API( https://developer.paypal.com/docs/api/orders/v2/#orders_create) call and then redirect the customer/buyer to "approve" URL. 

 

Once the order is approved by the customer/buyer, merchant should perform CaptureOrder ( https://developer.paypal.com/docs/api/orders/v2/#orders_capture) API call and customer/buyer should pass the valid funding source.

 

Also, 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). 

 

https://developer.paypal.com/docs/multiparty/ 

 

https://developer.paypal.com/docs/multiparty/seller-onboarding/ 

 

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 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.

 

Direct link -  https://www.paypal.com/cgi-bin/webscr?cmd=_profile-api-grant-authorization

                       https://developer.paypal.com/api/nvp-soap/paypal-payments-standard/admin/third-party/ 

 

If your still facing issues, please create an MTS ticket via -  https://www.paypal-support.com/s/?language=en_US  with the detailed information and error details.

 

Sincerely,

Kavya

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.