All transactions

The API transactions allows you create and manage payments on your Tulu Switch API integration.

Retrieving all transactions

To export all the transactions list that exists on Tulu Switch API integration, you can use a POST request to the transactions endpoint. Below is an example using cURL:


let headersList = {
    "User-Agent": "Thunder Client (https://www.thunderclient.com)",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlaWQiOiI2
    NDEiLCJ1c2VySWQiOiI4MzRkNDVmZS0xZjVkLTQ1YTItYmRiZi05ZmQ3NTFkNTliMTYiL
    CJpYXQiOjE3MTAxNDEwOTIsImV4cCI6MTcxMDIyNzQ5Mn0.
    Uheu2Sf3spkA1i9e6t97oMb8spwsmjSkjLvuvGYO1GM",
    "Content-Type": "application/json"
   }
   
   let bodyContent = JSON.stringify({
     "start_date": "2024-01-05",
     "end_date": "2024-03-04",
     "Channel": "fiat",
     "currency": "ngn"
   } );
   
   let response = await fetch("https://api.switch.tulupay.com/transactions/history", { 
     method: "POST",
     body: bodyContent,
     headers: headersList
   });
   
   let data = await response.text();
   console.log(data);
   
  

Request details

  • Endpoint:`https://api.switch.tulupay.com/transactions/history`
  • Method:`POST`
  • Headers:
  • Content-Type:`application/json`
  • Authorization:`token`
  • Response details

    Upon a successful response, you'll be provided with a JSON array containing details of all transactions. Below is a simplified example for reference:

    
    
        {
            "status": "successfull",
            "statusCode": "00",
            "data": [
                {
                    "transaction_id": "9a468616-4cd7-4ce7-9fcb-5f4090442891
                    .017f2350-8457-4dc2-ae58-e5358be5c167",
                    "source_acct": "omo@gmail.com",
                    "destination_acct": "lade@gmail.com",
                    "recipient_name": "Omolola Adeniran",
                    "response_code": "00",
                    "response_message": "Success",
                    "trans_type": "transfer",
                    "transaction_desc": "school",
                    "transaction_amount": "2000",
                    "initial_balance": "199100",
                    "current_balance": "197100",
                    "created": "2024-03-04T08:21:25.000Z"
                },
                {
                    "transaction_id": "9a468616-4cd7-4ce7-9fcb-5f4090442891
                    .40d89c00-d2ed-4aff-bfd8-84b3f0061252",
                    "source_acct": "omo@gmail.com",
                    "destination_acct": "lade@gmail.com",
                    "recipient_name": "Omolola Adeniran",
                    "response_code": "00",
                    "response_message": "Success",
                    "trans_type": "transfer",
                    "transaction_desc": "school",
                    "transaction_amount": "2000",
                    "initial_balance": "200100",
                    "current_balance": "199100",
                    "created": "2024-03-04T08:21:15.000Z"
                },
                {
                    "transaction_id": "9a468616-4cd7-4ce7-9fcb-5f4090442891
                    .72488747-6575-436a-8785-ca9ff14f9d59",
                    "source_acct": "omo@gmail.com",
                    "destination_acct": "lade@gmail.com",
                    "recipient_name": "Omolola Adeniran",
                    "response_code": "00",
                    "response_message": "Success",
                    "trans_type": "transfer",
                    "transaction_desc": "school",
                    "transaction_amount": "1000",
                    "initial_balance": "0",
                    "current_balance": "200100",
                    "created": "2024-03-04T08:21:06.000Z"
                }
            ],
            "transaction_status": {
                "total_transaction": 3,
                "last_week_transaction": "5000",
                "last_month_transaction": "8000"
            }
        }

    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!