Integration Guide
Everything a developer needs to receive verified payments on their own site.
1. Create an account & get your Secret Key
Sign up, then find your 84-character secret key under Dashboard → API Key. This key identifies your account to the SMS Forwarder app — never share it publicly.
2. Install and configure the SMS Forwarder app
- Install the app on the phone that holds your bKash/Nagad/Rocket SIM.
- Grant SMS and notification permissions when asked.
- Tap Add Website and enter:
- Server URL: your LifeGood Pay account domain
- Secret Key: from step 1
- SIM slot: whichever SIM receives your payment SMS
- Tap Test & Save — you should see "Connected."
- Important: allow the app to ignore battery optimization when prompted, so Android doesn't kill it in the background.
3. Register your webhook URL
Under Dashboard → Webhook, enter the URL on your own site that should receive verified payments — typically the same endpoint you'd use if forwarding SMS directly (commonly something like https://yoursite.com/api/sms_webhook.php).
4. What your webhook receives
A standard application/x-www-form-urlencoded POST with these fields:
| Field | Description |
|---|---|
secret_key | Your webhook signing secret (set this as the value your own endpoint checks against — separate from your app secret key). |
method | bkash, nagad, or rocket |
amount | Decimal amount, e.g. 1250.00 |
trx_id | The transaction ID as it appeared in the SMS |
sender_number | The number the payment came from, if present |
raw_sms | The full original SMS text, for your own records |
We also send an X-LifeGoodPay-Signature header — an HMAC-SHA256 hex digest of the raw POST body, signed with your webhook secret — if you'd prefer to verify authenticity that way instead of (or in addition to) checking secret_key.
5. Respond correctly
Return an HTTP 2xx status to acknowledge successful receipt. Any other status (or a timeout) is treated as a failed delivery and automatically retried on a backoff schedule (roughly 1 min, 5 min, 15 min, 1 hr, then every 6 hrs, up to 8 attempts).
6. Test before going live
Use the Send Test Ping button on your Webhook settings page — it POSTs secret_key and ping=1 with no payment data and no fee charged, so you can confirm your endpoint responds correctly.