The payment status represents the last action that was submitted on a payment.
There are three possible transaction statuses:
There are five possible payment statuses:
The status of the payment is determined by the last transaction status (succeed/fail).
This means that the first status of any payment will always be initialized and the next payment status will be determined by the next transaction created.
Meaning: Initialized payments can be one of the following: Captured, Authorized or charged. If the transaction (captured/Authorized/charged) is successful, the status of the payment will change accordingly to - captured, authorized or charged.
If the transaction(captured/Authorized/charged) fails, that payment will stay in the last successful status, in this case - Initialized status.
The same applies to refund and void, or any other transactions - if the transaction succeeds, the payment will change accordingly to refund/void, and if it fails, it will stay in the last status: authorized/captured/charged.
There are several providers whose payment flows involve asynchronous responses; their responses are not returned instantly but after a set period of time. For such payments whose status is not immediately known, the Pending status is returned. This status is updated later to Successful or Failed, once an update is received from the provider regarding the specific transactional action.