The transaction object
The transaction
object has the following attributes:
transaction.amount
Returns the amount of the transaction. This amount is in the customer's local (presentment) currency. Use one of the money filters to return the value in a monetary format.
transaction.created_at
Returns the timestamp of when the transaction was created. Use the date filter to format the timestamp.
transaction.gateway
Returns the name of the payment provider used for the transaction.
Input
{{ transaction.gateway }}
Output
Cash on Delivery (COD)
transaction.id
Returns a unique numeric identifier for the transaction.
transaction.kind
Returns the type of transaction. There are five transaction types:
authorization
is the reserving of money that the customer has agreed to pay.capture
is the transfer of the money that was reserved during the authorization stage.sale
is a combination of authorization and capture, performed in one step.void
is the cancellation of a pending authorization or capture.refund
is the partial or full refund of the captured money to the customer.
transaction.name
Returns the name of the transaction.
Input
{{ transaction.name }}
Output
c251556901.1
transaction.payment_details
The payment_details
object contains additional properties related to the payment method used in the transaction.
credit_card_company
Returns the name of the company who issued the customer's credit card.
Input
{{ transaction.payment_details.credit_card_company }}
Output
Visa
credit_card_number
Returns the customer's credit card number. All but the last four digits are redacted.
Input
{{ transaction.payment_details.credit_card_number }}
Output
•••• •••• •••• 1234
gift_card
Returns the gift card Drop if it is used in the transaction
For instance:
Input
{{ transaction.payment_details.gift_card.last_four_characters }}
Output
1234
transaction.receipt
Returns text with information from the payment provider about the payment receipt. This includes whether the payment was a test case and an authorization code if one was included in the transaction.
transaction.status
Returns the status of the transaction.
transaction.status_label
Returns the translated output of a transaction's status.
Input
English: {{ transaction.status }}
French: {{ transaction.status_label }}
Output
English: Success
French: Réussite