Card

The Card API allows you to add and manage cards payments on your Tulu Switch API integration.

Retrieving all cards

This endpoint allows you to create a new payment card on Tulu Switch API integration, you can use a POST request to the add-card endpoint. Below is an example using cURL:


const myHeaders = new Headers();
myHeaders.append("token", "TlAWiePV51isvfuRZEHuCOW1ZDBeDHep2rnosIXHRVGvMwyFTMJZUVCeIneQJJ0h");
myHeaders.append("Content-Type", "application/json");

const raw = JSON.stringify({
  "userId": "49438567-bc45-494c-b57d-80b41f193de7",
  "currency": "kes",
  "card_type": "nfc",
  "expiryDate_m": 12,
  "expiryDate_y": 2026
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://api.switch.tulupay.com/payment/card/create", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
   
  

Request details

  • Endpoint:` https://api.switch.tulupay.com/payment/card/create`
  • Method:`POST`
  • Headers:
  • Content-Type:`application/json`
  • Authorization:`public_key`
  • 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:

    
    {
        "statusCode": "00",
        "status": "successful",
        "message": "currencies Added successful! ",
        "data": {
            "cardId": "93031064059ddee830-f896-466e-8ef7-f9a4158a5311",
            "userId": "49438567-bc432c-b57d-80b41f193de7",
            "bus_id": null,
            "card_type": "nfc",
            "cvv": 808,
            "experiy_m": 12,
            "experiy_y": 2026,
            "currency": "usd",
            "status": 1,
            "reg_date": "2024-08-01T10:16:28.000Z",
            "cardNumber": "7432388530664620",
            "marchant": "1fcc827c-40755e-b806-7e8dfb4394a3"
        }
    }
     
        

    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!