Skip to main content

Trigger an invoice lifecycle transition

PATCH 

/api/v1/invoices/:id/transition

Trigger a lifecycle state transition for an invoice.

The event is one of the AASM events exposed in the invoice's lifecycle_available_transitions. Available transitions depend on the current lifecycle state:

  • draft → deposit
  • deposited → receive, reject, cancel
  • received → make_available, cancel
  • available → take_in_charge, approve, dispute, refuse, send_payment, cancel
  • taken_in_charge → approve, dispute, refuse, send_payment, cancel
  • disputed → approve, refuse, cancel
  • approved → send_payment
  • payment_sent → collect

For a purchase invoice under the approval workflow, send_payment is only offered from approved.

Request​

Responses​

The invoice after the transition, reflecting its new lifecycle_state.