Q:

Async request recursively

I need to make a request to our API for check a flag in a record of our DB. I can make this request "n" times maximum. If I don't find a correct value, I will return an error. 
I have tried to use JQuery attribute async:false to make an async request synchronous with no effect (and I have seen that is deprecated).
Another option was to make an AJAX request recursively, but AJAX caches the value. I have used cache:false with no effect too.
I am looking for other alternatives (node libraries, patterns, ...) but with no luck until the moment.
Someone has solved a similar problem?
UPDATE 1: My last code with recursive call
function checkPay(initialResponse, attempts){
if (attempts == 50){
    console.log("Something goes wrong after 50 attempts...");
    console.log("Let's restart and try again");
} else {
    ajax.jsonRequest('get', 'check_pay', {transactionID: "123FOO"}) //A simple wrapper for $.ajax
        .done(function(responseStatus){
            if (responseStatus.status == "PENDING"){
                console.log("Still waiting...");
                checkPay(initialResponse, attempts + 1);
            } else if (responseStatus.status == "ACCEPTED"){
                console.log("Yuhuu!!!");                    
            } else if (responseStatus.status == "REJECTED") {
                console.log("Ooops...");                    
            } else {
                console.log("Wat?");
            }
        }).fail(function(error){
            console.log("ERROR", error);
            return "REJECTED"
        });
}

}

A:

You can prevent caching by adding a pseudo-random parameter to every request. The browser and your server will believe that because your request contains different query data, that you may be asking for different information and will not serve a cached response.
You should simply be able to change
ajax.jsonRequest('get', 'check_pay', {transactionID: "123FOO"})

To:
ajax.jsonRequest('get', 'check_pay', {
  transactionID: "123FOO",
  timestamp: Date.now()
})

