WordPress Ajax Getting Response “Null”

You are rendering the json data the wrong way.

Change the success to the below:–

success: function(data) {
    alert(data.id);
    // Now you can similarly render the other details like details.success
}

error code: 523