Checkout can be used to authorise a payment instead of authorising and capturing immediately. An authorised payment reserves the money in the cardholder's account and allows you to capture the funds at a later stage. Authorising the payment can be done using Checkout, capturing the payment is done through a separate API call or through the portal.
You cannot capture more or less than has been authorised by the cardholder per transaction.
Example: If a payment has been authorised for 20.00 EUR; it is only possible to perform a full capture for 20.00 EUR.
3D-Secure
Authorisations can also be done with 3D-Secure payments.
Requirement
Follow the steps in the Accepting card payments document to set up your Checkout call. Set the configurations.card.captureNow
value to false
. Setting it to true
will immediately capture the payment.
Captures can only be done on transactions with the status "AUTHORIZED".
After you have used Checkout to authorise a payment, you will receive the id of the transaction in the transactionId
query string parameter appended to the returnUrl
(Read Checkout documentation). This id needs to be referenced for capturing the payment.
Capturing through the API
IMPORTANT: The amount in the API call for capturing a payment is written as a string with a decimal point "." in it. In the POST call for creating a Checkout you need to provide the amount WITHOUT a decimal, in the POST call for capturing a transaction you need to provide the amount WITH a decimal.
Example for a 20,00 EURO transaction:
POST call for creating Checkout
{
...
"amount":2000
....
}
POST call for capturing payment
{
"amount":"20.00"
}
To capture the payment through the API use the /transaction/{transactionId}/capture
endpoint. Replace {transactionId}
with the id of the payment that has already been authorised.
Follow these steps:
{
"amount":"{amount you want to capture}"
}
- Customer authorizes the transaction in Checkout and is sent back to the
returnUrl
withhttps://merchantwebsite.com/order/1234?transactionId={transactionId}&checkoutId={checkoutId}
. - Store the
transactionId
value. - POST call to
/transaction/{transactionId}/capture
, replacetransactionId
with the value from the previous step:
Capturing through the portal
The portal can be used for capturing payments authorised through Checkout as well.
Follow these steps:
- Customer authorises the transaction in Checkout and is sent back to the
returnUrl
withhttps://merchantwebsite.com/order/1234?transactionId={transactionId}&checkoutId={checkoutId}
. - Store the
transactionId
value. - Log into the portal and go to the "Transaction" page.
- Search for the transaction using the
transactionId
from step 2. - Click on the transaction and navigate to the "Actions" tab.
- Enter the amount you would like to capture and click "Capture".