How can I find out the status of a statement in chargify? I.e. if it is paid of not?
I found this documentation. It says:
Chargify Statements give you and your customers a breakdown of Subscription charges, payments, credits, and activity on a period-by-period basis. A Statement is similar to an “Invoice” because it is marked as currently paid or unpaid. Statements display all account activity for a specific usage period.
So, I would expect there to be a marking field which would tell me if the statement is paid, but I can not find such field. I tried to find the field in the documentation I linked above and in the query result I have in my system.
In my system I tried to rely on the ending_balance_in_cents
field. I.e. when it is 0 I deem the statement as paid, otherwise as unpaid. But the problem is that the Chargify does not think the same way. It has the following statement:
As you can see the statement is Paid, even though the Ending Balance is not 0.
It looks like the payment came in after the statement closed. Try looking at the settled_at date and see if that helps determine if the statement is now paid.
https://reference.chargify.com/v1/statements/statements-intro#statement-output-attributes