Hello Florimond,
Sorry for the delay in responding to this post. As mentioned in my email to you, I was not able to replicate the issue on my end. I was able to add charge to a pending invoice and close it when in time machine. To add charge to an invoice in pending state, you would need to use the “Add charge item to pending invoice API”
Could you try using the above API to add charges to a pending and see if that works? If not, can you write us the exact steps you took?
Please let us know!
Regards,
Shriram V
Chargebee
Florimond Husquinet
We are using metered billing. Each month, a pending invoice should be generated, and charges added based on the consumption.
To do so, I use the add_charge api, applied to the pending invoice id.
Now I'd like to test that with the time machine, but I get the following error message :
chargebee error:{"message":"Cannot perform this operation when time travel is in progress. ","type":"invalid_request","api_error_code":"invalid_state_for_request","error_code":"time_travel_in_progress","error_msg":"Cannot perform this operation when time travel is in progress. ","http_status_code":409}
How to test it then?
Thanks for your help.