Etransfer Requests
Api Endpoint:
This API for Etransfer Requests will be a POST request.
{BaseUrl}/api/v1/canada/collection/etransfer-requests
Description
The Etransfer Requests API allows a user to initiate an e-transfer payment request. This is typically used in payment gateway integrations where a customer is asked to pay a specified amount using a payment link. Upon successful initiation, an e-transfer request is generated for the customer to complete the transaction.
Request:
Request Header
The request must include the following headers for authentication:
{
"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 Body
The body of the request should include the following parameters: Note: All fields are mandatory.
{
"customerName": "Customer Name",
"email": "[email protected]",
"phoneCountryCode": "1",
"phoneNumber": "phone number",
"priorityTypeCode": "0",
"notificationType": "0",
"transactionTypeCode": "D",
"amount": 100,
"dateOfFunds": "2025-11-08",
"securityQuestion": "What is your pet name?",
"securityQuestionAnswer": "fluffy",
"description": "Payment to GSX",
"clientReferenceNumber": "T-1000002"
}
- customerName: The name of the customer.
- email: The email address of the customer.
- phoneCountryCode: The country code of the customer's phone number.
- phoneNumber: The phone number of the customer.
- priorityTypeCode: The priority type code for the e-transfer.
- notificationType: The notification type for the e-transfer.
- transactionTypeCode: The transaction type code for the e-transfer.
- amount: The amount to be paid by the customer.
- dateOfFunds: The date when the funds will be available.
- securityQuestion: The security question for the e-transfer.
- securityQuestionAnswer: The answer to the security question.
- description: A description of the payment.
- clientReferenceNumber: A unique reference number for the transaction.
Success Response
A successful response indicates that the e-transfer request has been created. The response will include the details of the e-transfer request.
{
"responseCode": 200,
"responseMessage": "E-transfer request created successfully",
"responseData": {
"success": true,
"message": "Success",
"referenceNumber": "CA1MRSrvZwAB",
"transactionId": 449242735,
"orderId": 432855341,
"payUrl": "https://etransfer.example.com/pay/CA1MRSrvZwAB",
"code": 0
}
}
- responseCode: 200 - Indicates that the e-transfer request was created successfully.
- responseMessage: E-transfer request created successfully - A message indicating the successful creation of the e-transfer request.
- responseData - Contains the details of the e-transfer request, including:
- success: A boolean indicating the success of the operation.
- message: A message indicating the status of the request.
- referenceNumber: The reference number for the e-transfer request.
- transactionId: The unique identifier for the transaction.
- orderId: The order ID associated with the transaction.
- payUrl: The URL where the customer can complete the e-transfer payment.
Error Responses
If there is an issue with the request, one of the following error responses will be returned:
Failed to create e-transfer request
{
"responseCode": 500,
"responseMessage": "Failed to create e-transfer request",
"responseData": {
"code": 1,
"message": "Please Try Again With Different Client Reference Number!"
}
}
- responseCode: 502 - Indicates a failure in creating the e-transfer request.
- responseMessage: Failed to create e-transfer request - A message indicating the failure to create the e-transfer request.
- responseData - Contains details about the failure, including:
- code: An error code indicating the type of failure.
- message: A message providing more information about the failure.
Invalid API Key
{
"responseCode": 401,
"responseMessage": "Invalid apiKey"
}
- responseCode: 401 - Indicates forbidden access due to an invalid API key.
- responseMessage: Invalid apiKey - A message indicating the provided API key is invalid.
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.
Invalid Details
{
"responseCode": 400,
"responseMessage": "Invalid details"
}
- responseCode: 400 - Indicates a bad request due to invalid details.
- responseMessage: Invalid details - A message indicating that some of the details provided in the request are invalid.
Notes
- Ensure that all required parameters are provided and valid.
- 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 Etransfer Requests API effectively in your payment gateway system.