Transaction

Model to represent a transaction

  • Account ID of the merchant that owns this transaction

  • Apple Pay transaction identifier

  • Masked card number (e.g., '****1234')

  • Card brand (e.g., 'VISA', 'MASTERCARD', 'AMEX')

  • Type of card used ('Credit' or 'Debit')

  • Transaction creation timestamp in milliseconds since epoch

  • ISO 4217 currency code (e.g., 'USD', 'EUR')

  • Unique identifier for this specific transaction event (for idempotency)

  • Merchant ID assigned by Koard

  • Payment method used (e.g., 'apple_pay', 'credit_card')

  • Merchant ID assigned by the payment processor (e.g., PayRoc)

  • Terminal ID assigned by the payment processor

  • Unique identifier for the card reader device

  • Subtotal amount in cents (before tax, tip, and surcharge)

  • Terminal ID assigned by Koard

  • Total transaction amount in cents (subtotal + tax + tip + surcharge)

  • Unique identifier for the transaction across all events

  • Additional transaction details as key-value pairs

  • Physical device identifier (e.g., iPad serial number)

  • Payment gateway used for processing

  • Transaction ID returned by the payment gateway

  • Raw response from the payment gateway

  • Historical events for this transaction

  • Location/store ID where transaction occurred

  • Name of the merchant for this transaction

  • Payment processor name (e.g., 'payroc', 'stripe')

  • Response code from the payment processor

  • Response message from the payment processor

  • Total amount refunded in cents

  • Total amount reversed in cents

  • Current transaction status

  • Reason for the current transaction status

  • Surcharge amount in cents

  • Whether a surcharge was applied to this transaction

  • Surcharge rate as a decimal (e.g., 0.035 = 3.5%)

  • Tax amount in cents

  • Tax rate as a percentage (e.g., 8.5 = 8.5%)

  • Tip amount in cents

  • Type of tip calculation method

  • Type of transaction operation