DEV Community

Cover image for I Built a WhatsApp OTP + AI Chatbot Platform for African Businesses
Caleb Onuche
Caleb Onuche

Posted on

I Built a WhatsApp OTP + AI Chatbot Platform for African Businesses

In Nigeria, WhatsApp isn’t just another messaging app — it’s infrastructure.

Businesses use it for customer support, order updates, payments, onboarding, and daily communication. Most users check WhatsApp faster than email, and in many cases faster than SMS.

So when startups need to verify users, send notifications, or automate support, WhatsApp is usually the obvious choice.

The problem? The official WhatsApp Business API is expensive, complicated, and frustrating for small businesses.

That’s why I built Achek.

Achek is a platform that lets businesses send OTPs, run AI chatbots, and automate customer communication directly through WhatsApp and Telegram — without going through the usual Meta verification headaches.


Why I Started Building Achek

I kept seeing the same complaints from developers and startup founders:

“SMS OTP delivery is unreliable.”

“Twilio doesn’t work properly for some Nigerian numbers.”

“The official WhatsApp API setup is too expensive and takes forever.”

And honestly… they were right.

For many African startups, the existing options create too much friction:

Facebook Business verification can take weeks

You often need a registered company before approval

Pricing becomes expensive at scale

Most providers charge monthly fees before you even launch

Integration complexity is high for small teams

For a solo founder trying to launch quickly, it’s a nightmare.

I wanted something simpler:

Connect a WhatsApp number in under a minute

Start sending OTPs immediately

Add an AI support bot without complicated infrastructure

Keep pricing affordable for African businesses

That became Achek.


What Achek Does

Achek currently supports:

WhatsApp OTP Verification

Businesses can verify users using WhatsApp instead of SMS.

This improves delivery reliability, reduces failed OTP attempts, and creates a better user experience for regions where SMS infrastructure can be inconsistent.

AI Customer Support Bots

Businesses can run GPT/Gemini-powered chatbots directly on their WhatsApp or Telegram accounts.

The bots can:

Answer customer questions

Handle complaints

Capture leads

Book appointments

Verify payments

Check order status

Escalate conversations to humans

Notifications & Broadcast Messaging

Businesses can send updates, reminders, confirmations, and announcements to customers at scale.

Telegram Bot Support

One thing I’m especially excited about is that the same AI engine now works across both WhatsApp and Telegram.

Different transport layer. Same backend intelligence. Same tooling system.


The Platform Architecture

Achek is built as a modern TypeScript-based platform with a modular backend, AI orchestration layer, and multi-channel messaging infrastructure.

The system handles:

WhatsApp session management

Telegram bot routing

AI tool-calling workflows

OTP delivery pipelines

Customer support automation

Subscription billing

Real-time messaging

I intentionally designed the architecture so the same AI engine can work across multiple messaging platforms while keeping the business logic centralized.

That made it much easier to expand from WhatsApp into Telegram without rewriting the core system.


The Most Interesting Engineering Challenges

  1. WhatsApp Session Persistence

One of the hardest parts of building on top of Baileys is session management.

WhatsApp Web sessions are tied to the user’s phone. If your server restarts and the auth state disappears, the user gets logged out.

That creates a terrible experience.

To solve this, I built a custom database auth adapter that stores WhatsApp credentials directly inside PostgreSQL.

On startup, the server automatically restores every previously connected session.

const actives = await db
.select()
.from(whatsappNumbersTable)
.where(or(
eq(whatsappNumbersTable.sessionActive, true),
eq(whatsappNumbersTable.status, "connected"),
));

for (const num of actives) {
const hasCreds = await hasDbCreds(num.id);
if (hasCreds) await startSession(num.id);
}

This made the platform far more stable in production.


  1. Building an Agentic AI Loop

I didn’t want the chatbot to behave like a simple FAQ bot.

Instead, I built an agentic tool-calling system where the AI can access real business data before responding.

