Key Characteristics
Every transaction:- Is linked to a specific payment via its
payment_id
- Contains one debit and one credit entry in
transaction_lines
- Records lifecycle timestamps for initiation, processing, and settlement
- Includes optional approval or response codes
- Reflects real-time status updates and error handling through defined enums
Transaction Fields
Field | Type | Description |
---|---|---|
token | string | Unique identifier for the transaction |
transaction_id | string | External-facing reference for the transaction |
payment_id | string | ID of the related payment |
status | enum | Lifecycle status of the transaction |
transaction_lines | array | List of credit/debit entries (see below) |
response_code | string | Optional processor response code |
approval_code | string | Optional authorization code |
initiated_on | integer | Timestamp when the transaction began |
processed_on | integer | Timestamp when the transaction was processed |
settled_on | integer | Timestamp when the transaction was settled |
expires_on | integer | Timestamp when the transaction expires |
created_on | integer | Timestamp when the transaction was created |
updated_on | integer | Timestamp of last update |
Transaction Lines
Each transaction line captures a single leg of the ledger entry—either a debit or a credit. Lines include:Field | Type | Description |
---|---|---|
token | string | Unique identifier for this transaction line |
transaction_id | string | Parent transaction |
partner_id | string | ID of the partner associated with this line |
direction | enum | Direction of funds (see below) |
transaction_type | enum | Type of transaction (e.g., payment, refund) |
amount | object | Object with currency and total (amount in minor units) |
Status Types
Enum | Value | Description |
---|---|---|
TS_INITIATED | 1 | Transaction started |
TS_PROCESSING | 2 | Transaction is being processed |
TS_COMPLETED | 3 | Successfully completed |
TS_FAILED | 4 | Failed to complete |
TS_REVERSED | 5 | Manually or programmatically reversed |
TS_EXPIRED | 6 | Timed out |
TS_RECOVERED | 7 | Recovered from a failure |
Direction Types
Enum | Value | Description |
---|---|---|
TD_Credit | 1 | Funds received |
TD_Debit | 2 | Funds sent |
Transaction Types
Enum | Value | Description |
---|---|---|
TT_PAYMENT | 1 | Normal payment transaction |
TT_REFUND | 2 | Refund transaction |
TT_REVERSAL | 3 | Payment reversal |
TT_FEE | 4 | Service or platform fee |