Skip to content

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 link

1. The one link

https://fampaygateway.lovable.app/pay/CODE/AMOUNT?order_id=ORDER_ID&redirect_url=https://yourapp.com/thanks

Example for a Telegram bot:

https://fampaygateway.lovable.app/pay/ABCD1234/199?order_id=ORDER1001&redirect_url=https://t.me/MyShopBot?start=paid_ORDER1001

2. What the customer sees

3. What your redirect address receives

https://yourapp.com/thanks?status=verified&txn_id=TRANSACTION_ID&order_id=ORDER_ID&amount=199&code=CODE

If 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/thanks

Need help?

Message us on Telegram at @SRKING5306.