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
25 REPLIES 25

DWdeveloper
Contributor
Contributor

Hi @MTS_Jennifer , thank you for your involvement. Unfortunately, we are still not able to use the Billing Agreement flow, please see the error:

 

{
   "name":"BUSINESS_ERROR",
   "debug_id":"c6b0799641e2f",
   "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 Sandbox Community. I found the app associated with this debug id c6b0799641e2f, and was able to add future payments to the scopes.

You should be able to process Reference Transactions/Billing Agreements.

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

d4n1x
New Community Member

Hi @MTS_Jennifer can you please check this debug id a3bff952043d4

we receive this error:

 

Business error --- UNAUTHORISED ACCESS:Authorization failed due to insufficient permissions. Invalid Scopes

 

calling https://api.braintreegateway.com/merchants/<merchant-id>/client_api/v1/paypal_hermes/setup_billing_a...

 

 

Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hi @d4n1x 

Thank you for posting to the PayPal Merchant Community. I was reviewing the logs, and it looks like this is associated with a live Rest API app. Since this is for a live account, we need details sent directly to us. Please open a ticket by going to https://www.paypal-techsupport.com/s/?language=en_US

  • Choose Contact Us
  • Login with PayPal
  • Choose Contact Us

Ensure that you state you need the Future Payment Scopes added to your live Rest API app. Please include the Live Rest API client id in the description. We will get the scopes added to your live app.

 

Thank you,

Jennifer

MTS

PayPal

MTS

Login to Me Too

DWdeveloper
Contributor
Contributor

Hello @MTS_Jennifer, thanks for your help, it successfully works.

Login to Me Too

odoihc
Contributor
Contributor

Hello @MTS_Jennifer,

please check out these errors, and fix them for us if you can on our sandbox accounts:

 

{"error":{"errorName":"BUSINESS_ERROR","errorMessage":"Business error --- UNAUTHORISED ACCESS:Authorization failed due to insufficient permissions. Invalid Scopes","errorDetails":[{"name":"UNAUTHORISED ACCESS","message":"Authorization failed due to insufficient permissions. Invalid Scopes"}],"debugId":"b802a337cfe24","paypalHttpStatus":403}}

 

{
    "error": {
        "errorName": "BUSINESS_ERROR",
        "errorMessage": "Business error --- UNAUTHORISED ACCESS:Authorization failed due to insufficient permissions. Invalid Scopes",
        "errorDetails": [
            {
                "name": "UNAUTHORISED ACCESS",
                "message": "Authorization failed due to insufficient permissions. Invalid Scopes"
            }
        ],
        "debugId": "22729f81ef5f4",
        "paypalHttpStatus": 403
    }
}

 

Also i ask how do we can independently create / update sandbox accounts (and live ones) to avoid these problems

 

Thanks!

Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hello @odoihc 

Thank you for posting to the PayPal Merchant Community. I have located your sandbox Rest API app, and have added the future payment scope to the app. You should no longer be seeing that error message in your testing.

For the live PayPal Account, it still requires that you are enabled for Reference Transactions, and the scope needs to be added as well. You will need to contact PayPal Customer Support at https://www.paypal.com/smarthelp/contact-us to ensure that Reference Transactions are enabled on your live PayPal Account. If Reference Transactions is already enabled, PayPal Merchant Technical Support at https://paypal.com/mts (click contact us) can ensure that the scopes have been properly added to your Live Rest API App.

 

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

odoihc
Contributor
Contributor

@MTS_Jennifer thanks a lot, it appears to work!

Please also update applications linked to this Account ID : YWM72E6THREF2

 

When you referred to live accounts did you mean as a general solution or a specific account?

 

In any case, what I wanted to ask is if there is a correct way for users to independently update the configuration of existing sandbox accounts or to create new ones that do not have the problem in question.
For live accounts, the same question applies.

Thanks again!

 

Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hello @odoihc,

Thank you for posting to the PayPal Merchant Community. Per your request, I have added future payments to the app associated with this sandbox account: YWM72E6THREF2.

Future payments scope is only needed if you are processing V1 Billing Agreements api. If you are using Save Payment Methods, which uses Vault API, you do not need to have the Future payments scope added to your rest api app.

Reference Transactions is not automatically enabled on live PayPal Accounts, so any live account requires Reference Transactions to be enabled, and the Future payments scope to be added to the live application. To get Future payments scope added to a live account, you will need to reach out by choosing contact us at this URL: https://www.paypal-techsupport.com/s/?language=en_US

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

danwall1
Contributor
Contributor

Hi @MTS_Jennifer,

 

Can I please also have this enabled on my sandbox account?

 

Account: 8ARV44KS5PAB4

Debug ID: abb85c75b6764

 

Thank you

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.