.NET API Exception

We're attempting to use ChargeBee in our application via the .NET API. I'm attempting to make a request for invoices via:


 However, when the request is made, the following exception is thrown:

"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." 

with the inner exception of:

"The remote certificate is invalid according to the validation procedure."

I can't seem to find any help on this issue with regards to ChargeBee specifically.


Hi Mobenzi,

Can you check the site name configured in your API code? It should be the site name without ".chargebee.com".


Example: ApiConfig.Configure("mobenzi","your-chargebee-api-key");

I hope this helps. 

1 person likes this

Hi Lavanya,

Yeah that did it, we were sending in the entire site url. Once we sent in the site name only, it worked fine.


Glad it worked for you. 

Write to us if you have any other questions. 

Login or Signup to post a comment