title: Transaction (Order)
type: object
x-tags:
  - Orders
description: Represents a transaction that has been processed against an order.
properties:
  uuid:
    type: string
    format: uuid
    description: The unique identifier.
  status:
    $ref: ./TransactionStatus.yaml
    description: The current status of the transaction.
  finalised_at:
    type:
      - string
      - 'null'
    format: date-time
    description: |-
      The date-time that the transaction was finalised.

      This field will be `null` for a pending transaction.
  gateway:
    $ref: ./PaymentGateway.yaml
    description: The gateway that was used.
  tender:
    $ref: ./Tender.yaml
    description: The tender that was supplied.
  amount_tendered:
    $ref: ./Money.yaml
    description: The amount tendered/provided by the customer.
  change_given:
    $ref: ./Money.yaml
    description: The change that was supplied to the customer.
  gross_collected:
    $ref: ./Money.yaml
    description: 'The net amount collected through this transaction (the successful amount, ignoring any refunds).'
  refundable:
    type: boolean
    description: Indicates if the transaction is in a refundable state.
  refunds:
    type: array
    description: The refunds that have been applied against this transaction.
    items:
      $ref: ./OrderRefund.yaml
  net_collected:
    $ref: ./Money.yaml
    description: 'The net amount collected through this transaction (the successful amount, minus the successul refund amount).'
