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 |
REFUNDED |
Set only when Qore Payments overrides a transaction's status (processing code 1006). A refund through the API doesn't set it: it creates a separate REFUND transaction, and the payment stays APPROVED. |
Yes |
Transaction lifecycle
From created to final
A transaction can still change while it is CREATED or PENDING. The other statuses are final. REFUNDED, set only by a status override, is not drawn.
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: Normal processing never moves a transaction out of a terminal status. Qore Payments can override a status, for example to
REFUNDED. - Non-Terminal Statuses: Allow additional actions or progression through the transaction lifecycle.