Authorization failed due to insufficient permissions
castingcallclub
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Sep-14-2022
08:35 AM
I am trying to create a subscription for paypal via braintree. I keep getting this error:
Subscription Api response error:
{
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"debug_id": "f3865167eaefb",
"details": [
{
"issue": "PERMISSION_DENIED",
"description": "You do not have permission to access or perform operations on this resource."
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/v1/billing/subscriptions#NOT_AUTHORIZED",
"rel": "information_link",
"method": "GET"
}
]
}
I am trying to create the subscription like this
const createPayPalSubscription = (data, actions) => {
return actions.subscription.create({
//'plan_id': window.thePlan.paypalPlanId
'plan_id': 'dollar12'
})
}
const init = () => {
braintree.client.create(
{ authorization: braintreeClientToken },
(clientErr, clientInstance) => {
if (clientErr) { console.log(clientErr) }
braintree.paypalCheckout.create(
{ client: clientInstance },
(paypalErr, paypalCheckoutInstance) => {
if (paypalErr) { console.log(paypalErr) }
paypalCheckoutInstance.loadPayPalSDK(
{
'intent': 'subscription',
'vault': true,
'disable-funding': 'card'
},
(loadPayPalSDKErr) => {
if (loadPayPalSDKErr) { console.log(loadPayPalSDKErr) }
return paypal.Buttons({
style: { layout: 'horizontal' },
createSubscription: createPayPalSubscription,
onApprove: payPalSubscriptionApproved
}).render('#paypal-button').catch((error) => {
console.error('failed to render the PayPal Buttons', error)
})
}
)
}
)
}
}
1 REPLY 1

PayPal Employee
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan-02-2023
03:01 AM
Good day @castingcallclub,
Thank you for posting to the PayPal community.
Can you please try now and if your still facing issues, please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US with the error details.
Braintree Support : https://developer.paypal.com/braintree/help
Sincerely,
Chiranjeevi
PayPal/Braintree MTS
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.
Related Content
- Please enable the shipment tracking API permission for my sandbox account in Sandbox Environment
- error "Authorization failed due to insufficient permissions." with prestashop checkout in Sandbox Environment
- AUTHENTICATION_FAILURE using transaction history api in REST APIs
- Error on Payment in REST APIs
- Not allowed to save cards with Payment Method Tokens Api in sandbox mode in REST APIs