Developer Integration Guide

Cheapkart B2B Partner API

Connect financial products directly to your website, application or platform. Fetch allocated products, submit customer leads and track lead status through a simple API integration.

Base Endpoint

cheapkart.in/api/v1/

Partner Portal

api.cheapkartpartner.in

Authentication

API Key + HMAC-SHA256

Authentication

System Overview & Credentials

Every partner account receives credentials required to securely access the Cheapkart B2B API.

API Access Credentials

Keep your secret credentials secure.

Portal URL

https://api.cheapkartpartner.in/

Base API Endpoint

https://cheapkart.in/api/v1/

Client ID

Identifies your B2B partner account — CK_CLIENT_98A99AEE

API Key

Passed through the X-API-KEY header.

Secret Key

Used to generate HMAC-SHA256 signatures for POST requests.

01

Product API

Fetch Allocated Products

Retrieve the financial products allocated to your partner account and optionally filter them by category or product ID.

GET /api/v1/products.php

Headers

X-API-KEY: YOUR_API_KEY

Query Parameters

Parameter Type Description
category optional credit_card, personal_loan, business_loan, instant_loan, savings, demat, insurance
productId / id optional Fetch a single product, e.g. productId=88

PHP · cURL Example

$apiKey = "YOUR_API_KEY";
// Category-wise filtering example
$url = "https://cheapkart.in/api/v1/products.php?category=credit_card";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-KEY: " . $apiKey]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data["products"]);
02

Lead API

Submit Lead & Get Bank Link

Register an applicant against an allocated product. The API returns a lead reference and bank redirection URL.

POST /api/v1/submit_lead.php

Required Headers

Content-Type: application/json
X-API-KEY: YOUR_API_KEY
X-SIGNATURE: HMAC_SHA256_HASH_OF_JSON_BODY

JSON Body Schema

Field Type Description
fullName string, required Customer full name.
phone string, required 10-digit mobile number.
email string, required Customer email address.
panCard string, required 10-character PAN number.
pincode string, required 6-digit area pincode.
productId integer, required Product ID received from Step 1.

PHP · HMAC-SHA256

$apiKey    = "YOUR_API_KEY";
$secretKey = "YOUR_SECRET_KEY";
$url       = "https://cheapkart.in/api/v1/submit_lead.php";

$payload = [
    "fullName"  => "Amit Kumar",
    "phone"     => "9876543210",
    "email"     => "amit@example.com",
    "panCard"   => "ABCDE1234F",
    "pincode"   => "110001",
    "productId" => 88
];

$rawBody   = json_encode($payload);
$signature = hash_hmac("sha256", $rawBody, $secretKey);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $rawBody);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "X-API-KEY: " . $apiKey,
    "X-SIGNATURE: " . $signature
]);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);

echo "Lead ID: " . $result["leadId"];
echo "Bank Apply Link: " . $result["redirectUrl"];
03

Tracking API

Track Real-Time Lead Status

Fetch the latest status and bank remarks for leads submitted using your API credentials.

GET /api/v1/leads.php

Headers

X-API-KEY: YOUR_API_KEY

Response Fields

id, customerName, phone, email

Lead reference and applicant details.

productName

Product title applied for.

status

pending, approved or rejected.

remark, remarkDescription

Bank remark and additional guidance.

createdAt

Timestamp of lead submission.

Python Example

import requests

url = "https://cheapkart.in/api/v1/leads.php"

headers = {
    "X-API-KEY": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
data = response.json()

for lead in data.get("leads", []):
    print(
        f"Lead #{lead['id']} | {lead['customerName']} | {lead['productName']}"
    )

    print(
        f"Status: {lead['status']} | Remark: {lead['remark']}"
    )

Integration Guide

Developer Best Practices

Protect Your Secret Key

Store your Secret Key only on your backend. Never expose it inside frontend JavaScript or mobile applications.

Handle Redirects Properly

Open the returned redirectUrl using your preferred browser or WebView flow.

Test Before Going Live

Test your API integration and validate responses before connecting it to your production platform.

Need help integrating?

Reach the partner support team for API credentials, sandbox access or integration assistance.

Contact Support