Hosted checkout
paymentUrl opens Royal Pay's hosted checkout at https://pay.royalpe.site. It works like other hosted payment pages: it runs on its own address, apart from everything else, and needs no sign-in.
What your user sees #
- UPI: a QR code with the amount filled in, the UPI ID to copy, the amount, and buttons for UPI apps (PhonePe, Google Pay, Paytm, BHIM, Amazon Pay, CRED).
- Bank transfer: the account holder, bank, account number and IFSC to copy.
- Proof: the user uploads the payment screenshot. Royal Pay reads the UTR from it, or asks the user to type it when it can't.
- A 15-minute session timer for the QR. A payment made in time can still be submitted after it ends.
- After submitting, the page follows the check live and shows the result. Return to … takes the user to your
redirectUrl.
A secure session #
| Own origin | The checkout runs only on https://pay.royalpe.site, which serves nothing else. Your user's other Royal Pay sessions never reach it. |
| One browser | The first browser that opens the link owns the checkout. In any other browser (a forwarded or leaked link), the page shows only "This payment page is already open in another browser" and can neither show the details nor take a payment. Link previews in chat apps don't count as opening it. |
| Live | While it's open, the page reports in every 2 seconds. Royal Pay always knows whether the checkout is still open. |
| No framing | It can't be shown inside an iframe or another site. Open it as a full page, or a full-screen web view in an app. |
When a checkout is cancelled #
A pay-in nobody has submitted proof for is cancelled, and you get a cancelled webhook, when:
remarks | What happened |
|---|---|
Cancelled by the payer | The user pressed Cancel payment and confirmed. |
Payer left the checkout | The user closed the tab, pressed back or went to another page, and the checkout didn't come back within 10 seconds. A refresh, or the same checkout open in another tab, keeps it open. |
Checkout timed out: the payment page stopped responding | The page stopped reporting in for 30 minutes (the browser was closed or lost its connection). |
These never cancel it:
- Switching to a UPI app to pay. That only hides the page. Coming back resumes it.
- Anything after the user has submitted proof. A submitted pay-in always gets a final
approvedorrejected. - A link that was never opened.
On a cancelled checkout the QR, UPI ID and app buttons are gone, and the page tells the user not to pay. If a user does pay a cancelled pay-in, they contact you with the UTR, and the payment can be traced from it.
Integration tips #
- Redirect to
paymentUrlin the browser the user pays from. Don't open it from your server, a bot or a preview tool first. - For a retry after
cancelled, create a new pay-in with a neworderId. - In a mobile app, open the checkout in the system browser or a full-screen web view that keeps cookies.