Skip to main content

Fetch Payout Balance

Api Endpoint:

This API for fetching Payout Balance will be a GET request.

{BaseUrl}/payouts/getbalance

Description

The Fetch Payout Balance API allows a user to check the available balance in their payout account. This is useful for verifying the remaining balance before initiating transactions.

Request

Request Header

The request must include the following headers for authentication:

Request Header
{
"apiKey": "your api key",
"token": "your token"
}
  • apiKey: Your unique API key provided by PayHub.
  • token: A token that validates your session or request.

Request Body

This API does not require a request body.

Possible Responses:

Success Response

A response indicating the available payout balance.

Success Response
{
"responseCode": 200,
"responseMessage": "Success",
"responseData": {
"balance": 39335.15
}
}
  • responseCode: 200 - Indicates a successful request.
  • responseMessage: Success - A message indicating the request was successful.
  • responseData: Contains the balance details.
    • balance: 39335.15 - The available balance in the payout account.

Error Responses

Invalid API Key

A response indicating that the provided API key is invalid.

Invalid API Key
{
"responseCode": 403,
"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

A response indicating that the specified user does not exist.

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

A response indicating that some of the details provided in the request are invalid.

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 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 Fetch Payout Balance API effectively in your payment gateway system.