Skip to content

Operate · Supported transaction statuses

Know which transaction statuses are final and which can still change

The TransactionStatus enum has two transitional statuses, CREATED and PENDING, and five terminal ones. Once a transaction reaches a terminal status it is finalized and immutable.

Status transitions
  • CREATED PENDING Submitted
  • PENDING APPROVED Authorized
  • PENDING DECLINED Rejected
  • PENDING SESSION_EXPIRED Timeout
  • CREATED INVALID Validation error

CREATED and PENDING can also move to CANCELED.

The TransactionStatus enum represents the lifecycle states of a transaction within the system. These statuses reflect different phases and outcomes, including both transitional and terminal states.

Enum Values

Status Description Terminal/Final Status for transaction
CREATED The transaction has been created but not yet processed. No
PENDING The transaction is awaiting further action (e.g., authorization, 3DS, etc). No
APPROVED The transaction has been successfully authorized or completed. Yes
DECLINED The transaction was rejected by the payment provider or bank. Yes
CANCELED The transaction was canceled either by the user or system. Yes
INVALID The transaction is marked as invalid due to inconsistencies or errors. Yes
SESSION_EXPIRED The transaction session expired before it could complete. Yes

Transaction lifecycle

From created to final

A transaction can still change while it is CREATED or PENDING. The other five statuses are final.

Check a status

stateDiagram-v2
    [*] --> CREATED
    CREATED --> PENDING : submitted
    CREATED --> CANCELED : user cancel
    CREATED --> INVALID : validation failure
    PENDING --> APPROVED : authorized
    PENDING --> DECLINED : rejected
    PENDING --> SESSION_EXPIRED : timeout
    PENDING --> CANCELED : cancel
    APPROVED --> [*]
    DECLINED --> [*]
    SESSION_EXPIRED --> [*]
    CANCELED --> [*]
    INVALID --> [*]

Notes

  • Terminal Statuses: Once a transaction reaches a terminal status, it is considered finalized and immutable.
  • Non-Terminal Statuses: Allow additional actions or progression through the transaction lifecycle.