Overview
This node interacts with the SePay API to perform operations on financial transactions. Specifically, for the Transaction resource and the Count operation, it counts the number of transactions that match specified filter criteria.
Common scenarios where this node is useful include:
- Quickly determining how many transactions meet certain conditions without retrieving full transaction details.
- Generating reports or dashboards that display transaction counts filtered by date ranges, account numbers, or other attributes.
- Monitoring transaction volumes over time or for specific accounts.
For example, a user might count all transactions for a particular bank account within a given date range to assess activity levels or detect anomalies.
Properties
| Name | Meaning |
|---|---|
| Filters | A collection of optional filters to narrow down which transactions are counted. Available filters: - Account Number: Filter by bank account number. - Transaction Date Min: Show transactions created after this date (inclusive). Format: YYYY-MM-DD HH:MM:SS. - Transaction Date Max: Show transactions created before this date (inclusive). Format: YYYY-MM-DD HH:MM:SS. - Since ID: Show transactions from this ID onwards (inclusive). |
Note: The properties "Reference Number", "Amount In", and "Amount Out" exist but are only applicable to other operations like "Get All" and not to "Count".
Output
The output is a JSON array containing one or more objects with the following structure:
{
"count": <number>
}
count: The total number of transactions matching the provided filters.
No binary data is output by this node.
Dependencies
- Requires an active connection to the SePay API.
- Needs an API authentication token credential configured in n8n to authorize requests.
- Uses HTTP GET requests to the SePay API endpoints for counting transactions.
Troubleshooting
- API Errors: If the SePay API returns an error, the node throws an error message prefixed with "SePay API Error:" followed by the API's error message. Common causes include invalid or expired API tokens, malformed filter parameters, or network issues.
- Empty Results: If no transactions match the filters, the count will be zero. Verify filter values if unexpected.
- Credential Issues: Ensure the API token credential is correctly set up and has sufficient permissions.
- Date Format: Filters involving dates must use the format
YYYY-MM-DD HH:MM:SS. Incorrect formats may cause API errors.
Links and References
- SePay API Documentation (assumed base URL from code)
- n8n documentation on Creating Custom Nodes