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
Transaction Attributes
| Property | Type | Description |
|---|---|---|
| rootfi_id | integer | Unique identifier for this transaction |
| rootfi_created_at | string | When this transaction was created in Commenda’s system (ISO 8601) |
| rootfi_updated_at | string | When this transaction was last updated (ISO 8601) |
| rootfi_company_id | integer | Company identifier this transaction belongs to |
| platform_id | string | Platform-specific transaction identifier |
| type | enum | Type of transaction (payment, refund, credit_note, etc.) |
| invoice_id | string | Reference to the associated Invoice |
| order_id | string | Reference to the associated Order (if applicable) |
| subscription_id | string | Reference to the associated Subscription (for recurring payments) |
| contact_id | string | Reference to the Contact |
| currency_id | string | ISO 4217 currency code |
| amount | number | Transaction amount (always positive; type indicates direction) |
| status | enum | Current status of the transaction |
| payment_method_type | enum | Payment method used (for payments) |
| gateway | string | Payment gateway/processor name (e.g., “stripe”, “razorpay”) |
| gateway_transaction_id | string | Platform-specific transaction ID from the gateway |
| original_transaction_id | string | For refunds/reversals, reference to the original payment |
| reference_number | string | Human-readable reference number |
| description | string | Human-readable description of the transaction |
| reason | enum | Standardized reason code (primarily for refunds/credit notes) |
| reason_code | string | Platform-specific reason code |
| metadata | object | Additional platform-specific data |
| created_at | string | Original transaction timestamp from platform (ISO 8601) |
| updated_at | string | Last update timestamp from platform (ISO 8601) |
Type Enum Values
| Value | Description |
|---|---|
payment | Contact payment received |
refund | Money returned to contact |
credit_note | Credit applied to contact account |
fee | Processing fee or platform charge |
chargeback | Payment disputed and reversed by contact’s bank |
payout | Transfer to merchant/vendor account |
adjustment | Manual adjustment to balance |
Status Enum Values
| Value | Description |
|---|---|
pending | Transaction is being processed |
completed | Transaction successfully completed |
failed | Transaction failed to process |
cancelled | Transaction was cancelled before completion |
reversed | Transaction was reversed after completion |
unknown | Status cannot be determined |
Payment Method Type Enum Values
| Value | Description |
|---|---|
card | Credit or debit card payment |
bank_transfer | Direct bank transfer or ACH |
wire_transfer | Wire transfer |
paypal | PayPal payment |
apple_pay | Apple Pay |
google_pay | Google Pay |
check | Check payment |
cash | Cash payment |
crypto | Cryptocurrency payment |
other | Other payment method |
unknown | Payment method cannot be determined |
Reason Enum Values (for refunds and credit notes)
| Value | Description |
|---|---|
customer_request | Contact requested the refund/credit |
duplicate | Duplicate charge |
fraud | Fraudulent transaction |
quality_issue | Product or service quality issue |
billing_error | Billing mistake |
loyalty_discount | Loyalty program credit |
promotional | Promotional credit or discount |
adjustment | Manual adjustment |
other | Other reason |
Expandable Attributes
Use theexpand query parameter to include related objects:
expand=invoice- Includes full Invoice objectexpand=order- Includes full Order objectexpand=subscription- Includes full Subscription objectexpand=contact- Includes full Contact objectexpand=original_transaction- For refunds, includes the original payment
Filtering Options
Filter transactions by type using query parameters:GET /v4/transactions?type=payment- Get all paymentsGET /v4/transactions?type=refund- Get all refundsGET /v4/transactions?type=credit_note- Get all credit notesGET /v4/transactions?invoice_id=:id- Get all transactions for an invoiceGET /v4/transactions?subscription_id=:id- Get all transactions for a subscriptionGET /v4/transactions?status=completed- Filter by statusGET /v4/transactions?gateway=stripe- Filter by payment gateway