Dashboard

Total SMS Sent
0
This Month
WhatsApp Messages
0
This Month
Total Messages
0
All Time

System Status

All systems operational

Recent Messages

Time Type To/From Message Status
Loading logs...

Connected Numbers

Gateway only (API, webhooks, OTP, no chatbot)? Connect here as usual. Then open SettingsPer-number settings → choose this line → uncheck “WhatsApp bot auto-reply”. Outbound API and webhooks keep working; inbound auto-menus stay off. New lines default with the bot off.

Loading connections...

Pewang Gateway

Pewang SMS Gateway

Turn any Android phone into a powerful SMS relay station.

1

Step 1: Get the App

Download and install the official Pewang Gateway APK on your Android device.

Download Android APK

Version 1.0.2 (Latest) • 5.5 MB

2

Step 2: Configure App

REQUIRED

Copy these settings into the Android app and tap Save.

https://gateway.pewang.company
Loading...
Device auto-registers when you save!
3

Step 3: You're Done!

Once paired, your device will appear in the table below. You can:

  • Test the connection with a tap
  • Monitor status and last activity
  • Unpair devices you no longer use

Tip: You can connect multiple phones to the same account!

Advanced: One-Time Pairing Tokens (Optional)

Generate single-use tokens for enhanced security. Use this if you don't want to share your main API key with the device.

Connected Gateway Devices

Device Name Device ID Last Seen Status Actions
No devices connected. Follow the steps above to pair a phone.

Your Secret Keys

Use these keys to authenticate your API requests. Keep them secret!

Client aliases

Map short names (for example payments, support) to your WhatsApp client IDs. Then call /api/sendWhatsApp or /api/mpesa/stk-push with clientAlias or role instead of passing raw client IDs in integrations.

Keys must start with a letter and use only letters, digits, underscore, and hyphen. Documentation

Bot Flow Builder

Build your WhatsApp chatbot visually - no coding needed! Add menu options, text responses, images, videos, and documents. Use Templates to get started instantly.


Select a WhatsApp client to start building.
Your Bot
Online

Select a client & build your flow to see a live preview

Type a message...

Website Widget

Current Balance

0 credits

Current Plan: Free

Add Credits

Securely top up your account via M-Pesa to continue sending messages.

Lipa Na M-Pesa

  • Till Number: 6966784 (Buy Goods)
  • Name: PEWANG DGTAL CO

Automatic verification coming soon!

Message Reports

Total Messages
0
Sent
0
Failed
0
Success Rate
0%

Message Log

0 messages
Date/Time Type To Message Status
Click "Apply Filters" to load messages

🚀 Send Your First Message in 30 Seconds

Test SMS or WhatsApp directly from your browser. No code needed!

Try It Now View Code

Try It Now

Test the API directly from your browser. No code required!

Auto-loaded from your account

Success Response

{
  "success": true,
  "message": "Message queued",
  "id": "e1fdd775-d1d1-4af6-8a71-f27d9998074f"
}

Error Response

{
  "error": "Missing parameters: to, msg"
}

Quick Tips

  • 📱 SMS: Requires Android Gateway connected
  • 💬 WhatsApp: Requires WhatsApp QR scan
  • 🌍 Phone format: 0722... or +254722...

📚 Code Examples

cURL Node.js Python PHP C#
curl -X POST "https://gateway.pewang.company/api/sendSMS" \
  -H "Content-Type: application/json" \
  -d '{
    "secret": "YOUR_API_KEY",
    "to": "+254722123456",
    "msg": "Hello from Pewang! 🎉"
  }'

Common Mistakes (Save Hours of Debugging!)

❌ Wrong { "apiKey": "sk_live_..." } ✅ Correct { "secret": "sk_live_..." }

The parameter is called secret, not apiKey!

❌ Wrong to: "0722123456" ✅ Better to: "+254722123456"

Include the country code for international compatibility. Local format works too!

❌ Missing Header

If you get Cannot parse JSON, make sure you're sending:

Content-Type: application/json

📖 API Reference

Endpoint Method Description
/api/sendSMS POST Send an SMS via your Android Gateway
/api/sendWhatsApp POST Send a WhatsApp message via connected instance

Request Parameters

Parameter Type Required Description
secret string Yes Your API key (starts with sk_live_)
to string Yes Recipient phone number
msg string Yes Message content (supports emojis! 🎉)
client string WhatsApp only Your WhatsApp client ID

Broadcast Campaign

1. Configuration

Select which WhatsApp number to send from.


2. Recipients

Supported formats: 07xx, 2547xx, +2547xx

0 numbers

3. Message

0 chars


4. Send Options

Estimated cost: 0 credits

Campaign Status

Ready to start


Live Log

Waiting for campaign...

Scheduled Campaigns

No scheduled campaigns

SIM Verification

Total Requests

0

Success Rate

0%

Successes

0

Verification Logs

Time Phone Status Details
Loading...

Per-number settings

Choose which WhatsApp client you are configuring. M-Pesa Daraja overrides and bot auto-reply follow this selection. Use Account default for account-wide M-Pesa defaults (no per-line bot).

Each option shows live / offline and the paired phone. With many lines, use your browser find (Ctrl+F / Cmd+F) on this page to jump by name or digits.

Account Settings

Manage your profile and notification preferences.

We will send low balance warnings to this number using your connected gateway.

Global Webhook

This is the **Fallback URL**. It receives all events (SMS & WhatsApp) that are not handled by a specific device or client webhook.

WhatsApp bot auto-reply

Controls automated replies from your chatbot (welcome message, menus, keywords). When paused, chats stay silent unless you handle them elsewhere. Pay shortcuts (PAY, RE, GO) still run when M-Pesa is configured. If you set a client webhook, inbound events can still be delivered to your server (configure replies there).

Select a WhatsApp client in Per-number settings above to turn the bot on or off.

Manual M-Pesa (no Daraja API)

Use this when you do not use Safaricom Daraja STK. Customers get Till or Paybill steps on WhatsApp; when your Android app forwards the business M-Pesa SMS to the gateway, we confirm payment like STK. Scope: same WhatsApp line as Per-number settings above.

Till (Buy Goods)

One till only. Customers use Lipa na M-Pesa → Buy Goods and Services → this till number.

Pay Bill (optional)

Two fields: Safaricom paybill business number and the account number customers enter (invoice, order ID, phone, etc.).

M-Pesa Daraja (Per Account)

Configure your own Daraja credentials. Each customer account has isolated M-Pesa settings for secure multi-tenant payments.

Loading M-Pesa status...

Daraja scope uses Connected WhatsApp number in Per-number settings at the top of this page.

Account default applies when no specific client is selected.

Quick Test STK Push (sends prompt to your test phone using your saved Daraja config).

Use your gateway host only (not your webhook URL). Daraja callback path is appended automatically.