How to build a legal and CA consultation app with video calls

A legal and CA consultation app sells an adviser’s time, so its video calls must be private, end on time and leave a record precise enough to bill from. This guide covers the architecture, the two paid models (a flat fee per 30-minute slot or a price per minute), booking and time-capped calls, a no-backend start with Quick mode, and the server setup you should add before taking real fees. At the list price a 30-minute video consultation costs ₹12 ($0.138) in call minutes. This is engineering guidance, not legal advice.

This guide is the engineering side of our video call API for legal and finance advice apps. If you run a general marketplace of experts, see expert consultations too.

Architecture of a legal consultation app

The video call is one short event inside a matter you manage: the client’s profile, the booking, the fee, the documents, the advice note and the invoice. Keep all of that in your system and let the video layer carry the conversation.

PartRuns whereWhat it holds
Client appAndroid, iOS or a browserBooking, payment, documents, the consultation itself, the advice note afterwards.
Adviser app or web panelThe lawyer’s or CA’s laptop or phoneThe day’s slots, the client’s documents, the call, notes and follow-ups.
Your backendYour serversClients, advisers and their verification, bookings, fees and wallets, invoices, matter records. In production, the Titli project key.
Titli REST APIapi-videosdk.titliapp.comCalls, tokens and signed receipts, addressed by your own pseudonymous ids.
Titli media serversIndiaLive audio and video in transit, encrypted. Nothing is recorded or stored.
Titli Chat (optional)In both appsA 1:1 thread per client and adviser: questions, files and the summary after the call.
  1. Client appBook a slot or ask nowThe client books a slot with a CA for a flat fee, or taps Ask now on an on-call adviser who charges by the minute.
  2. Your serverTake the fee or check the walletFor a slot, collect the fee at booking. For per-minute, check that the wallet covers at least your minimum.
  3. Your server → TitliCreate the call with a capPOST /v1/calls with max_duration_seconds from the slot or the wallet, then a token for each person.
  4. Both appsConsultClient and adviser join the private call. Billing starts when the second person connects.
  5. Your server or TitliThe call endsThe adviser closes it, the cap is reached, or both hang up.
  6. Titli → your serverSettle from the receiptThe call-ended webhook carries the signed receipt with the connected seconds. Debit the wallet or confirm the slot, and file the record.

Paid consultation models: flat fee per slot or per minute

There are two ways to price advice by time. Both run on the same calls; the difference is where the cap comes from and how you settle. The fees below are examples only; you and your advisers set your own, and Titli takes no share of them.

Flat fee per 30-minute slotPrice per minute
Example fee to the client₹999 for the slot₹35 a minute
When the client paysAt booking, before the callAfter the call, from a prepaid wallet
Time cap on the callThe slot plus 5 minutes of grace: 2100 secondsWhat the wallet pays for (₹500 at ₹35 a minute = 14 minutes 17 seconds)
Good forTax planning, a contract review, a property consultationA quick question about a notice or a GST filing
SettlementNothing to compute; keep the receipt, refund a no-show by your policyCharge the connected seconds, minus any free seconds, at the stored price

The arithmetic, in INR and USD

Titli bills your app per participant-minute: one person connected for one minute, per second, only while both people are connected. A consultation between a client and an adviser uses two participant-minutes for every minute on the clock.

What you runParticipant-minutesINR accountUSD accountExample fee to the client
One 30-minute video consultation2 × 30 = 60₹12$0.138₹999 flat (example)
One 30-minute voice consultation60₹3$0.0342₹999 flat (example)
A flat-fee slot that ends after 18 minutes2 × 18 = 36₹7.20$0.0828still ₹999 (example)
A 12-minute per-minute video consultation2 × 12 = 24₹4.80$0.055212 × ₹35 = ₹420 (example)
30 minutes with a third person, such as a co-applicant3 × 30 = 90₹18$0.207your choice
60 video consultations in a day3,600₹720$8.28
A 30-day month (1,800 consultations)1,08,000₹21,600$248.40

List prices are ₹0.20 (video, up to 720p) and ₹0.05 (audio) per participant-minute on Indian accounts, and $0.0023 and $0.00057 on international accounts, excluding taxes. You recharge a prepaid balance by UPI or bank transfer (USD accounts: USDT or bank wire; card payment is not available yet); the smallest recharge of ₹500 covers 41 video consultations of 30 minutes. A third person needs your room size raised, which support does on request up to 50. A new account runs 5 calls at the same time; a firm where more advisers than that start at 11:00 sharp should ask for more first.

