A transaction can have a single type and status at one time.
A transaction can also have a parent transaction relationship.
There are 4 transaction types:
A transaction type determines what the transactions is and how it is counted when determining the order totals.
authorize is used when the customer is not immediately charged to their card, but an authorization is placed on their card. The authorization will be captured at a later time, and the customers card will then be charged. An authorization can have the status of
capture transactions are always child transactions of
authorize transactions. You can only capture a
authorize transaction that had a
success status. A capture can have the status of
purchase is used when the customer is getting charged immediately to their card. An purchase can have the status of
refund is used when the customer was refunded an amount. It can only be the child of a
purchase transactions that have the status of
There are 5 transaction statuses:
pending status is for when a transaction is first created. It could then be changed to different status once the gateway/customer determines what the transaction should be. For example, changed to the
redirect status when the customer is being redirected off-site.
redirect status us when the customer was sent off-site. A redirect status should only be used for
capture transactions as capture and refunds are usually done by an admin from the control panel and not taken off-site to perform those actions.
processing is a semi-successful status introduced due to asynchronous nature of some gateways where knowing if the transaction is successful or failed will happen at a later time. For example, in stripe the customer might be returned from a SCA offsite back to the craft site and we will update the transaction as
processing before the webhook comes in with the results of the payment from the bank. When we get a
processing status on an
purchase transaction we still
'complete' the cart and turn it into an order. So the only way for a customer to complete a cart is to have a successful purchase or authorization or a successful processing transaction.
success status means the transaction was successful. This covers the
failed status means the transaction failed. This covers
We will update the docs with the above.