Transactions
Overview
The Transactions API allows you to retrieve and analyze the financial movements affecting your accounts. Transactions represent the individual ledger entries that occur when money moves into, out of, or between accounts. Unlike Transfers, Deposits, or Conversions (which represent higher-level operations), Transactions give you visibility into the specific ledger movements these operations cause.
Key features of the Transactions API:
- View detailed transaction history for all accounts
- Filter transactions by multiple criteria
- Get transaction-level balance change information
- Link transactions to their originating operations (transfers, deposits, conversions)
- Support for both credit (money in) and debit (money out) transaction types
The Transaction Object
Property | Type | Required | Description |
---|---|---|---|
id | string (UUID) | ✅ | Unique identifier of the transaction. |
account_id | string (UUID) | ✅ | Unique identifier of the account associated with the transaction. |
state | enum | ✅ | Current state of the transaction (PENDING, COMPLETED). |
created_date | string (datetime) | ✅ | Date and time when the transaction was created. |
completion_date | string (datetime) | ✅ | Date and time when the transaction was completed. |
amount | object | ✅ | Amount of the transaction. |
amount.value | number | ✅ | Transaction amount in minor units (kobo, cents, etc). |
amount.currency | string | ✅ | Currency code of the transaction (ISO 4217). |
type | enum | ✅ | Indicates if the transaction is a credit or debit ("credit", "debit"). |
related_entity | object | ✅ | Details of the entity that triggered this transaction. |
related_entity.type | enum | ✅ | Type of the related entity ("deposit", "transfer", "conversion"). |
related_entity.id | string (UUID) | ✅ | Unique identifier of the related entity. |
balance_before | object | ❌ | Balance before the transaction. Available for COMPLETED transactions |
balance_before.value | number | ✅ | Balance before in minor units (kobo, cents, etc). |
balance_before.currency | string | ✅ | Currency code of the balance. Available for COMPLETED transactions |
balance_after | object | ❌ | Balance after the transaction. |
balance_after.value | number | ✅ | Balance after in minor units (kobo, cents, etc). |
balance_after.currency | string | ✅ | Currency code of the balance. |
action | enum | ✅ | What kind of action the transaction represents (e.g., "inbound_funds", "outbound_funds", "conversion_in", "conversion_out", "transfer_fee", etc.). |
related_transaction_id | string (UUID) | ❌ | ID of a related transaction, e.g., for refunds or corrections. |
Understanding Transactions
Key Concepts: Transaction Completion vs. Entity Settlement
When working with our banking API, it's essential to understand the distinction between transaction completion and entity settlement:
Transaction Completion
A transaction object in a "COMPLETED" state indicates that the ledger entry has been finalized and the account balance has been affected. This means:
- The funds have been debited from or credited to the available balance
- The transaction has been recorded in the ledger
- The balance change is reflected in the account
Entity Settlement
The settlement status of the related entity (transfer, deposit, conversion) is separate from the transaction's completion status:
- A completed transaction shows the balance has been affected
- This does not necessarily mean the related operation (transfer, deposit, conversion) has been fully settled
- The related entity might still be in process with external systems or banking partners
Important Clarification
For Accounts:
When you see a "COMPLETED" transaction in your transaction history, this means:
- ✅ Your balance has been updated
- ✅ The transaction has been recorded in your account
- ❌ This does NOT guarantee funds have reached their final destination (for outbound transfers)
- ❌ This does NOT guarantee that conversions have settled on the quote side
For Developers:
When implementing with our API:
- Use transaction data to show accurate balance changes if needed
- To determine if a transfer has been fully settled, check the state of the transfer entity itself via the Transfers API
- To determine if a conversion has been fully settled, check the state of the conversion entity via the Conversions API
- To track the complete lifecycle, use both transaction data and the related entity's data
Example Scenarios
Transfer to an External Bank
- You initiate a transfer to an external bank account
- A "COMPLETED" transaction immediately shows in your account
- Your available balance is reduced
- The actual settlement to the recipient bank would typically take some time
- During this time, the transfer entity would typically show "PROCESSING" state
- Once settled with the recipient bank, the transfer entity would show "COMPLETED" state
Currency Conversion Process (USD to EUR):
- You initiate a currency conversion from USD to EUR
- The process unfolds in these distinct stages:
Initial Stage (Immediate)
- USD transaction shows as "COMPLETED" with action "conversion_out"
- USD available balance is reduced immediately
- EUR transaction appears as "PENDING" with action "conversion_in"
- EUR balance is not yet increased
- Conversion entity shows state "PROCESSING"
Completion Stage (After Processing)
- USD transaction remains "COMPLETED" (no change)
- EUR transaction updates to "COMPLETED"
- EUR available balance is increased with the converted amount
- Conversion entity updates to "COMPLETED" state
Transaction States During Conversion
Currency | Initial Stage | Completion Stage |
---|---|---|
Source (USD) | COMPLETED | COMPLETED (no change) |
Destination (EUR) | PENDING | COMPLETED |
Balance Effects
Balance | Initial Stage | Completion Stage |
---|---|---|
USD Available | Decreased immediately | No change |
EUR Available | No change yet | Increased |
Entity States
Entity | Initial Stage | Completion Stage |
---|---|---|
Conversion | PROCESSING | COMPLETED |
Checking Settlement Status
To determine if a related entity is fully settled:
- Get the
related_entity.id
from the transaction - Use this ID to query the appropriate endpoint based on the
related_entity.type
:/v2/transfers/{id}
for transfers/v2/deposits/{id}
for deposits/v2/conversions/{id}
for conversions
- Check the
state
field of the returned entity to determine its settlement status
Field Reference for Transaction vs. Settlement Status
Entity Type | Transaction State Field | Status Field | Where to Find Settlement Status |
---|---|---|---|
Transaction | state | N/A | Transaction object only shows balance impact |
Transfer | N/A | state | /v2/transfers/{id} |
Deposit | N/A | state | /v2/deposits/{id} |
Conversion | N/A | state | /v2/conversions/{id} |
Remember: Transaction completion (impact on balance) and entity settlement (completion of the full operation) are distinct concepts in our banking system.
Endpoints
List Transactions
Retrieve a paginated list of transactions for your institution.
GET /v2/transactions
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
account_id | string (UUID) | ❌ | Filter transactions by account ID. |
currency | string | ❌ | Filter transactions by currency. |
type | enum | ❌ | Filter by transaction type ("credit" or "debit"). |
related_entity_type | enum | ❌ | Filter by related entity type ("deposit", "transfer", "conversion"). |
related_entity_id | string (UUID) | ❌ | Filter by related entity ID. |
date_from | string (datetime) | ❌ | Filter transactions completed on or after this date. |
date_to | string (datetime) | ❌ | Filter transactions completed on or before this date. |
sort_by | enum | ❌ | Sort key for the transactions ("amount", "created_date", "completion_date"). Default: "created_date". |
sort_order | enum | ❌ | Sort order ("asc" or "desc"). Default: "desc". |
action | enum | ❌ | Filter by transaction action. |
page | number | ❌ | Page number for pagination. Default: 1. |
limit | number | ❌ | Number of items per page. Default: 20. |
Example Request
curl -X GET "https://api.sandbox.waza.co/lync/banking/v2/transactions?account_id=abcdef12-3456-7890-abcd-ef1234567890&type=credit" \
-H "x-waza-api-key: your_api_key_here"
Example Response
{
"data": {
"items": [
{
"id": "abcdef12-3456-7890-abcd-ef1234567890",
"account_id": "fedcba98-7654-3210-fedc-ba9876543210",
"state": "COMPLETED",
"created_date": "2023-05-14T10:30:45Z",
"completion_date": "2023-05-14T10:35:22Z",
"amount": {
"value": 100000,
"currency": "USD"
},
"type": "credit",
"related_entity": {
"type": "deposit",
"id": "12345678-1234-1234-1234-123456789012"
},
"balance_before": {
"value": 500000,
"currency": "USD"
},
"balance_after": {
"value": 600000,
"currency": "USD"
},
"action": "inbound_funds"
}
],
"page": 1,
"limit": 20,
"totalItems": 1
}
}
Get Transaction by ID
Retrieve details for a specific transaction.
GET /v2/transactions/{id}
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string (UUID) | ✅ | Unique identifier of the transaction. |
Example Request
curl -X GET "https://api.sandbox.waza.co/lync/banking/v2/transactions/abcdef12-3456-7890-abcd-ef1234567890" \
-H "x-waza-api-key: your_api_key_here"
Example Response
{
"data": {
"id": "abcdef12-3456-7890-abcd-ef1234567890",
"account_id": "fedcba98-7654-3210-fedc-ba9876543210",
"state": "COMPLETED",
"created_date": "2023-05-14T10:30:45Z",
"completion_date": "2023-05-14T10:35:22Z",
"amount": {
"value": 100000,
"currency": "USD"
},
"type": "credit",
"related_entity": {
"type": "deposit",
"id": "12345678-1234-1234-1234-123456789012"
},
"balance_before": {
"value": 500000,
"currency": "USD"
},
"balance_after": {
"value": 600000,
"currency": "USD"
},
"action": "inbound_funds"
}
}
Transaction Actions
The Transaction API uses the action
field to indicate the specific type of financial activity:
Action | Description |
---|---|
inbound_funds | Funds received into an account (deposits). |
outbound_funds | Funds sent out from an account (outgoing transfers). |
conversion_in | Funds received as result of a currency conversion. |
conversion_out | Funds sent out as part of a currency conversion. |
transfer_fee | Fee charged for a transfer. |
transfer_failure_refund | Refund when a transfer fails. |
transfer_cancellation | Cancellation of a transfer. |
transfer_failure | Failed transfer. |
Related Entities
Transactions are connected to higher-level operations through the related_entity
field. This allows you to:
- Find all transactions related to a specific transfer, deposit, or conversion
- Understand how higher-level operations affect individual account balances
- Track the complete lifecycle of funds as they move through your accounts
Updated 2 months ago