Fetch Payout Status
Api Endpoint:
This API for Payout Status will be a POST request.
{BaseUrl}/payouts/getPayoutStatus
Description
The Fetch Payout Status API allows a user to check the status of a previously initiated payout request. This helps in tracking the success or failure of 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 for getting transaction using transaction id:
{
"transaction_id": "67264",
}
The body of the request for getting transaction using merchant order id:
{
"orderId":"933323"
}
- transaction_id: The unique identifier for the transaction you want to check.
- orderId: The unique identifier of the transaction assigned by merchant
Possible Responses:
Success Response
A response indicating that the payout status has been successfully retrieved.
{
"responseCode": 200,
"responseMessage": "Success",
"responseData": {
"amount": 101,
"transaction_id": "65eed955e4888504d8656cc0",
"status": "success",
"utr":"15667899",
"code": "00",
"description": "transaction success"
}
}
- responseCode: 200 - Indicates a successful request.
- responseMessage: Success - A message indicating the request was successful.
- responseData: Contains details about the payout status.
- amount: 101 - The amount of the transaction.
- transaction_id: 65eed955e4888504d8656cc0 - The unique identifier for the transaction.
- status: success - The status of the transaction.
- utr:15667899 - The unique identifier from bank.
- code: 00 - A code indicating the success of the transaction.
- description: transaction success - A message describing the status of the transaction.
Error Response
A response indicating that the transaction was not found or the details provided were invalid.
{
"responseCode": 404,
"responseMessage": "Please provide valid details.",
"responseData": {
"status": "transaction not found"
}
}
- responseCode: 404 - Indicates that the transaction was not found.
- responseMessage: Please provide valid details. - A message indicating that the provided details were invalid.
- responseData: Contains details about the error.
- status: transaction not found - A message indicating that the transaction was not found.
Invalid API Key
A response indicating that the provided API key is invalid.
{
"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.
Missing Transaction ID or Order ID
A response indicating that neither a transaction ID nor an order ID was provided in the request.
{
"responseCode": 400,
"responseMessage": "Please provide valid details.",
"responseData": "Either a transaction ID or an order ID must be provided."
}
- responseCode: 400 - Indicates a bad request.
- responseMessage: Please provide valid details. - A message indicating the request contained invalid details.
- responseData: Either a transaction ID or an order ID must be provided. - A message specifying the missing or invalid parameter.
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 Fetch Payout Status API effectively in your payment gateway system.