Production hosts
API base URL: https://nineteenapis.online — use this for all /api/, /pay/, and /webhooks/ calls.
Documentation only: https://public.nineteenapis.online — this host serves these HTML pages and Swagger; it does not proxy API traffic.
API V1 — legacy integration
Use this section if your credentials and integration use paths without /api/v2/.
V1 authentication
Send these headers on every V1 call:
X-API-KEY— your integration key (per pipe)X-API-SALT— your integration secret
-H "X-API-KEY: YOUR_KEY" -H "X-API-SALT: YOUR_SALT"
API V1 — Native V1
Paths: /api/payments/nineteenpay-native/.... This is only Native V1 — not Native V2 and not the V2 /api/v2/payments/collect route. Gateway fields go inside a payload object. Amounts are typically in paise as strings unless your onboarding docs say otherwise.
/api/payments/nineteenpay-native/collect
Collect / intent / DQR
Required: payload with PAY_ID, ORDER_ID, AMOUNT (paise string), CURRENCY_CODE, TXNTYPE, MOP_TYPE, PAYMENT_TYPE, CUST_EMAIL, CUST_PHONE. Optional UPI_INTENT, PAYER_ADDRESS, etc.
curl -sS -X POST 'https://nineteenapis.online/api/payments/nineteenpay-native/collect' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"10000","CURRENCY_CODE":"356","TXNTYPE":"SALE","MOP_TYPE":"UPI","PAYMENT_TYPE":"UPI","CUST_EMAIL":"a@b.com","CUST_PHONE":"9999999999","UPI_INTENT":1},"environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/nineteenpay-native/collect';
const body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"10000","CURRENCY_CODE":"356","TXNTYPE":"SALE","MOP_TYPE":"UPI","PAYMENT_TYPE":"UPI","CUST_EMAIL":"a@b.com","CUST_PHONE":"9999999999","UPI_INTENT":1},"environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/nineteenpay-native/collect"
body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"10000","CURRENCY_CODE":"356","TXNTYPE":"SALE","MOP_TYPE":"UPI","PAYMENT_TYPE":"UPI","CUST_EMAIL":"a@b.com","CUST_PHONE":"9999999999","UPI_INTENT":1},"environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"transactionId":"TSP_TXN_ID","status":"PENDING","intentUrl":"upi://pay?...","raw":{},"decrypted":{}}
/api/payments/nineteenpay-native/validate-vpa
Validate VPA
payload must include PAYER_ADDRESS.
curl -sS -X POST 'https://nineteenapis.online/api/payments/nineteenpay-native/validate-vpa' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"100","CURRENCY_CODE":"356","TXNTYPE":"VALIDATE","MOP_TYPE":"UPI","PAYMENT_TYPE":"UPI","CUST_EMAIL":"a@b.com","CUST_PHONE":"9999999999","PAYER_ADDRESS":"test@upi"},"environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/nineteenpay-native/validate-vpa';
const body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"100","CURRENCY_CODE":"356","TXNTYPE":"VALIDATE","MOP_TYPE":"UPI","PAYMENT_TYPE":"UPI","CUST_EMAIL":"a@b.com","CUST_PHONE":"9999999999","PAYER_ADDRESS":"test@upi"},"environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/nineteenpay-native/validate-vpa"
body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"100","CURRENCY_CODE":"356","TXNTYPE":"VALIDATE","MOP_TYPE":"UPI","PAYMENT_TYPE":"UPI","CUST_EMAIL":"a@b.com","CUST_PHONE":"9999999999","PAYER_ADDRESS":"test@upi"},"environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"raw":{},"decrypted":{}}
/api/payments/nineteenpay-native/status
Status enquiry
payload.TXNTYPE must be STATUS.
curl -sS -X POST 'https://nineteenapis.online/api/payments/nineteenpay-native/status' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"10000","CURRENCY_CODE":"356","TXNTYPE":"STATUS","PG_REF_NUM":"PGREF"},"environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/nineteenpay-native/status';
const body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"10000","CURRENCY_CODE":"356","TXNTYPE":"STATUS","PG_REF_NUM":"PGREF"},"environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/nineteenpay-native/status"
body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"10000","CURRENCY_CODE":"356","TXNTYPE":"STATUS","PG_REF_NUM":"PGREF"},"environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"status":"SUCCESS","raw":{},"decrypted":{}}
/api/payments/nineteenpay-native/refund
Refund
payload requires PAY_ID, ORDER_ID, AMOUNT; PG_REF_NUM when applicable.
curl -sS -X POST 'https://nineteenapis.online/api/payments/nineteenpay-native/refund' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"10000","PG_REF_NUM":"PGREF"},"environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/nineteenpay-native/refund';
const body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"10000","PG_REF_NUM":"PGREF"},"environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/nineteenpay-native/refund"
body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","AMOUNT":"10000","PG_REF_NUM":"PGREF"},"environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"status":"PENDING","raw":{},"decrypted":{}}
/api/payments/nineteenpay-native/refund-status
Refund status
payload requires PAY_ID, ORDER_ID.
curl -sS -X POST 'https://nineteenapis.online/api/payments/nineteenpay-native/refund-status' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","PG_REF_NUM":"PGREF"},"environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/nineteenpay-native/refund-status';
const body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","PG_REF_NUM":"PGREF"},"environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/nineteenpay-native/refund-status"
body = {"payload":{"PAY_ID":"PAY123","ORDER_ID":"ORD456","PG_REF_NUM":"PGREF"},"environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"status":"SUCCESS","raw":{},"decrypted":{}}
/api/payments/nineteenpay-native/static-qr
Static QR
payload: PAY_ID, IDENTIFIER, RETURN_URL.
curl -sS -X POST 'https://nineteenapis.online/api/payments/nineteenpay-native/static-qr' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"payload":{"PAY_ID":"PAY123","IDENTIFIER":"STORE1","RETURN_URL":"https://merchant.example/cb"},"environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/nineteenpay-native/static-qr';
const body = {"payload":{"PAY_ID":"PAY123","IDENTIFIER":"STORE1","RETURN_URL":"https://merchant.example/cb"},"environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/nineteenpay-native/static-qr"
body = {"payload":{"PAY_ID":"PAY123","IDENTIFIER":"STORE1","RETURN_URL":"https://merchant.example/cb"},"environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"raw":{},"decrypted":{}}
V1 — JPSL
/api/payments/jpsl/initiate-sale
Initiate hosted sale
amount, returnURL required.
curl -sS -X POST 'https://nineteenapis.online/api/payments/jpsl/initiate-sale' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"amount":"100.00","returnURL":"https://merchant.example/jpsl-return","environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/jpsl/initiate-sale';
const body = {"amount":"100.00","returnURL":"https://merchant.example/jpsl-return","environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/jpsl/initiate-sale"
body = {"amount":"100.00","returnURL":"https://merchant.example/jpsl-return","environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"transactionId":"...","merchantTxnNo":"...","status":"PENDING","redirectURI":"https://...","tranCtx":"...","raw":{}}
/api/payments/jpsl/generate-qr
Generate UPI QR
amount required.
curl -sS -X POST 'https://nineteenapis.online/api/payments/jpsl/generate-qr' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"amount":"500","environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/jpsl/generate-qr';
const body = {"amount":"500","environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/jpsl/generate-qr"
body = {"amount":"500","environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"transactionId":"...","qrString":"upi://pay?...","raw":{}}
/api/payments/jpsl/status
Status
merchantTxnNo, originalTxnNo, amount.
curl -sS -X POST 'https://nineteenapis.online/api/payments/jpsl/status' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"merchantTxnNo":"MTX1","originalTxnNo":"OTX1","amount":"100.00","environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/jpsl/status';
const body = {"merchantTxnNo":"MTX1","originalTxnNo":"OTX1","amount":"100.00","environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/jpsl/status"
body = {"merchantTxnNo":"MTX1","originalTxnNo":"OTX1","amount":"100.00","environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"status":"SUCCESS","raw":{}}
/api/payments/jpsl/refund
Refund
merchantTxnNo, originalTxnNo, amount.
curl -sS -X POST 'https://nineteenapis.online/api/payments/jpsl/refund' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"merchantTxnNo":"MTXRF1","originalTxnNo":"OTX1","amount":"100.00","environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/jpsl/refund';
const body = {"merchantTxnNo":"MTXRF1","originalTxnNo":"OTX1","amount":"100.00","environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/jpsl/refund"
body = {"merchantTxnNo":"MTXRF1","originalTxnNo":"OTX1","amount":"100.00","environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"status":"PENDING","raw":{}}
V1 — Paytm Escrow
/api/payments/paytm/collect
Create collect / intent link
amount (number) required.
curl -sS -X POST 'https://nineteenapis.online/api/payments/paytm/collect' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"amount":100.5,"transaction_note":"Order 1"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/paytm/collect';
const body = {"amount":100.5,"transaction_note":"Order 1"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/paytm/collect"
body = {"amount":100.5,"transaction_note":"Order 1"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"transactionId":"...","collectRef":"...","status":"PENDING","crn":"...","link":"https://...","feeAccountBalance":0,"raw":{}}
/api/payments/paytm/status
Status (DB)
collect_ref_arr: array of collect references.
curl -sS -X POST 'https://nineteenapis.online/api/payments/paytm/status' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"collect_ref_arr":["CRN123"]}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/paytm/status';
const body = {"collect_ref_arr":["CRN123"]};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/paytm/status"
body = {"collect_ref_arr":["CRN123"]}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"results":[...]}
/api/payments/paytm/link-details
Link details
crn_arr: array of CRNs.
curl -sS -X POST 'https://nineteenapis.online/api/payments/paytm/link-details' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"crn_arr":["CRN123"]}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/paytm/link-details';
const body = {"crn_arr":["CRN123"]};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/paytm/link-details"
body = {"crn_arr":["CRN123"]}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"details":[...]}
V1 — Payouts
/api/payments/payoutnp/balance
Balance
Optional environment.
curl -sS -X POST 'https://nineteenapis.online/api/payments/payoutnp/balance' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/payoutnp/balance';
const body = {"environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/payoutnp/balance"
body = {"environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"balance":123.45,"raw":{}}
/api/payments/payoutnp/verify-account
Verify account
number, accountNo, ifscCode, clientOrderId.
curl -sS -X POST 'https://nineteenapis.online/api/payments/payoutnp/verify-account' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"number":"9999999999","accountNo":"123456789012","ifscCode":"SBIN0001234","clientOrderId":"CO-1","environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/payoutnp/verify-account';
const body = {"number":"9999999999","accountNo":"123456789012","ifscCode":"SBIN0001234","clientOrderId":"CO-1","environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/payoutnp/verify-account"
body = {"number":"9999999999","accountNo":"123456789012","ifscCode":"SBIN0001234","clientOrderId":"CO-1","environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"status":"SUCCESS","beneficiaryName":"...","orderId":"...","clientOrderId":"CO-1","utr":"...","raw":{}}
/api/payments/payoutnp/transfer
Transfer
transferMode: IMPS|NEFT|RTGS|UPI; vpa required for UPI.
curl -sS -X POST 'https://nineteenapis.online/api/payments/payoutnp/transfer' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"number":"9999999999","amount":"100","transferMode":"IMPS","accountNo":"123456789012","ifscCode":"SBIN0001234","beneficiaryName":"Test User","clientOrderId":"PO-1","environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/payoutnp/transfer';
const body = {"number":"9999999999","amount":"100","transferMode":"IMPS","accountNo":"123456789012","ifscCode":"SBIN0001234","beneficiaryName":"Test User","clientOrderId":"PO-1","environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/payoutnp/transfer"
body = {"number":"9999999999","amount":"100","transferMode":"IMPS","accountNo":"123456789012","ifscCode":"SBIN0001234","beneficiaryName":"Test User","clientOrderId":"PO-1","environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"transactionId":"...","status":"PENDING","orderId":"...","clientOrderId":"PO-1","raw":{}}
/api/payments/payoutnp/status
Payout status
orderId or clientOrderId.
curl -sS -X POST 'https://nineteenapis.online/api/payments/payoutnp/status' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_KEY" \
-H "X-API-SALT: YOUR_SALT" \
-d '{"orderId":"NP_ORDER_ID","environment":"prod"}'
(async () => {
const url = 'https://nineteenapis.online/api/payments/payoutnp/status';
const body = {"orderId":"NP_ORDER_ID","environment":"prod"};
const bodyStr = JSON.stringify(body);
const headers = { 'Content-Type':'application/json', 'X-API-KEY':'YOUR_KEY', 'X-API-SALT':'YOUR_SALT' };
const res = await fetch(url, { method:'POST', headers, body: bodyStr });
console.log(await res.json());
})();
import json, os, urllib.request
url = "https://nineteenapis.online/api/payments/payoutnp/status"
body = {"orderId":"NP_ORDER_ID","environment":"prod"}
body_str = json.dumps(body, separators=(",", ":"))
req = urllib.request.Request(url, data=body_str.encode(), headers={"Content-Type":"application/json","X-API-KEY":os.environ["NP_KEY"],"X-API-SALT":os.environ["NP_SALT"]}, method="POST")
with urllib.request.urlopen(req) as r: print(r.read().decode())
Typical success (200)
{"success":true,"status":"SUCCESS","utr":"...","raw":{}}
V1 — Inbound webhooks (payment providers → NineteenPay)
These URLs receive callbacks from banks/gateways. You normally configure your merchant callback in the dashboard; NineteenPay forwards a normalized or raw payload to you (see V2 outbound section). This section documents how we verify inbound posts.
Native V1 gateway inbound (HASH)
If HASH is present and pipe has a salt: build tilde-separated field string (gateway order), append salt, SHA256 hex uppercase; compare to HASH.
JPSL S2S
If secureHash and salt configured: HMAC-SHA256 over sorted keys, values concatenated in key order, hex digest vs secureHash.
Escrow channel (inbound)
RSA-SHA256: verify signature over JSON body (without signature) using the configured escrow public key (server-side).
Payout status (inbound webhook)
If webhook secret configured: AES-128-CBC checksum in Checksum field vs encrypted JSON (without Checksum).
Hosted PG add-money (header checksum)
Header xverify / x-verify: HMAC-SHA256 over sorted JSON keys with key derived from user id; compare hex.