Skip to main content
The Transaction Data Model represents all monetary movements in the payment system. This unified model consolidates what were previously separate Payment, Refund, and Credit Note models. Transactions are distinguished by their type field.
  • Unified financial movements: All payments, refunds, credit notes, fees, chargebacks, and payouts in a single model
  • Type-based filtering: Query by transaction type to get specific financial movements
  • Complete audit trail: Full relationship tracking to invoices, orders, subscriptions, and original transactions
  • Gateway integration: Detailed payment gateway information and transaction IDs

Attributes

Transactions Attributes

PropertyTypeDescription
rootfi_idintegerUnique identifier for this transaction
rootfi_created_atstringWhen this transaction was created in Commenda’s system (ISO 8601)
rootfi_updated_atstringWhen this transaction was last updated (ISO 8601)
rootfi_integration_typeenum
platform_idstringPlatform-specific transaction identifier
typeenumType of transaction (PAYMENT, REFUND, CREDIT_NOTE, etc.)
invoice_idstringReference to the associated Invoice
order_idstringReference to the associated Order (if applicable)
subscription_idstringReference to the associated Subscription (for recurring payments)
contact_idstringReference to the Contact
currency_idenumISO 4217 currency code
amountdoubleTransaction amount (always positive; type indicates direction)
statusenumCurrent status of the transaction
payment_method_typeenumPayment method used (for payments)
gatewaystringPayment gateway/processor name (e.g., “stripe”, “razorpay”)
gateway_transaction_idstringPlatform-specific transaction ID from the gateway
original_transaction_idstringFor refunds/reversals, reference to the original payment
reference_numberstringHuman-readable reference number
descriptionstringHuman-readable description of the transaction
reasonenumStandardized reason code (primarily for refunds/credit notes)
reason_codestringPlatform-specific reason code
metadataobjectAdditional platform-specific data
created_atstringOriginal transaction timestamp from platform (ISO 8601)
updated_atstringLast update timestamp from platform (ISO 8601)

Type Enum Values

ValueDescription
PAYMENTContact payment received
REFUNDMoney returned to contact
CREDIT_NOTECredit applied to contact account
FEEProcessing fee or platform charge
CHARGEBACKPayment disputed and reversed by contact’s bank
PAYOUTTransfer to merchant/vendor account
ADJUSTMENTManual adjustment to balance

Status Enum Values

ValueDescription
REQUIRES_ACTIONTransaction requires additional action before it can be completed
PENDINGTransaction is being processed
AUTHORIZEDTransaction has been authorized but not yet captured
PAIDTransaction payment was successfully captured
FAILEDTransaction failed to process
CANCELEDTransaction was canceled before completion
REFUNDEDTransaction funds were returned or credited back
UNKNOWNStatus cannot be determined
REVERSEDTransaction was reversed after completion

Payment Method Type Enum Values

ValueDescription
CARDCredit or debit card payment
BANK_TRANSFERDirect bank transfer or ACH
WIRE_TRANSFERWire transfer
PAYPALPayPal payment
APPLE_PAYApple Pay
GOOGLE_PAYGoogle Pay
CHECKCheck payment
CASHCash payment
CRYPTOCryptocurrency payment
OTHEROther payment method
UNKNOWNPayment method cannot be determined

Reason Enum Values

ValueDescription
CUSTOMER_REQUESTContact requested the refund/credit
DUPLICATEDuplicate charge
FRAUDFraudulent transaction
QUALITY_ISSUEProduct or service quality issue
BILLING_ERRORBilling mistake
LOYALTY_DISCOUNTLoyalty program credit
PROMOTIONALPromotional credit or discount
ADJUSTMENTManual adjustment
OTHEROther reason