- Unified monetary tracking: All payments, refunds, chargebacks, and adjustments in one model.
- Type-based filtering: Easily filter transactions by type (payment, refund, chargeback, etc.).
- Complete payment details: Gateway information, payment methods, and transaction IDs included.
- Refund linking: Refunds are linked to their original payment transactions for complete audit trails.
Key V4 Changes
In V4, the separatePayments and Refunds endpoints have been consolidated:
| V3 Endpoint | V4 Endpoint |
|---|---|
GET /v3/ecommerce/payments | GET /v4/ecommerce/transactions?type=payment |
GET /v3/ecommerce/refunds | GET /v4/ecommerce/transactions?type=refund |
Attributes
| Field | Type | Description | Required | Expandable |
|---|---|---|---|---|
rootfi_id | integer | Unique identifier for this transaction | Yes | No |
rootfi_created_at | datetime | When this transaction was created in Commenda’s system | Yes | No |
rootfi_updated_at | datetime | When this transaction was last updated | Yes | No |
rootfi_company_id | integer | Company identifier this transaction belongs to | Yes | No |
platform_id | string | Platform-specific transaction identifier | Yes | No |
type | enum | Type of transaction (payment, refund, etc.) | Yes | No |
order_id | string | Reference to the associated Order | Yes | Yes |
contact_id | string | Reference to the Contact | No | Yes |
currency_id | string | ISO 4217 currency code | Yes | No |
amount | decimal | Transaction amount (always positive, use type to determine direction) | Yes | No |
status | enum | Current status of the transaction | Yes | No |
payment_method_type | enum | Payment method used for this transaction | No | No |
gateway | string | Payment processor or gateway name (e.g., “shopify”, “stripe”) | No | No |
gateway_transaction_id | string | Transaction ID from the payment gateway | No | No |
original_transaction_id | string | For refunds, reference to the original payment transaction | No | Yes |
description | string | Human-readable description of the transaction | No | No |
reason | enum | Reason for the transaction (primarily used for refunds) | No | No |
created_at | datetime | Original transaction timestamp from platform | Yes | No |
updated_at | datetime | Last update timestamp from platform | Yes | No |
Type Enum Values
| Value | Description |
|---|---|
payment | Contact payment received |
refund | Money returned to contact |
chargeback | Payment disputed and reversed by contact’s bank |
adjustment | Manual adjustment to order total |
fee | Processing or platform fee |
Status Enum Values
| Value | Description |
|---|---|
pending | Transaction is being processed |
completed | Transaction has been successfully completed |
failed | Transaction failed to process |
cancelled | Transaction was cancelled |
reversed | Transaction was reversed (similar to refund) |
unknown | Status cannot be determined |
Payment Method Type Enum Values
| Value | Description |
|---|---|
card | Credit or debit card |
bank_transfer | Direct bank transfer |
paypal | PayPal payment |
apple_pay | Apple Pay |
google_pay | Google Pay |
cash | Cash payment |
check | Check payment |
other | Other payment method |
unknown | Payment method cannot be determined |
Reason Enum Values (for refunds)
| Value | Description |
|---|---|
customer_request | Contact requested a refund |
fraud | Transaction was fraudulent |
duplicate | Duplicate charge |
quality_issue | Product quality or defect issue |
not_received | Contact never received the product |
cancelled_order | Order was cancelled |
other | Other reason |
Expandable Attributes
expand=order- Includes full Order objectexpand=contact- Includes full Contact objectexpand=original_transaction- For refunds, includes the original payment transaction
Filtering Transactions
Refund Transaction Example
Refund Transaction Response
Chargeback Transaction Example
Chargeback Transaction Response