SR King FamPay Gateway
FamPay payment gateway integration guide
One link per order. Your bot, app or website fills in the order id and the return address, and the customer pays and is sent back, all from that single link.
Build my payment link1. The one link
https://fampaygateway.lovable.app/pay/CODE/AMOUNT?order_id=ORDER_ID&redirect_url=https://yourapp.com/thanksCODEis your gateway code (top of your dashboard).AMOUNTis in rupees.ORDER_IDis your own order number: 3–64 letters, numbers,- _ .. Use a new one for every order.redirect_urlis where the customer goes after paying. Write it as a normal address, with no%codes. Put it last in the link.- Your bot, app or website just joins these pieces as text. No API call is needed to create the link.
Example for a Telegram bot:
https://fampaygateway.lovable.app/pay/ABCD1234/199?order_id=ORDER1001&redirect_url=https://t.me/MyShopBot?start=paid_ORDER10012. What the customer sees
- The link opens a payment page with a QR and payment buttons. The payment window is 5 minutes from the first open.
- As soon as the payment is verified, the customer is sent to your redirect address, in about a second.
- A paid order always opens as verified for 31 days and never shows a second QR. An unpaid order shows expired after 5 minutes.
- If several customers pay the same amount at the same moment, automatic matching pauses and each customer verifies with their UTR or FamPay Transaction ID (starts with FMP).
3. What your redirect address receives
https://yourapp.com/thanks?status=verified&txn_id=TRANSACTION_ID&order_id=ORDER_ID&amount=199&code=CODEIf your address already has its own parameters (like ?start=paid_1), these are added after them.
4. Confirm the payment before you deliver
Anyone can type your redirect address by hand, so confirm from your server with one request, using the same order id:
GET https://fampaygateway.lovable.app/api/public/order?code=CODE&order_id=ORDER_ID{
"ok": true,
"order_id": "ORDER1001",
"status": "verified",
"paid": true,
"amount": 199,
"utr": "REFERENCE_NUMBER",
"txn_id": "TRANSACTION_ID",
"verified_at": "2026-01-15T10:21:05.000Z"
}You do not have to wait for the customer to come back. Ask this link every 5 seconds for up to 5 minutes after you send the payment link. Each request also looks for the payment, so it works even if the customer closes the page or the redirect never happens.
Deliver only when paid is true and amount is the amount you asked for (it can be a few paise higher when another payment of the same amount was open at the same time). Status is not_opened, pending, verified or expired.
See how the code goes into your bot
Optional: create the link with the API
If you prefer, ask the API to build the link. Leave out order_id and it creates a unique one for you. The reply contains pay_url (the one link) and check_url (the confirmation request from step 4).
GET https://fampaygateway.lovable.app/api/public/order?code=CODE&amount=199&order_id=ORDER_ID&redirect_url=https://yourapp.com/thanksNeed help?
Message us on Telegram at @SRKING5306.