Booking and time-capped calls

Advice is sold in slots, and slots run back to back. A time cap keeps one client’s call from eating the next client’s slot, and keeps a per-minute call from running past what the client can pay.

  • The cap is set when the call is created. max_duration_seconds accepts 10 to 86400. When that much connected time has passed, the server ends the call for both people. There is no request that extends it later, so a top-up during the call means a new call.
  • Grace time is a product decision. Five minutes over a 30-minute slot lets an adviser finish a sentence. Show a countdown in both apps so nobody is cut off by surprise.
  • Early joiners cost nothing. An adviser who joins two minutes early and waits is not billed until the client connects.
  • Drops do not lose the slot. If both people drop, the call stays open for 30 seconds and rejoining continues it. After that, let the client rejoin from the booking screen: your server mints a fresh token for the same call if it is still open, or creates a new call for the rest of the slot.
  • Voice for quick follow-ups. A follow-up question a week later can be an audio call at ₹0.05 per participant-minute.

Quick mode: add your App Key, make a call in 5 minutes

No backend needed: add your App Key in the app and start calling. A server is optional, for production hardening.

  1. Get your App Key. In the console, open Projects → Quick mode and add your app's package name (Android) and bundle ID (iOS). Your App Key is shown there.
  2. Install the package from pub.dev (the console download is only a fallback).
    terminal
    flutter pub add titli_video_sdk
    
    # or in pubspec.yaml
    dependencies:
      titli_video_sdk: ^0.2.0
  3. Init with the App Key, then start or join a call. That is all: no server, no tokens.
    lib/main.dart
    import 'package:titli_video_sdk/titli_video_sdk.dart';
    
    // 1. Once, at app start: your App Key and your own user id. No server needed.
    await TitliVideo.init(appKey: 'tak_…', userId: 'user-42', userName: 'Asha');
    
    // 2. Start a video call (you are the caller and the payer)...
    final call = await TitliVideo.startCall(type: TitliCallType.video);
    // share call.callId with the other person your own way (push, your chat, Titli Chat)
    
    // 3. ...and on the other phone, join it.
    await TitliVideo.joinCall(callId);

