6 Sale vs Authorize / Capture
There are two methods for capturing funds from a cardholder’s account. The first is to authorize, which puts a hold on the account for the amount authorized, followed by a capture, which causes the held amount to be transferred to the merchant’s account. The second method is a sale request, which is equal to an authorize and capture in a single step.
Authorize / capture is used in a fulfillment environment where the funds must be held but the sale is not finalized until the product or service is delivered. If an Authorize is not followed by a Capture request, the hold on the funds will eventually expire, but it is strongly suggested that you execute a void against any authorization that will not be captured.
Sale is used when the charge will be made immediately, for example, when processing a recurring subscription charge.
NOTE: If a sale is requested but the results are not available for whatever reason, do not request another sale until you request the data for the original request and inspect it to make sure it has not been captured. Otherwise double charges may occur. One way to avoid this is to make sure you create unique transaction IDs. Then, if you send the same transaction ID in, PaywayWS will reply with a duplicate notice and the status of the already-existing transaction.