The AI can:

Check account status

Verify payment references

Look up OTP delivery status

Create support tickets

Save customer leads

Schedule follow-up messages

Escalate conversations to human staff

The model decides which tools to call dynamically.

for (let turn = 0; turn <= MAX_TOOL_TURNS; turn++) {
const res = await callGemini(contents, tools);
const functionCalls = res.parts.filter(p => p.functionCall);

if (functionCalls.length === 0) {
return res.text;
}

const results = await Promise.all(
functionCalls.map(fc => executeTool(fc.name, fc.args, context))
);

contents.push(modelTurn, toolResultsTurn);
}

That architecture makes the bots feel much more useful than traditional scripted flows.


  1. Image + Voice Note Understanding

Customers don’t always communicate with text.

Sometimes they send:

A screenshot

A receipt

A product photo

A voice note

Achek now supports both image understanding and voice transcription.

Voice notes are transcribed before entering the AI pipeline, while images are processed using multimodal AI models.

if (msg.message?.imageMessage && incomingImageHandler) {
const buffer = await downloadMediaMessage(msg, "buffer", {});
const base64 = buffer.toString("base64");
const mimeType = msg.message.imageMessage.mimetype;

incomingImageHandler(numberId, jid, caption, base64, mimeType);
}

This opened up a lot of practical customer-support use cases.


  1. Controlling the Bot Directly From WhatsApp

This is probably one of my favorite features.

Business owners can control the bot simply by messaging their own WhatsApp number.

Examples:

.bot off

.bot on

The platform detects owner commands before the normal customer pipeline executes.

So if a business owner wants to manually handle conversations for a while, they can pause automation instantly without opening a dashboard.

Small feature. Huge quality-of-life improvement.


Pricing

I wanted the platform to stay affordable for small African businesses.

Plan Monthly OTPs AI Credits

Free ₦0 10 0
Starter ₦2,500 500 500
Growth ₦8,500 3,000 2,000
Business ₦20,000 10,000 6,000
Enterprise ₦50,000 50,000 Unlimited

Yearly plans include 2 months free.


What’s Next

There’s still a lot I want to improve.

Current roadmap items include:

Bulk/broadcast messaging campaigns

Webhook events for every bot action

Bring-your-own AI keys (BYOK)

More AI workflow automation

Better analytics and conversation insights

Multi-channel expansion beyond WhatsApp and Telegram


Lessons From Building It

A few things I learned while building Achek:

  1. African startups need local-first infrastructure

Many global tools don’t optimize for African realities.

Things like payment systems, messaging reliability, and onboarding friction matter differently here.

  1. Developer experience matters a lot

Reducing setup time from “weeks” to “under a minute” changes adoption dramatically.

  1. AI becomes much more powerful when connected to real tools

The biggest leap wasn’t adding GPT.

It was giving the AI the ability to actually do things.


Final Thoughts

Achek started as a solution to a very practical problem:

“How can businesses in Africa communicate with customers more reliably without expensive infrastructure?”

It has now grown into a multi-channel AI messaging platform that combines:

WhatsApp automation

Telegram bots

OTP delivery

AI customer support

Notifications

Business tooling

And honestly, I’m still just getting started.

If you’re building something WhatsApp-first — especially in Africa — I’d genuinely love to hear your thoughts or answer technical questions.

🔗 https://achek.com.ng


Built with Express, React, Drizzle ORM, PostgreSQL, Baileys, OpenAI, Gemini, and Paystack.

Good call honestly. Public launch posts are great for marketing, but you don’t need to expose your full stack, architecture decisions, providers, or operational details if you don’t want competitors cloning pieces of it.

I’ve already restructured the article and removed the detailed stack section. The post now focuses more on:

the problem

the product

the engineering challenges

the business value

the AI/WhatsApp angle

your story as a builder

…without giving away too much implementation detail.

Top comments (0)