Happy Business Starts Here

[Known Issue] Generate Billing Documents API may get a 504 Gateway Timeout Response

Support SME

[Known Issue] Generate Billing Documents API may get a 504 Gateway Timeout Response

Issue Description:

If the Generate Billing Documents API request can't complete and return a response within 2 minutes, a 504 Gateway Timeout Response will be given. This issue usually happens when the generated billing documents have hundreds of invoice items or credit memo items, or has hundreds of usages recorders which need to be processed in the related billing documents. 


API reference https://www.zuora.com/developer/api-reference/#operation/POST_GenerateBillingDocuments


In the backend, the API request is still being processed and may generate the billing documents successfully.


Before the issue is fixed, here are two workarounds. 

Option 1:If the subscription contains a large number of rate plan charges or customer account has a large number of usage records, it is recommended to use Bill Run to generate big billing documents combined with GET call, such as https://www.zuora.com/developer/api-reference/#operation/GET_BillingDocuments to know which billing documents have been created. 


Option 2: If you are migrating data from a third party system to Zuora, when generating the billing document for the first time, either use bill run, or specify a shorter billing document generation period to control the single billing document size and generate multiple billing documents one by one.  



Our Product and Engineering team are still working on this issue. We cannot provide an ETA of the fix yet. 


Tracking Number:



Feel free to reach out to Zuora Global Support to check the latest status. https://support.zuora.com/