Skip to main content

Payment Lifecycle

States

StateDescription
PENDINGPayment initiated, awaiting customer action or bank confirmation
SUCCESSFULPayment confirmed and funds received
FAILEDPayment attempt was rejected or timed out
CANCELLEDPayment was cancelled before completion

Valid Transitions

FromToTrigger
PENDINGSUCCESFULCustomer completes payment, bank confirms
PENDINGFAILEDBank rejects, timeout, or customer has insufficient funds
PENDINGCANCELLEDCustomer cancels before completion
SUCCESSTerminal state. Cannot transition.
FAILEDTerminal state. Create a new payment to retry.

Rules for AI Agents

  • A FAILED payment cannot be retried with the same reference. Create a new payment with a new unique reference.
  • Do not poll for status more than once every 5 seconds.
  • A SUCCESS status is final. No further action is required.
  • Always verify status via GET /payments/verify before acting on a webhook, in case of out-of-order delivery.

Subscription Lifecycle

States

StateDescription
activeSubscription is healthy, renewals will proceed
failedAll retry attempts exhausted, no payment received
completedSubscription reached its configured end
cancelledStopped by merchant, customer, or system

Valid Transitions

FromToTrigger
activefailedAll retries exhausted
activecompletedcycleCount or endDate reached
activecancelledCancel endpoint called
failedactiveActivate endpoint called
cancelledactiveActivate endpoint called
completedTerminal state