Customer balance

Get customer balance

Fetch a customer available balance on your integration, you can use a GET request to the customer's balance endpoint. Below is an example using cURL:


    const myHeaders = new Headers();
    myHeaders.append("token", 
    "Kk2H9ZoREUfBONNjVYO6UKNetww
    JRx5RVlZawk3Ay0bcukGa5KnU9IUDGjNpOG1V");
    
    const requestOptions = {
      method: "GET",
      headers: myHeaders,
      redirect: "follow"
    };
    
    fetch("https://api.switch.tulupay.com/customer/balance/4c32019f-8f62-47e2-8e60-941185712f43", 
    requestOptions)
      .then((response) => response.text())
      .then((result) => console.log(result))
      .catch((error) => console.error(error));

      

Request details

  • Endpoint:`https://api.switch.tulupay.com/customer/balance/customer_id`
  • Method:`GET`
  • Headers:
  • Content-Type:`application/json`
  • Authorization:`public key`
  • Response details

    A successful response will contain a JSON array with customer balance. Here's a simplified example:

    
        {
            "statusCode": "00",
            "status": "success",
            "datetime": "2024-03-25T13:24:44.000Z",
            "data": {
                "voucher_id": "8949972490",
                "last_balance": 300,
                "balance": 800
            }
        }
        

    Contact Us for Developer Support

    Contact our dedicated developer support team for assistance, guidance, or any questions you have regarding Tuluswitch API integration. We're here to ensure your development experience is smooth and successful.

    Read Our Developer Blog for Insights

    Master the Tuluswitch API with our Developer Blog! Get expert insights, advanced tips, and industry trends beyond the documentation. Stay connected with the developer community to build exceptional payment platforms. Visit the blog now and unlock your full potential!