Transaction (v1.0.0)

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

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

NameTypeRequiredDescription
transactionIdUUIDRequiredUnique identifier for this specific gateway transaction.
paymentIdUUIDRequiredIdentifier of the parent Payment this transaction belongs to.
typestringRequiredThe type of operation performed with the payment gateway.
gatewayReferenceIdstringRequiredUnique transaction ID provided by the external payment gateway.
amountdecimalRequiredThe amount associated with this specific transaction operation.
currencystringRequiredCurrency of the transaction amount.
statusstringRequiredStatus reported by the gateway for this specific operation.
responseCodestringOptionalResponse code returned by the payment gateway.
responseMessagestringOptionalDetailed message or reason returned by the gateway.
processedAtDateTimeRequiredTimestamp when the transaction was processed by the gateway.
rawRequesttextOptionalRaw request payload sent to the gateway (use with caution).
rawResponsetextOptionalRaw 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.