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
Name | Type | Required | Description |
---|---|---|---|
transactionId | UUID | Required | Unique identifier for this specific gateway transaction. |
paymentId | UUID | Required | Identifier of the parent Payment this transaction belongs to. |
type | string | Required | The type of operation performed with the payment gateway. |
gatewayReferenceId | string | Required | Unique transaction ID provided by the external payment gateway. |
amount | decimal | Required | The amount associated with this specific transaction operation. |
currency | string | Required | Currency of the transaction amount. |
status | string | Required | Status reported by the gateway for this specific operation. |
responseCode | string | Optional | Response code returned by the payment gateway. |
responseMessage | string | Optional | Detailed message or reason returned by the gateway. |
processedAt | DateTime | Required | Timestamp when the transaction was processed by the gateway. |
rawRequest | text | Optional | Raw request payload sent to the gateway (use with caution). |
rawResponse | text | 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.