Transaction Life Cycle
Each transaction received by the Gateway follows a pre-determined life cycle from receipt to completion. The stages in the life cycle are determined by the type of transaction and its success or failure at different stages in its life.
Authorise, Capture and Settlement
The key stages in the transaction’s life cycle can be grouped into the Authorisation, Capture and Settlement stages as follows:
Authorisation
An authorisation places a hold on the transaction amount in the Cardholder’s issuing bank.
Capture
A capture marks a transaction as ready for settlement.
Standardly, the Gateway will automatically capture all authorisations as soon as they are authorised.
However, you can delay the capture either for a period of time. The captureDelay field can be used for this purpose and will allow you to state the number of days to delay an automatic capture. For more details on delayed capture, refer to the Capture Delay section.
Settlement
When the Gateway instructs your Acquirer to settle the captured transaction, the Acquirer is the responsible for transferring the funds between the Cardholder’s and your accounts.
Transaction States
At any time during the transaction’s life cycle, it is in one of a number of states as follows:
Received
The transaction has been received by the Gateway and stored away. This is the first stage. The Gateway will examine the transaction and pass it on to the next stage, as appropriate.
Approved
The transaction has been sent to the Acquirer for authorisation and the Acquirer has approved it and is holding the Cardholder’s funds.
This is an intermediate state and follows the received state.
Verified
The transaction has been sent to the Acquirer for verification and the Acquirer has confirmed that the account is valid.
This is a terminal state and follows the received state. The transaction will never be settled and no funds will ever be transferred
Declined
The transaction has been sent to the Acquirer for authorisation and the Acquirer declined it.
The Acquirer will not usually give any reason for a decline and will not have held any funds.
The transaction has now completed its life cycle and no more processing will be done on it.
This is a terminal state and follows the received state. The transaction will never be settled and no funds will ever be transferred. The transaction responseCode will be 5 (Declined).
Referred
The transaction has been sent to the Acquirer for authorisation and the Acquirer referred it for verbal approval.
You should treat these transactions the same as a normal ‘declined’ authorisation.
This is a terminal state and follows the received state. The transaction will never be settled and no funds will ever be transferred. The transaction responseCode will be 2 (Referred).
Reversed
The transaction was sent to the Acquirer for authorisation and the Acquirer approved it. However, the transaction has been voided and the approval reversed. The Acquirer will have been asked to reverse any approval previously received, effectively cancelling the authorisation and returning any held funds back to the Cardholder.
The Gateway will reverse an authorisation if it declines the transaction post authorisation due to any AVS/CV checking. The PREAUTH action will also automatically reverse an authorisation before return.
This is a terminal state and follows the approved state. The transaction will never be settled and no funds will ever be transferred.
If the transaction was reversed due to AVS/CV2 checking, then the transaction responseCode will be 5 (AVS/CV2 Declined).
Captured
The transaction has been captured and the Acquirer will be asked to capture the approved held funds when the settling process next runs. The settling process usually runs each evening but the Acquirer may take up to 3 days to transfer the funds.
The capture state can either be entered automatically if the transaction requested an immediate or delayed capture; or it can be manually requested by sending a CAPTURE request. You are free to change the amount to be captured to a value less than that initially approved by issuing one or more CAPTURE commands. When captured, there is no way to un-capture a transaction. If not explicitly cancelled, it will be sent for settlement at the next opportunity.
This is an intermediate state and follows the approved state.
Tendered
The transaction has been sent to the Acquirer for settlement by the settling process and is awaiting confirmation that it has been accepted.
At this point, the transaction can no longer be cancelled or re-captured.
This is an intermediate state and follows the captured state.
Deferred
The transaction could not be settled due to some temporary problem such as a communications loss. It will be attempted again the next time the settling process runs – usually first thing the next day.
This is an intermediate state and follows the tendered state. It will normally be accompanied by a transaction response that indicates why the settlement process could not settle the transaction.
Accepted
The transaction has been accepted for settlement by the Acquirer. The held funds will be transferred between the Merchant and Cardholder in due course.
The transaction has now completed its life cycle and no more processing will be done on it, unless it is subject to a rejection while the Acquirer is settling it.
This is a terminal state and follows the tendered state.
Rejected
The transaction has been rejected for settlement by the Acquirer. The held funds will not be transferred between the Merchant and Cardholder.
Only a few Acquirers inform the Gateway that they have rejected a transaction: they usually inform you directly. Therefore, a transaction may show as accepted even if was ultimately rejected or it may change from accepted to rejected if the Acquirer does inform the Gateway.
The transaction has now completed its life cycle and no more processing will be done on it.
This is a terminal state and follows the tendered or accepted states. The transaction response will normally indicate the reason the transaction was rejected.
Canceled
The transaction has been cancelled by the Merchant by sending a cancellation request to the Gateway either using the CANCEL action or via the Merchant Management System (MMS).
You can cancel any transaction that is not in a terminal state or in the ‘tendered’ state. When cancelled, any further processing that would have normally taken place will be halted. Cancelling a transaction may or may not release any funds held on the Cardholder’s card, depending on support from the Acquirer and Card Scheme. Note: the state is spelt American style, with a single ‘l’ as canceled.
This is a terminal state and follows any non-terminal state that occurs before the transaction reaches the tendered state.
Finished
The transaction has finished and reached the end of its lifespan but did not reach one of the other terminal states. Usually this indicates that a problem has occurred with the transaction that prevents it continuing with its normal life cycle.
This is a terminal state and can follow any other state. The transaction response will normally indicate the reason that the transaction failed.