The App Key is publishable, not a secret: it can only reach the app-facing routes, it is bound to your package name, bundle ID or website, and spend and usage caps fence it. The binding is a deterrent, not a lock (a determined attacker can copy an app's identity), so the caps are what limit the damage. For strict control, add server tokens (production hardening below). Quick mode: bindings, caps and error codes · Read the Client API (Quick mode).

Quick mode notes for an advice app

  • Use it to build and test the flow, or for free introductory calls. Paid advice should move to server tokens before launch, because in Quick mode anyone with the call id and your app can join the call.
  • Who starts the call. Let the adviser’s app start it at the slot time and send the call id to the client through your own push message or a Titli Chat call invite in their 1:1 thread.
  • Limits. In the console under Projects → Quick mode, set the longest Quick-mode call to your slot plus grace, and set the per-user daily minutes above a busy adviser’s day, for example 30 × 10 = 300 minutes for ten slots.

Production hardening (optional): server tokens

You do not need a server to start: Quick mode works with the App Key alone. Add a server when you want strict control over every call (who joins which call, for how long, in which role): keep the project key on your server and mint a short-lived join token per person there. The app uses the same SDK and hands it a token instead of the App Key. Both ways can run side by side.

For paid advice this is the setup we recommend before the first fee is taken. Your server holds the project key, creates one call per consultation with the cap from the slot or the wallet, and mints exactly two tokens: one for the client and one for the adviser.

consult-start.js
// consult-start.js (Node 20+). Runs on YOUR server at the booked time. The project key never ships in an app.
const API = 'https://api-videosdk.titliapp.com';
const AUTH = 'Basic ' + Buffer.from(`${process.env.TITLI_KEY_ID}:${process.env.TITLI_KEY_SECRET}`).toString('base64');
const titli = async (method, path, body) => {
  const r = await fetch(API + path, { method, headers: { Authorization: AUTH, 'Content-Type': 'application/json' }, body: body && JSON.stringify(body) });
  const j = await r.json();
  if (!r.ok) throw Object.assign(new Error(j.error?.code || String(r.status)), { status: r.status });
  return j;
};

export async function startConsult(booking, type /* 'video' | 'audio' */) {
  // 1. The time cap. A flat-fee slot: the slot length plus a short grace. Per minute: what the wallet pays for.
  let maxSeconds;
  if (booking.model === 'slot') {
    maxSeconds = (booking.slotMinutes + 5) * 60;
  } else {
    const walletPaise = await db.walletBalance(booking.clientId);           // YOUR wallet, in paise
    maxSeconds = Math.min(Math.floor((walletPaise * 60) / booking.pricePaisePerMin), 3600);
    if (maxSeconds < 60) throw new Error('recharge_needed');               // your rule: at least one minute
  }

  // 2. One call per consultation, created by your server, with the client as the payer.
  const call = await titli('POST', '/v1/calls', { type, payer_end_user_id: booking.clientId, max_duration_seconds: maxSeconds });
  await db.consults.insert({ callId: call.id, bookingId: booking.id, model: booking.model, maxSeconds, status: 'created' });

  // 3. One token per person, for this call only. Mint each when that person taps Join.
  const client = await titli('POST', `/v1/calls/${call.id}/tokens`, { end_user_id: booking.clientId, role: 'user', name: 'Client', ttl_seconds: 120 });
  const adviser = await titli('POST', `/v1/calls/${call.id}/tokens`, { end_user_id: booking.adviserId, role: 'host', name: booking.adviserName, ttl_seconds: 120 });
  return { callId: call.id, maxSeconds, client, adviser }; // send each token to its own person only
}

Use an opaque id for each person as end_user_id, never a phone number, PAN or a client’s name. The display name can be neutral, such as “Client”. Tokens here live for two minutes, enough to join and short enough that a forwarded token is useless soon after. Then settle when the call ends, from the server-side record, never from a timer in the app:

settle.js
// settle.js: from your webhook receiver, AFTER the signature check, for the call-ended event.
export async function onConsultEnded({ call, receipt, receipt_signature }) {
  const c = await db.consults.findByCallId(call.id);
  if (!c || c.status === 'settled') return;                                  // settle every consultation once
  const seconds = Math.max(0, receipt.connected_seconds - receipt.free_seconds);

  await db.transaction(async (tx) => {
    if (c.model === 'minute') {
      const owed = Math.ceil((seconds * c.pricePaisePerMin) / 60);           // your rounding rule, applied once
      const paise = Math.min(owed, await tx.walletBalance(c.clientId));
      await tx.ledger.insert({ key: `consult:${call.id}:debit`, account: `wallet:${c.clientId}`, paise: -paise });
    } else if (seconds < 120) {
      await tx.refunds.queue({ key: `consult:${call.id}:noshow`, bookingId: c.bookingId }); // your no-show policy
    }
    // Keep the signed record with the matter: it is your evidence of how long the consultation ran.
    await tx.consults.update(call.id, { status: 'settled', seconds, endReason: call.end_reason, receipt, receiptSignature: receipt_signature });
  });
}

The webhook can arrive more than once (it is retried after 10 seconds, 1 minute, 5 minutes and 30 minutes), so the unique ledger key and the settled status make a repeat harmless. Your backend can also close a consultation itself and fetch the record later:

terminal
# The adviser closed the consultation in your app: end it for both and fetch the signed record.
curl -s -u "$TITLI_KEY_ID:$TITLI_KEY_SECRET" -X POST https://api-videosdk.titliapp.com/v1/calls/<call_id>/end
curl -s -u "$TITLI_KEY_ID:$TITLI_KEY_SECRET" https://api-videosdk.titliapp.com/v1/calls/<call_id>/receipt
# -> { "receipt": { "connected_seconds": 1712, ... }, "signature": "base64…", "algorithm": "Ed25519", ... }

The wallet side is covered in depth in Designing a user wallet for per-minute calls, and the whole per-minute flow, with a low-balance warning in the app, in per-minute paid video consultations. Signature checks are in Webhooks and signed receipts.

Confidentiality: what is stored and what is not

Clients tell lawyers and CAs things they tell nobody else. Be exact with them about what the calling layer does.

TopicYour appTitli Video SDK
What is said on the callHeard by the client and the adviserCarried in real time, encrypted in transit, not recorded or stored
Who may joinYou decide, through the tokens you mintLets in only the holder of a valid token for that call
Records of the callThe booking, the advice note, the invoiceMetadata only: which id joined which call, when, and for how long
Client identityYou verify and hold itSees only the ids and display names you send
Data protectionYou are the data fiduciary under India’s DPDP ActActs as your processor under our data processing terms

Two rules follow. Put nothing about the matter into what you send to the video API: not in the ids, the display names or any metadata. And say plainly in your privacy notice that a processor carries the calls and that calls are not recorded. Titli holds no SOC 2, ISO 27001 or similar certification today; the security page lists the measures that do exist.

Documents: sharing files through chat

Most consultations start with a document: a tax notice, a rent agreement, a share certificate. The Titli Chat SDK gives the client and the adviser a 1:1 conversation with text, images, files such as PDFs, and voice notes, plus typing, read receipts and push through your own Firebase and Apple credentials. It uses the same App Key as calls, and a call invite in the thread can start the consultation.

Know where those files live. Chat messages and files are stored by Titli, with signed links, for the history period of your plan: 30 days on Free, 90 days on Pay as you go and 180 days on Scale, with files up to 10 to 50 MB. You can erase a user and their data with one API call. For identity papers, returns and anything you must keep for years, use your own document store with your own access rules, and send the client a link in chat instead of the file.

Professional rules are your responsibility

Lawyers, chartered accountants, company secretaries, tax practitioners, insurance advisers and investment advisers each answer to their own regulator or professional body, and some of those rules touch an app directly: how advisers may be listed and advertised, whether fees may be shared with a platform, who may give which kind of advice, and how client records must be kept. Titli is a calling platform and none of these rules are met by using it. Check them with your own counsel before launch.

This guide is engineering guidance, not legal, tax or regulatory advice.

What Titli does not do

  • No recording. Calls are never stored, so flows that must be recorded, such as video KYC or advice a regulator requires you to record, cannot run on Titli today.
  • No certifications or uptime SLA. No SOC 2, ISO 27001 or similar certificate today, and no uptime commitment.
  • No payments from your clients. Fees, wallets and adviser payouts run through your own payment provider; Titli bills only you, from your prepaid balance.
  • No phone-number calling and no screen share. Calls are app to app over the internet; share documents in chat.
  • Rooms are 1:1 by default. A third person needs the room size raised on request, up to 50.

Frequently asked questions

How do I build a legal consultation app with video calls?

Start with Quick mode: add your App Key to the client and adviser apps and start a call at the booked time, with no backend. Before you take real fees, add server tokens: your server creates one call per consultation with a time cap, mints a token for the client and one for the adviser, and settles the fee from the signed receipt.

What does a 30-minute video consultation with a lawyer or CA cost the app?

Two people for 30 minutes is 60 participant-minutes. At the list price that is ₹12 on video ($0.138 on a USD account) and ₹3 on voice ($0.0342). The fee you charge your client is your own and is not part of this bill.

Should I charge a flat fee per slot or per minute?

A flat fee per slot suits booked advice, such as a 30-minute tax planning session, because the client knows the price in advance. Per-minute pricing suits quick questions with an on-call adviser. Many apps offer both. The call works the same way; only the time cap and the settlement differ.

Are legal consultations recorded?

No. Titli has no recording. Audio and video pass through the media servers in real time and are not stored. That suits confidential advice, but flows that must be recorded by law, such as video KYC, are not a fit.

Is Titli Video SDK SOC 2 or ISO 27001 certified?

No. Titli holds no SOC 2, ISO 27001 or similar certification today. Media is encrypted in transit, calls are not recorded and logs hold metadata only. If a client or regulator requires a certified vendor, raise it before you build.

Can clients share documents such as a tax notice before the call?

Yes, with the Titli Chat SDK: files such as PDFs and images in a 1:1 conversation between the client and the adviser. Chat files are stored for the history period of your chat plan (30 to 180 days), so for identity papers and returns you may prefer your own document store.

Does Titli make my app compliant with Bar Council or ICAI rules?

No. Titli is a calling platform. The professional rules on advertising, fees, advice and client data apply to your app and your advisers, and you should check them with your own counsel. This guide is not legal advice.

Next steps

Free SDK. Pay only for the minutes you use.

Create a free account: it starts with ₹100 welcome credit, about 250 minutes of 1:1 video, so your first call needs no recharge. Questions? Message us on WhatsApp and a person replies.

Start free