Finix's Card Not Present (CNP) Gateway uses Authorization and Captures to send Transactions on the WorldPay ecommerce platform.
When an Authorization is created it creates an Authorization resource (AUxxxx) with either a success or failure from the processor and issuing banks. This process is nearly instantaneous as it is API based.
When a customer decides to capture the Authorization (AUxxxx), there is a corresponding Transfer (TRxxx) that is created in our system.
Once the Transfer is created, we send the information to WorldPay to be captured. This process is not instantaneous because it is batched based and involves FInix sending XML files to an SFTP Folder.
Approximately every 3 minutes, we send Captures, Merchant boarding information, and Funding instructions through our batch system to WorldPay. In addition, it takes us a few minutes to parse the XML responses and turn it back into a RESTFUL API state of SUCCEEDED.
During peak loads, especially during settlements, the amount of time it takes to send the information may be longer than 3 minutes.
End to end, Transfers generally take between 5 - 25 minutes to be processed from a Pending to a Succeeded state.
We are currently exploring ways to improve this time-frame and intend to release improvements periodically throughout the year.
Reversing a transaction with a state of Pending
When an Authorization is captured, the batch process begins and we start preparing to send the capture to WorldPay.
However, a customer might decide to want to refund a Transfer within seconds of choosing to capture it.
There are two scenarios that can occur when a transfer is in a Pending state and a customer attempts to reverse/refund the transfer.
1. The Reversal is Cancelled
This is the most frequent scenario. This occurs because the transfer is in flight to WorldPay and can't be reversed.
The original Transfer will move to a state of Succeeded and the reverse will be canceled.
2. The Original Transfer is Cancelled
This is the more rare scenario where the transfer is queued up to be sent to WorldPay but not actively being sent. In these scenarios, the Original Reversal succeeds and the parent transfer moves to a Canceled state.
There is no current way to decide whether #1 or #2 will occur. We are currently exploring ways to improve this behavior and intend to release improvements.