Order Transactions are the payment history of an order.
A transaction can be of a certain type and status, and contain information relevant to the payment and communication to the 3rd party payment gateway.
The Commerce ID of the transaction.
The unique hash identifier of the transaction as created by Craft Commerce.
The type of transaction. Possible values are:
purchase The transaction represents a purchase or immediate payment request. If this transaction type succeeds, the charge on the gateway took the funds from the customers credit card immediately and payment has been made.
authorize The transaction represents an authorization of a payment with the gateway. If successful, the payment was successfully authorized, but an additional capture action needs to take place for the funds to be taken from the credit card.
capture This transaction represents a capture of a previous
authorize transaction. If this transaction type succeeds, the charge on the gateway took the funds from the customers credit card and payment has been made. This transaction is always the child of an authorize transaction.
refund This transaction represents a refund of a payment. It is always the child transaction of either a
capture transaction. You can not refund an authorization.
The amount of the transaction. This amount is in the primary currency.
The payment amount of the transaction, which is the amount sent and used when communicating with the payment gateway. This amount is in the currency of the order’s payment currency.
This stores the currency conversion rate of the order’s payment currency at the time payment was attempted.
The status of the transaction. Possible values are:
pending The transaction is pending getting a
redirect The initial transaction was registered successfully with the offsite gateway, and we have been told to redirect to the offsite gateway. This will be the status while the customer is on the gateways offsite page.
success The transaction is successful.
failed The transaction failed. See the transaction
message to find out more information.
The reference of the transaction as defined by the gateway.
The plain text message response from the gateway. Usually a sentence. This message is used to show to the customer if the transaction failed.
The full response data from the gateway, serialized as json. Useful for debugging.
The response code from the gateway. This will usually align in its meaning with the
Some transactions are children of another transaction. For example, capture transactions are children of authorize transactions, and refund transactions are children of capture or purchase transactions.
The Order Model this transaction belongs to.
The order ID of the Order Model this transaction belongs to.
The ID of the payment method used for communicating with the 3rd party gateway.