Transaction Model

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.

id #

The Commerce ID of the transaction.

hash #

The unique hash identifier of the transaction as created by Craft Commerce.

type #

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 purchase or capture transaction. You can not refund an authorization.

amount #

The amount of the transaction. This amount is in the primary currency.

paymentAmount #

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.

paymentRate #

This stores the currency conversion rate of the order’s payment currency at the time payment was attempted.

status #

The status of the transaction. Possible values are:

pending The transaction is pending getting a redirect, success or failed status.

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 code and message to find out more information.

reference #

The reference of the transaction as defined by the gateway.

message #

The plain text message response from the gateway. Usually a sentence. This message is used to show to the customer if the transaction failed.

response #

The full response data from the gateway, serialized as json. Useful for debugging.

code #

The response code from the gateway. This will usually align in its meaning with the message.

parentId #

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.

order #

The Order Model this transaction belongs to.

orderId #

The order ID of the Order Model this transaction belongs to.

paymentMethodId #

The ID of the payment method used for communicating with the 3rd party gateway.

Buy Craft Commerce

Craft Commerce site license

Includes

  • Standard tech support
  • Unlimited app updates
  • Craft Pro site license
Buy now for $999
Can I try before buying?

Absolutely. Just download it from the “Download” button in the site header and follow our installation instructions. You’ll have the full feature set to experiment with, with just one limitation: you won’t be able to charge credit cards. Until Craft Commerce has been purchased and activated, it’s limited to a single dummy gateway.

Will there be recurring/upgrade fees?

Nope, it’s just a one-time license fee per site.

Can I use this on an existing Craft site?

Yes! And if you already have a Craft Pro license (or you don’t need one), just flip that “Include a Craft Pro license” switch in the purchase form, and we’ll drop the price to $700.

Is Craft Pro required?

Craft Commerce does not require Craft Pro; it works perfectly fine on Craft Client and Personal editions as well!

Can I try before buying?

Absolutely. Just download it from the “Download” button in the site header and follow our installation instructions. You’ll have the full feature set to experiment with, with just one limitation: you won’t be able to charge credit cards. Until Craft Commerce has been purchased and activated, it’s limited to a single dummy gateway.

Will there be recurring/upgrade fees?

Nope, it’s just a one-time license fee per site.

Can I use this on an existing Craft site?

Yes! And if you already have a Craft Pro license (or you don’t need one), just flip that “Include a Craft Pro license” switch in the purchase form, and we’ll drop the price to $700.

Is Craft Pro required?

Craft Commerce does not require Craft Pro; it works perfectly fine on Craft Client and Personal editions as well!