There are actually 2 steps involved in capturing a payment. First, the payment is authorized. This step involves checking that the customer has enough money in their account to settle the payment and then "locking" that money so that it is not available for other payments. The second step is the capture itself, which involves booking the final money transfer between banks.
For Merchant Initiated Transactions (MITs), the payment is automatically authorized when you call
capture() but you can call
authorize() explicitly to perform the authorization as a separate step. You can authorize a payment up to 7 days before capturing it, which may be useful for fraud checking, for example.
For Customer Initiated Transactions (CITs) you must authorize the invoice separately on the client to comply with Strong Customer Authentication (SCA) legislation. See the page about authorizing a payment for more information and examples.
You can also use the
auto_capture_at option with the
authorize() function to arrange for the payment to be captured automatically after a time delay. The value for
auto_capture_at is a date and time in RFC 3339 format that specifies the time when you want the capture to happen.
Note that if you do authorize a payment then you can call the
capture() function without specifying a payment source. The source you supply during authorization will be used for the capture.