Transaction

Represents a low-level interaction with a payment gateway or processor (e.g., authorize, capture, refund, void).

Entity

Overview

The Transaction entity logs the individual interactions with an external payment processor (like Stripe, PayPal, Adyen) that occur as part of processing a Payment. This provides a detailed audit trail of gateway operations, including authorizations, captures, refunds, and any associated success or failure responses.

Entity Properties

Name Type Required Description
transactionIdUUID Required Unique identifier for this specific gateway transaction.
paymentIdUUID Required Identifier of the parent Payment this transaction belongs to.
typestring Required The type of operation performed with the payment gateway.
gatewayReferenceIdstring Required Unique transaction ID provided by the external payment gateway.
amountdecimal Required The amount associated with this specific transaction operation.
currencystring Required Currency of the transaction amount.
statusstring Required Status reported by the gateway for this specific operation.
responseCodestring Optional Response code returned by the payment gateway.
responseMessagestring Optional Detailed message or reason returned by the gateway.
processedAtDateTime Required Timestamp when the transaction was processed by the gateway.
rawRequesttext Optional Raw request payload sent to the gateway (use with caution).
rawResponsetext Optional Raw response payload received from the gateway (use with caution).

Relationships

  • Payment: A transaction is part of one Payment.

Examples

  • Authorization Success: Type: Authorize, PaymentID: PAY-98765, GatewayRef: auth_abc, Amount: $19.99, Status: Success.
  • Capture Success: Type: Capture, PaymentID: PAY-98765, GatewayRef: ch_def, Amount: $19.99, Status: Success (following the authorization).
  • Authorization Failure: Type: Authorize, PaymentID: PAY-98766, GatewayRef: auth_ghi, Amount: $50.00, Status: Failure, ResponseCode: ‘declined’, ResponseMessage: ‘Insufficient Funds’.
  • Refund Success: Type: Refund, PaymentID: PAY-98760, GatewayRef: re_jkl, Amount: $25.00, Status: Success.