NOT_AUTHORIZED returned when using /billing-agreements/agreements
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I want to integrate PayPal with Chargebee, and I referred to this link: reference-transactions. According to the doc, I'm using the three APIs:
```
1. Get Access-Token: https://api-m.sandbox.paypal.com/v1/oauth2/token
2. Create a Billing Agreement Token: https://api-m.sandbox.paypal.com/v1/billing-agreements/agreement-tokens
3. Create a Billing Agreement: https://api-m.sandbox.paypal.com/v1/billing-agreements/agreements
```
The first API always works fine, but the third reported errors from yesterday. Here is an error example for the third API:
```
Below is the payload:
```
- Labels:
-
Reference Transactions
-
REST

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day @ZeenEsol
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 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/
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.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Auto Return feature for digital products without using woocommerce? in PayPal Payments Standard
- NOT ENABLED TO VAULT PAYMENT SOURCE in Sandbox Environment
- Add parameters to custom auto return url? in PayPal Payments Standard
- Authorization failed due to insufficient permissions in Sandbox Environment
- 403 error in payouts API. in REST APIs