Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Wrapper libraries >

NetStandard call to accountingApi CreatePaymentServices returns 401 "AuthorizationUnsuccessful"

Started by Paco Garcia -   in Wrapper libraries

Hi all,

I was able to call methods using the accounting API in the C# NetStandard Nuget package (using OAuth2). I have been able to successfully call methods from accounting API such as accountingApi.GetAccountsAsync() and accountingApi.GetOrganisationsAsync().

But when it comes to accountingApi.GetPaymentServicesAsync(), it has always thrown a 401 error with "AuthorizationUnsuccessful" as the error message. I am sure that I included "paymentservices" in the scope. My question is: do I still need to have my app certified so as to be able to successfully call GetPaymentServicesAsync()?

And if the answer is "yes", isn't there a developer login to try and test out creating payment services without undergoing certification first?
Hi, I have had similar failures

Check your scopes list when you authenticate. If you did not have the correct scope requested you will get this kind of failure.

You cannot just re-login either, you need to revoke the token set (or disconnect the app) then re-authenticate with the correct scope
"paymentservices"

I believe
 

Darren Lawrence  

Hi all,

So the 'paymentservices' scope is private API that require additional certification and or commercial agreements for use. They are traditionally reserved for banks and other bank feed level originators.

If you have a use case for an application using this API scope, please review section 14 of our T's & C's. https://developer.xero.com/xero-developer-platform-terms-conditions/

Should you wish to proceed you can apply for that fin serv partnership via this form: https://www.xero.com/us/partner-programs/financialweb/contact/

Best & thanks for your discussion!

Chris
---

https://developer.xero.com/documentation/oauth2/scopes

The following scopes are only available after additional certification. If you require access to these scopes please let us know once you register to be a partner. Additional commercial agreements may apply.
 

Christopher Knight (Xero Staff)  

Thanks everyone. Chris, so to confirm, calling accountingApi.GetPaymentServicesAsync requires the paymentservices scope which requires certification?
 

Paco Garcia  

Yes you got it.

----

Payment service details can only be accessed by specifically certified payment service partners. See our payment services integration guide for more details.

https://developer.xero.com/documentation/api-guides/payment-services-integration-with-xero
 

Christopher Knight (Xero Staff)