Status and workflow
Status
The Status of invoice is of integer enum type: 1-Draft | 2-Awaiting payment(Awaiting refund) | 3-Paid(Refunded) | 4-Failed | 5-Cancelled
-
Draft: A
Draft
Invoice is the start status when created by admin manually, admin can edit the draft invoice by clicking the Save button. This status will transition toAwaiting payment
when admin click the Create button, then edit is not allowed, invoice link will be generated (with payment link), and user will receive this invoice mail.Refund invoice works the same way, the only difference is that status will become “Awaiting refund” after creating.
-
Awaiting payment: The invoice is waiting for users to finish the payment. The
DayUtilDue
property represents how many days this invoice will stay in this status. If user finish the payment on time, status will transition toPaid
, otherwiseFaild
. But admin can cancel the invoice if users haven’t finished the payment inDayUtilDue
, then status will becomeCancelled
.Awaiting refund
status works the same way. -
Paid: User has finished the payment on time. Nor further action needed.
Refunded
status works the same way as Paid. -
Failed: This status is an end status from
Awaiting payment
as invoice’s DayUtilDue time run out for payment. -
Cancelled: Comes from by Admin cancel the
Awaitig payment
invoice manual or cancel by System automatic. -
Reversed: There are some edge cases when
Payment received
andPayment failed or Invoice cancelled
happened at the same time. In this case, the invoice will turn toReversed
, admin’s manual intervention is required.