Partner API
Show your menu, check serviceability and delivery fees, let customers sign in, place and pay for orders, and track them — straight from your RIKAAB account. One signed API, your branding.
pk_… and a secret sk_… — the secret is shown once, store it safely.Keys are per-restaurant. You can keep up to 5 live keys and revoke any at any time. Rate limit: 1,200 requests/min per key.
Every request carries four headers. The signature proves the request came from you and hasn't been tampered with or replayed.
X-Rikaab-KeyYour pk_… key id
X-Rikaab-TimestampUnix seconds (±5 min of server time)
X-Rikaab-NonceRandom, single-use per request
X-Rikaab-Signaturehex(HMAC-SHA256(secret, stringToSign))
Five lines joined by a newline (\n):
UPPERCASE(METHOD)
PATH?QUERY ← exactly as sent
TIMESTAMP ← same as X-Rikaab-Timestamp
NONCE ← same as X-Rikaab-Nonce
hex(sha256(rawBody)) ← sha256 of "" for GET / no bodyAny language works — HMAC-SHA256 with your secret. The Postman collection does this for you automatically.
const crypto = require('crypto');
// Sign a RIKAAB Partner API request with your website key.
function rikaabHeaders({ method, path, body = '', keyId, secret }) {
const ts = Math.floor(Date.now() / 1000).toString();
const nonce = crypto.randomBytes(16).toString('hex');
const bodyHash = crypto.createHash('sha256').update(body).digest('hex');
const stringToSign = [method.toUpperCase(), path, ts, nonce, bodyHash].join('\n');
const signature = crypto.createHmac('sha256', secret)
.update(stringToSign).digest('hex');
return {
'X-Rikaab-Key': keyId,
'X-Rikaab-Timestamp': ts,
'X-Rikaab-Nonce': nonce,
'X-Rikaab-Signature': signature,
};
}
// Example — fetch the menu
const rid = 'ten_xxxxxxxx'; // your restaurant id
const path = `/v1/partner/restaurants/${rid}/menu`;
const headers = rikaabHeaders({
method: 'GET', path, keyId: 'pk_xxxx', secret: 'sk_xxxx',
});
const res = await fetch(`https://rikaab.in${path}`, { headers });
const menu = await res.json();Diner-scoped calls (create / pay / track order) also sendX-Rikaab-Customer — the signed-in customer's token from the OTP verify step.
All paths are relative to https://rikaab.in. :rid is your restaurant id.
/v1/partner/restaurants/:rid/menuThe live menu — categories and items with prices (paise), sizes and whether each is orderable now.
/v1/partner/restaurants/:rid/places?q=Address autocomplete for the delivery address field.
/v1/partner/restaurants/:rid/places/:idResolve a picked place to a full address with lat/lng.
/v1/partner/restaurants/:rid/orders/quotePrice a cart server-side. For delivery with an address, returns the live courier fee; not serviceable → 422 not_deliverable. Also returns same-day availability and stock shortages.
/v1/partner/restaurants/:rid/customers/otp/sendEmail a one-time code to the shopper.
/v1/partner/restaurants/:rid/customers/otp/verifyVerify the code; returns a diner token used for the calls below.
/v1/partner/restaurants/:rid/ordersCreate an order. The server re-prices from scratch — client totals are never trusted. Online payment returns a Razorpay order to complete.
/v1/partner/restaurants/:rid/orders/:id/payConfirm the Razorpay payment handshake.
/v1/partner/restaurants/:rid/orders/:codeTrack an order — live status and history.
The full request/response shapes, example bodies and a ready-to-run flow are in the Postman collection. Questions? hello@rikaab.in.