Invoice State Machine


StateSent asDescription
BilledbilledA request for payment has been made, but a payment method has not been selected. Therefore, no payment address or spot rate has been assigned, and the expiration timer has not started.
UnpaidunpaidA request for payment has been made, the payment method has been declared, and the expiration timer is ticking.
PaidpaidPayment has been received in full, but has not been confirmed on the blockchain.
UnderpaidunderpaidA payment has been received, but does not fulfill the request for payment at the given exchange rate
Ready to Shipready_to_shipThe Payment is confirmed on the blockchain and the merchant. Typically, this is when the merchant releases the goods to the customer.
FulfilledfulfilledAn optional state that merchants can use for their internal tracking.
Merchant Reviewmerchant_reviewThe Expiration window has passed, and the invoice was either underpaid, and/or a payment was received late.
RefundedrefundedA Merchant requested that a refund be issued for the invoice.
CanceledcanceledThe invoice entered a state of merchant_review and was rejected by the merchant.
InvalidinvalidAny payment on the invoice was flagged as invalid.


* Note: an invoice never transitions into an 'Expired' state - the expiration window is based on the value of "expires_at" in the Invoice.


Invoice Events


The following events are monitored within GoCoin and can generate Webhooks:


Event
Trigger
invoice_created
Sent when an invoice is created.
invoice_payment_received
Payment is detected and unconfirmed on the network.
invoice_ready_to_ship
Payment(s) confirmed for the full amount of the invoice.
invoice_merchant_review
A Payment was received after the payment window, or the invoice expired while underpaid.
invoice_invalid
Invalid payments detected. Purchaser may be attempting to double spend Bitcoin.