Home Dashboard API Reference
What is BDGate SMS Relay?
BDGate SMS Relay is an Android application that automatically monitors incoming SMS messages from MFS providers (bKash, Nagad, Rocket, etc.) and forwards payment confirmation data to your BDGate merchant account — so payments are verified instantly without any manual input.

Why Use SMS Relay?

When a customer sends money via bKash or Nagad, the MFS provider sends a confirmation SMS to the merchant's phone. Without automation, you'd need to manually check each SMS and verify each payment. BDGate SMS Relay does this automatically:

📱 Customer sends payment
📩 MFS sends SMS to your phone
🤖 SMS Relay reads it
⚡ BDGate auto-confirms
✅ Order approved

Requirements

ItemRequirement
Android VersionAndroid 5.0 (API 21) or higher
Internet ConnectionMobile data or Wi-Fi
MFS SIM CardbKash / Nagad / Rocket registered number
BDGate AccountActive merchant account on my.bdgate.net
Storage~2 MB free space
Important: The phone must remain powered on and connected to the internet at all times for automatic payment confirmation to work. We recommend using a dedicated phone or keeping Battery Optimization disabled for this app.

Download & Install

Step 1 — Download the APK

You can download the APK directly from your BDGate merchant panel:

  1. Log into my.bdgate.net
  2. Go to Settings → Android SMS Relay
  3. Click "Download APK"

Or download directly: https://api.bdgate.net/download/android-relay

Step 2 — Enable Unknown Sources

Since this app is not from the Google Play Store, you need to allow installation from unknown sources:

1

Open Settings

Go to your phone's Settings app.

2

Apps → Special App Access

Navigate to Apps (or Application Manager) → Special App Access → Install Unknown Apps.

3

Allow Your File Manager / Browser

Select the app you used to download the APK (Files, Chrome, etc.) and enable "Allow from this source".

Step 3 — Install the APK

Open the downloaded BDGate-SMS-Relay.apk file from your Downloads folder and tap Install.

Google Play Protect Warning: You may see a warning from Google Play Protect saying the app is from an unknown source. This is normal for sideloaded apps. Tap "Install anyway" to proceed. To avoid this warning, temporarily disable Play Protect before installing:

Google Play Store → Profile icon → Play Protect → ⚙️ Settings → Turn off "Scan apps with Play Protect"

Configuration

When you open the app for the first time, you'll see the configuration screen:

Webhook URL

This is pre-filled with the BDGate webhook endpoint. Do not change this unless instructed:

Webhook URL
https://api.bdgate.net/v1/sms-webhook

Security Secret

This is a unique token that identifies your merchant account. You must generate it from your BDGate dashboard (see Security Secret section below).

After entering both fields, tap "SAVE SETTINGS".

Getting Your Security Secret

The Security Secret links the app to your merchant account. Follow these steps to generate one:

1

Log into Merchant Panel

Visit my.bdgate.net and sign in to your account.

2

Go to Settings → Android SMS Relay

In the left sidebar, click Settings, then select Android SMS Relay.

3

Generate Secret

Click "Generate New Secret". A token starting with bgs_ will appear.

4

Copy to App

Copy the secret and paste it into the Security Secret field in the Android app. Tap Save Settings.

Keep your secret safe. Anyone with your Security Secret can forward SMS data to your account. If you suspect it's been compromised, generate a new one immediately — the old one will be invalidated.

Starting the Service

1

Save Your Settings First

Make sure Webhook URL and Security Secret are saved before starting.

2

Tap "START SERVICE"

The app will request SMS and Notification permissions. Grant both.

3

Grant SMS Permission

When asked for SMS access, tap Allow. If the button is greyed out, see Troubleshooting.

4

Status Shows "● Active"

The service is now running. A persistent notification will appear in your notification bar confirming the relay is active.

Disable Battery Optimization (Recommended)

To prevent Android from killing the service in the background:

  1. Settings → Apps → BDGate SMS Relay → Battery
  2. Select "Unrestricted" or "Don't optimize"

Auto-Start on Boot

The relay automatically restarts after the phone reboots. No manual action needed.

How It Works

When BDGate SMS Relay is running, here's exactly what happens when a customer makes a payment:

