Webhook

Webhooks allow you to set up a notification system that can be used to receive updates on certain requests made to the Tulu Switch API.

Introduction

APIs typically respond swiftly to your requests. However, occasional delays can lead to error messages due to timeouts. To prevent this, the system sends an interim response. To stay informed about your request's eventual outcome, you can monitor it using a webhook URL.

Setting up webhooks

Get started by setting up webhooks in your Tulu Switch account. This section provides step-by-step instructions on configuring webhook endpoints.

Handling webhook events (React, JavaScript, and Python Example):

Handle webhook events in your application. Here's an example in React (JavaScript):


    const myHeaders = new Headers();
    myHeaders.append("token", "eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp
    XVCJ9.eyJyb2xlaWQiOiI2NDEiLCJ1c2VySWQiOiJmNDdiY2VjNy1iYjJ
    hLTRhNmUtYTBhZC04MjJjZTQxZGZkNTMiLCJpYXQiOjE3MTAzMjE5MjYsImV4cCI6MTcxM
    DQwODMyNn0.nwMn_uikIuM8BL2We9ki5LfKkjK8ibt5UwiYmKdxYyg");
    myHeaders.append("Content-Type", "application/json");
    
    const raw = JSON.stringify({
      "webhook_url": "abdulqudus.com"
    });
    
    const requestOptions = {
      method: "POST",
      headers: myHeaders,
      body: raw,
      redirect: "follow"
    };
    
    fetch("https://api.switch.tulupay.com/settings/webhook", requestOptions)
      .then((response) => response.text())
      .then((result) => console.log(result))
      .catch((error) => console.error(error));

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!