Get Transaction
Api Endpoint:
This API for fetching transactions will be a GET request.
{BaseUrl}/api/v1/canada/collection/transactions?limit=200
Description
The Get Transactions API allows a user to fetch the list of transactions made through the Canada E-Transfer payment method. This is useful for tracking and reconciling payments received via e-transfer.
Request
Request Header
The request must include the following headers for authentication:
Request Header
{
"apiKey": "your api key",
"token": "your token",
"content-type": "application/json"
}
- apiKey: Your unique API key provided by PayHub.
- token: A token that validates your session or request.
- content-type: Specifies that the request body is in JSON format.
Request Query Parameters
The request can include the following optional query parameters to filter the transactions:
Request Query Parameters
{
"page" ?: "number";
"limit"?: "number";
"order"?: "asc" | "desc"; // default: "desc"
"clientReferenceNumber"?: "string";
"referenceNumber"?: "string";
"transactionId"?: "string";
"email"?: "string"; // customer.email
"status"?: "string";
"dateFrom"?: "string"; // ISO for createdAt OR "YYYY-MM-DD" if dateField=dateOfFunds
"dateTo"?: "string";
}
- page: The page number for pagination.
- limit: The number of records to fetch per page (max: 100).
- order: The order of the results, either ascending ("asc") or descending ("desc"). Default is "desc".
- clientReferenceNumber: Filter by client reference number.
- referenceNumber: Filter by reference number.
- transactionId: Filter by transaction ID.
- email: Filter by customer's email address.
- status: Filter by transaction status.
- dateFrom: Start date for filtering transactions (in ISO format or "YYYY-MM-DD" if dateField=dateOfFunds).
- dateTo: End date for filtering transactions (in ISO format or "YYYY-MM-DD" if dateField=dateOfFunds).
Possible Responses:
Success Response
A response indicating the available payin balance.
Success Response
{
"responseCode": 200,
"responseMessage": "success",
"responseData": {
"items": [
{
"_id": "690ece754a76927e96409ac7",
"uuid": "66f2a450d6a53696205dbc94",
"gateway": "pateno",
"clientReferenceNumber": "T-1000002",
"amount": 5,
"currency": "CAD",
"dateOfFunds": "2025-11-08",
"customer": {
"name": "John Doe",
"email": "[email protected]",
"phoneCountryCode": "1",
"phoneNumber": "4036880150"
},
"description": "Payment to GSX",
"securityQuestion": "What is your pet name?",
"orderId": "T-1000002",
"success": true,
"createdAt": "2025-11-08T05:00:37.976Z",
"updatedAt": "2025-11-08T05:04:12.011Z",
"__v": 0,
"payUrl": "https://etransfer.interac.ca/reqPayment/eml/CA1MRfWBSywK",
"referenceNumber": "CA1MRfWBSywK",
"status": "success",
"statusCode": "0",
"statusMessage": "Success",
"transactionId": "447387605",
"bankReferenceNumber": "100000000663531000"
},
],
"page": 1,
"limit": 200,
"total": 12,
"totalPages": 1,
"hasNext": false,
"hasPrev": false,
"sort": "createdAt",
"order": "desc",
"filter": {},
"dateFieldUsed": "createdAt"
}
}
- responseCode: 200 - Indicates a successful request.
- responseMessage: success - A message indicating the request was successful.
- responseData: Contains the list of transactions and pagination details.
- items: An array of transaction objects, each containing details such as:
- _id: The unique identifier of the transaction.
- uuid: The unique user identifier associated with the transaction.
- gateway: The payment gateway used for the transaction.
- clientReferenceNumber: The client reference number for the transaction.
- amount: The amount involved in the transaction.
- currency: The currency of the transaction.
- dateOfFunds: The date when the funds will be available.
- customer: An object containing customer details (name, email, phoneCountryCode, phoneNumber).
- description: A description of the payment.
- securityQuestion: The security question for the e-transfer.
- orderId: The order ID associated with the transaction.
- success: A boolean indicating the success of the transaction.
- createdAt: The timestamp when the transaction was created.
- updatedAt: The timestamp when the transaction was last updated.
- payUrl: The URL where the customer can complete the e-transfer payment.
- referenceNumber: The reference number for the e-transfer request.
- status: The status of the transaction.
- statusCode: A code indicating the transaction status.
- statusMessage: A message indicating the transaction status.
- transactionId: The unique identifier for the transaction.
- bankReferenceNumber: The bank reference number for the transaction.
- page: The current page number.
- limit: The number of records per page.
- total: The total number of transactions.
- totalPages: The total number of pages.
- hasNext: A boolean indicating if there is a next page.
- hasPrev: A boolean indicating if there is a previous page.
- sort: The field used for sorting the results.
- order: The order of the results (asc or desc).
- filter: The filters applied to the request.
- dateFieldUsed: The date field used for filtering (createdAt or dateOfFunds).
- items: An array of transaction objects, each containing details such as:
Error Responses
Invalid API Key
A response indicating that the provided API key is invalid.
Invalid API Key
{
"responseCode": 401,
"responseMessage": "Invalid apiKey"
}
- responseCode: 403 - Indicates forbidden access due to an invalid API key.
- responseMessage: Invalid apiKey - A message indicating the provided API key is invalid.
Invalid User
Invalid User
{
"responseCode": 400,
"responseMessage": "User does not exist"
}
- responseCode: 400 - Indicates a bad request due to a non-existent user.
- responseMessage: User does not exist - A message indicating the user specified in the request does not exist.
Notes
- Ensure that the correct API key and token are provided.
- Check the response codes to handle different outcomes appropriately in your application.
- For security, keep your API key and token confidential.
By following this documentation, you can integrate and use the Get Transaction API effectively in your payment gateway system.