Partner API

Add ordering to your own website

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.

Base URL
https://rikaab.in
Format
JSON · amounts in paise
Auth
Website key (HMAC-SHA256)

Get a website key

  1. Sign in to your RIKAAB console as the owner.
  2. Open Setup → Website connection and create a key.
  3. You get a key id 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.

Authentication

Every request carries four headers. The signature proves the request came from you and hasn't been tampered with or replayed.

X-Rikaab-Key

Your pk_… key id

X-Rikaab-Timestamp

Unix seconds (±5 min of server time)

X-Rikaab-Nonce

Random, single-use per request

X-Rikaab-Signature

hex(HMAC-SHA256(secret, stringToSign))

The string to sign

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 body

Signing, in Node.js

Any 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.

Endpoints

All paths are relative to https://rikaab.in. :rid is your restaurant id.

Menu & discovery

GET
/v1/partner/restaurants/:rid/menu

The live menu — categories and items with prices (paise), sizes and whether each is orderable now.

GET
/v1/partner/restaurants/:rid/places?q=

Address autocomplete for the delivery address field.

GET
/v1/partner/restaurants/:rid/places/:id

Resolve a picked place to a full address with lat/lng.

Serviceability & delivery fee

POST
/v1/partner/restaurants/:rid/orders/quote

Price 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.

Diner sign-in

POST
/v1/partner/restaurants/:rid/customers/otp/send

Email a one-time code to the shopper.

POST
/v1/partner/restaurants/:rid/customers/otp/verify

Verify the code; returns a diner token used for the calls below.

Order

POSTdiner
/v1/partner/restaurants/:rid/orders

Create an order. The server re-prices from scratch — client totals are never trusted. Online payment returns a Razorpay order to complete.

POSTdiner
/v1/partner/restaurants/:rid/orders/:id/pay

Confirm the Razorpay payment handshake.

GETdiner
/v1/partner/restaurants/:rid/orders/:code

Track 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.