Authorisation Flow Endpoints
The Authorise-Capture model is used by some payment methods. For now, AfterPay is the only payment method that uses the Authorise-Capture model.
An Authorise-Capture flow is initiated by the Authorise operation. The Create Authorisation endpoint returns an authorisation instance. Later on, the authorisation is captured, creating the transaction instance. Only upon doing the capture is the consumer actually debited for the amount. After the transaction is created, all the standard transaction operations can be called.
It is up to the merchant’s business logic when to request a capture. Let’s take a retail e-commerce merchant as an example. In this case, the Capture operation could be called only after the merchant ships the items.
If an authorisation needs to be reverted, the Cancel operation can be requested on then authorisation instance. This can be done before any capture call is requested, but also if the authorisation is partly captured, thereby cancelling only the uncaptured part of the authorised amount.
The below mentioned example functions belong to the production environment. Please make sure to use the correct environment endpoints by reading Before you start.
Initiates a new authorisation and returns and authorisation instance with authorisationStatusCode STARTED and an authorisationId in case of success. This id could then be used for a capture to create transaction or for a cancel.
If the authorisation could not be initiated the response can be an error response or an authorisationStatusCode of FAILED or REJECTED.
This call executes the capture flow. It does a full or partial capture on the authorisation. The endpoint returns the created transaction with TransactionId and a transactionStatusCode of COMPLETED in case of succes.
If the capture could not be executed the response can be an error response or a transactionStatusCode of FAILED or REJECTED.
An authorisation with a COMPLETED status can be cancelled using this operation. If the authorisation has already been partly capture this will only cancel the remainder of the authorised amount, but the implementation will vary based on the payment method.
If the cancel was succesfull it will return a cancelStatusCode of COMPLETED. If the cancel could not be executed the response can be an error response or a cancelStatusCode of FAILED or REJECTED.
This endpoint combines the authorisation and a (full) capture in one call. It initiates a new authorisation and immediately does a capture for the full amount.
If succesfull, it will returns a authorisationStatusCode of COMPLETED and a transactionStatusCode of COMPLETED. If either the authorisation or the capture could not be executed the response can be an error response or a authorisationStatusCode or transactionStatusCode of FAILED or REJECTED.