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
![Moderator Moderator](https://www.paypalobjects.com/webstatic/icon/pp32.png)
Moderator
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.
![](/skins/images/04C5A0F2EC66F23C0E7079ADF780584D/responsive_peak/images/icon_anonymous_message.png)
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
- v2/vault/payment-tokens API error "Authorization failed due to insufficient permissions." in REST APIs
- Status 403 Authorization error in REST APIs
- Authorization failed due to insufficient permissions in REST APIs
- NOT_ENABLED_TO_VAULT_PAYMENT_SOURCE error in some APIs / sandbox account in REST APIs
- Always Sorry Something Went Wrong in Prestashop Checkout or Paypal Official Module in PayPal Payments Standard