Start a new topic

Common causes of 503 Error when accessing API?

Hi im new to chargebee and am trying to test a subscription check using their API. Ive pretty much used their code verbatim from their docs, substituting my own sandbox site and API key of course. The code below is all im doing but I have been 

checkSubscription = () => {
    var chargebee = require("chargebee");
    chargebee.configure({site : "escape-overseer-test", 
        api_key : "test_TCwzWlKEcumk4Jdu96DZ4qZUFACR0HAPl"});
    chargebee.subscription.retrieve("cbdemo_dave-sub1").request(function(error,result) {
        //handle error
        var subscription = result.subscription;
        var customer = result.customer;
        var card = result.card;

This code is all im running from my JS app. but every time I get a 503 "connection error while making request"

Anybody ran into this and care to share their solution? I already attempted to contact support directly for help but havent heard back in about a week so Im reaching out to you now

1 Comment

Hello Chris, 

Thank you for considering Chargebee for your billing requirements.

Sorry about the trouble you are facing with the retrieve subscription API.

The API request you shared here it seems to work as intended returning the subscription details, I did run a test with your code intact. 

Considering that you are receiving 503 (server response), I was wondering if you have any proxy/intermediate processor in the flow which could be returning this error? Could you help me understand how & where you are calling this endpoint.

Also I see that you have also contact our support team, one of my colleagues will get back to you on that thready today.



Chargebee Solutions Team.

Login or Signup to post a comment