The error when trying to get billing agreement token for not US locations

DWdeveloper
Contributor
Contributor

Hello, we are receiving such a PayPal error when trying to get a billing agreement token for non-US locations (like IT, etc.) for sandbox account “FTGXC96R23DHS”.

{ "name": "BUSINESS_ERROR", "debug_id": "97162070ca8f2", "message": "Business error", "information_link": "https://developer.paypal.com/webapps/developer/docs/api/#BUSINESS_ERROR", "details": [ { "name": "UNAUTHORISED ACCESS", "message": "Authorization failed due to insufficient permissions. Invalid Scopes" } ] }

 

Could you please check if any additional settings are required from your side or advise us on how to fix this issue?

Login to Me Too
28 REPLIES 28

DucorpsToo
New Community Member

Having the same exact issue - the only difference being that the location is U.S  I do have a few sandbox accounts - one of them being a "zombie" that I cannot seem to delete. 

 

 

{
"additional_properties": "xxxxxx",
"body": {
"name": "BUSINESS_ERROR",
"debug_id": "45e6e9f4071fd",
"message": "Business error",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#BUSINESS_ERROR",
"details": [
{
"name": "UNAUTHORISED ACCESS",
"message": "Authorization failed due to insufficient permissions. Invalid Scopes"
}
]
},
"duration_time": "xxxxxx",
"header": {
"APPLICATION_ID": "APP-80W284485P519543T",
"Access-Control-Expose-Headers": "xxxxxx",
"BORDER-IP": "xxxxxx",
"CALLER_ACCT_NUM": "YUTQ9R23P7PPJ",
"Date": "Tue, 14 Ma[Removed. Phone #s not permitted]GMT",
"Keep-Alive": "xxxxxx",
"Server-Timing": "xxxxxx",
"paypal-debug-id": "45e6e9f4071fd"
},
"status": 403
}

Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hello @DucorpsToo,

Thank you for posting to the PayPal Merchant Sandbox Community. There was a recent update that is requiring the Future Payments scope to be added to the sandbox app. I was able to locate your Sandbox Rest API app associated with this sandbox account YUTQ9R23P7PPJ, and add the scope.

You should be able to process Billing Agreement API now.

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

kimtuyen7h
Contributor
Contributor

SandepSoni
Contributor
Contributor

Hi,

I am getting authentication error when trying to void an authorization request on Paypal sandbox environment.

Error message: "Authorization failed due to insufficient permissions"

I am getting successful response for token generation, creating an order and authorize payment requests. I got below response for void authorization:
{
"name": "BUSINESS_ERROR",
"debug_id": "475026eb1dc84",
"message": "Business error",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#BUSINESS_ERROR",
"details": [
{
"name": "UNAUTHORISED ACCESS",
"message": "Authorization failed due to insufficient permissions. Invalid Scopes"
}
]
}

Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hello @DWdeveloper,

 

Thank you for posting to the PayPal Merchant Community.

There was a recent update for Sandbox Rest API apps that require the future payment scope to be added to the app.

I was able to locate your Sandbox Rest API app associated with this sandbox account FTGXC96R23DHS, and add the scope. You should be able to process Billing Agreements with no issues.

 

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

mediondev
Contributor
Contributor

Hello @MTS_Jennifer ,

 

we are also dealing with the same issue in our sandbox environment. can you please add the missing scope as well. Thanks

 

Sandbox account id: S9CSVEY83G478

{
  "name": "BUSINESS_ERROR",
  "debug_id": "7ac3514d1a9d4",
  "message": "Business error",
  "information_link": "https://developer.paypal.com/webapps/developer/docs/api/#BUSINESS_ERROR",
  "details": [
    {
      "name": "UNAUTHORISED ACCESS",
      "message": "Authorization failed due to insufficient permissions. Invalid Scopes"
    }
  ]
}

 

 

Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hello @mediondev ,

Thank you for posting to the PayPal Sandbox Community. I have enabled Future Payments/Reference Transactions for your app related to this sandbox account: S9CSVEY83G478

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

mediondev
Contributor
Contributor

@MTS_Jennifer Thank you so much, it works now.  Cheers

Login to Me Too

SurplusSeekers
Contributor
Contributor

[Sun May 05 0[Removed. Phone #s not permitted]2024] [proxy_fcgi:error] [pid 670988:tid 139624648259328] [remot[Removed. Phone #s not permitted] AH01071: Got error 'PHP message: Error processing upgrade: Got Http response code 404 when accessing https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-CY9W6VUTNUY2.'

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.