Skip to main content

Manual payment

Base URL https://api.leadx.in/api/key/protected. Every request needs an apikey header — see Authentication.

1 endpoint.

POST /manual-payment​

Create order.

Auth apikey · Success 200

:::note Used by the web app pages/Billing.jsx, pages/SeatManagement.jsx :::

Request body

FieldRequiredDefault
manualPaymentIDyes—
subscriptionIDyes—
seatsPaymentHistoryID—
proofyes—

Response — data is one ManualPayment object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

cURL
curl -X POST 'https://api.leadx.in/api/key/protected/manual-payment' \
-H 'apikey: $LEADX_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"manualPaymentID": "",
"subscriptionID": "",
"seatsPaymentHistoryID": "",
"proof": ""
}'
fetch
// Node 18+ and every modern browser ship fetch.
const res = await fetch('https://api.leadx.in/api/key/protected/manual-payment', {
method: 'POST',
headers: {
apikey: process.env.LEADX_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"manualPaymentID": "",
"subscriptionID": "",
"seatsPaymentHistoryID": "",
"proof": ""
}),
});

const payload = await res.json();
if (!res.ok) {
// Errors carry { status, success, message } — not the success envelope.
throw new Error(`${res.status} ${payload.message}`);
}

console.log(payload.data);
axios
import axios from 'axios';

const leadx = axios.create({
baseURL: 'https://api.leadx.in/api/key/protected',
headers: { apikey: process.env.LEADX_API_KEY },
});

try {
const { data } = await leadx.post(
'/manual-payment',
{
"manualPaymentID": "",
"subscriptionID": "",
"seatsPaymentHistoryID": "",
"proof": ""
}
);
console.log(data.data);
} catch (err) {
// axios throws on 4xx/5xx; the envelope is on err.response.data.
throw new Error(`${err.response?.status} ${err.response?.data?.message ?? err.message}`);
}
Node (no deps)
import { request } from 'node:https';

// The dependency-free version, for somewhere fetch is not available.
const send = (payload) =>
new Promise((resolve, reject) => {
const req = request(
'https://api.leadx.in/api/key/protected/manual-payment',
{
method: 'POST',
headers: {
apikey: process.env.LEADX_API_KEY,
'Content-Type': 'application/json',
},
},
(res) => {
let raw = '';
res.on('data', (chunk) => { raw += chunk; });
res.on('end', () => {
const body = JSON.parse(raw);
if (res.statusCode >= 400) reject(new Error(`${res.statusCode} ${body.message}`));
else resolve(body);
});
},
);
req.on('error', reject);
req.write(JSON.stringify(payload));
req.end();
});

const { data } = await send({
"manualPaymentID": "",
"subscriptionID": "",
"seatsPaymentHistoryID": "",
"proof": ""
});
console.log(data);
Python
import os
import requests

res = requests.post(
"https://api.leadx.in/api/key/protected/manual-payment",
headers={"apikey": os.environ["LEADX_API_KEY"]},
json={
"manualPaymentID": "",
"subscriptionID": "",
"seatsPaymentHistoryID": "",
"proof": ""
},
timeout=30,
)

payload = res.json()
res.raise_for_status()
print(payload["data"])
PHP
<?php
$ch = curl_init('https://api.leadx.in/api/key/protected/manual-payment');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'apikey: ' . getenv('LEADX_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({
'manualPaymentID': '',
'subscriptionID': '',
'seatsPaymentHistoryID': '',
'proof': ''
}),
]);

$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

$payload = json_decode($response, true);
if ($status >= 400) {
throw new RuntimeException("$status {$payload['message']}");
}

print_r($payload['data']);

Errors ManualPaymentDetailsNotFound_400 · SubscriptionNotFound_400