DOCUMENTATION

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

  1. Install the app on the phone that holds your bKash/Nagad/Rocket SIM.
  2. Grant SMS and notification permissions when asked.
  3. 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
  4. Tap Test & Save — you should see "Connected."
  5. 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:

FieldDescription
secret_keyYour webhook signing secret (set this as the value your own endpoint checks against — separate from your app secret key).
methodbkash, nagad, or rocket
amountDecimal amount, e.g. 1250.00
trx_idThe transaction ID as it appeared in the SMS
sender_numberThe number the payment came from, if present
raw_smsThe 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.