1

Customer Makes Payment

The customer sends money to your bKash/Nagad/Rocket number via their MFS app.

2

MFS Sends Confirmation SMS

The MFS provider sends a confirmation SMS to your phone, containing the Transaction ID, amount, and sender number.

3

Relay Intercepts & Verifies

The app detects the SMS from a known MFS sender, extracts the payment details, and sends them to your BDGate webhook.

4

BDGate Matches & Confirms

BDGate matches the Transaction ID and amount with the pending order and automatically marks it as approved.

5

Notifications Sent

Both you and your customer receive email confirmation of the successful payment.

Security Model

Webhook Payload (POST to /v1/sms-webhook)
{
  "sender_id":       "bKash",
  "sms_body":        "TK 500.00 received from 01XXXXXXXXX. TrxID ABCD123...",
  "timestamp":       1719744000000,
  "security_secret": "bgs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
  • Security Secret validates the request belongs to your account
  • Timestamp check (±5 minutes) prevents replay attacks
  • Transaction ID + Amount matching prevents false approvals
  • Database-level locking prevents double-approval race conditions

Supported MFS Providers

BDGate SMS Relay automatically recognizes SMS from these providers:

💚 bKash
🟠 Nagad
🟣 Rocket (DBBL)
🔵 Upay (UCB)
🟢 CellFin
🏦 IBBL
🔴 Tap (Bank Asia)
🟡 mCash
🔷 MyCash
🟤 SureCash

SMS from unrecognized senders are ignored — your personal SMS remain completely private.

Troubleshooting

❌ "There was a problem parsing the package"
Your Android version may be too old or the APK is corrupted. Make sure you're running Android 5.0 or higher and re-download the APK.
❌ SMS Permission "Allow" is greyed out
Google Play Protect may be restricting this permission. Fix:
1. Open Google Play Store → Profile → Play Protect → ⚙️ Settings → Turn off scanning
2. Go to Settings → Apps → BDGate SMS Relay → Permissions → SMS → Allow
3. Re-enable Play Protect after granting the permission.
❌ App says "App not installed"
Google Play Protect blocked the installation. Temporarily disable Play Protect (Play Store → Profile → Play Protect → Settings → OFF), then try installing again.
❌ Payments not being auto-confirmed
Check these in order:
1. Service status shows "● Active" in the app
2. SMS permission is granted (Settings → Apps → BDGate SMS Relay → Permissions)
3. Battery optimization is disabled for the app
4. Security Secret in the app matches the one in your BDGate dashboard
5. The phone has an active internet connection
❌ Service stops after phone restarts
The app includes a Boot Receiver that auto-starts the service. If it's not starting, check that the app has permission to auto-start (some manufacturers restrict this). Go to Settings → Apps → BDGate SMS Relay → Auto-start → Enable.
❌ Service keeps stopping on its own
Battery optimization is killing the service. Go to Settings → Apps → BDGate SMS Relay → Battery → select "Unrestricted" or "Don't optimize".

Frequently Asked Questions

Does the app read my personal SMS messages?
No. The app only processes SMS from known MFS senders (bKash, Nagad, Rocket, etc.). All other SMS are completely ignored and never transmitted anywhere.
Can I use the same phone for personal SMS?
Yes. The relay runs silently in the background and does not interfere with your normal SMS usage. You can send and receive personal messages as usual.
What happens if the internet is down?
The relay will retry sending the webhook up to 3 times with a delay between attempts. If all retries fail, the SMS data is not queued — manual verification may be needed for that transaction.
Does the app drain battery?
The foreground service uses minimal resources — it only activates when an SMS arrives. Battery usage is comparable to other messaging apps running in the background.
Can I use multiple phones with one account?
Yes. Multiple phones can use the same Security Secret. All will forward SMS to your account. However, use the same MFS number to avoid duplicate confirmations.
Is the app available on Google Play Store?
Not yet, but it's planned. Currently available as a direct download from your BDGate merchant panel. Play Store version will be released in a future update.
What if I generate a new Security Secret?
The old secret is immediately invalidated. Update the new secret in the Android app and tap Save Settings, then restart the service.