Host to host: your own payment page
In host to host (H2H) you show the payer the UPI details yourself, on your own page or in your app, and the payer sees nothing of ours unless you choose to show it: our QR image, or our page with the same details. You create the payment without checkout, show what its next_action holds, and pass on the UTR the payer gives you. Everything else is as with the hosted payment page: the API keys, the Idempotency-Key, the PSP-Version, the webhooks and test mode.
Before you start
Section titled “Before you start”- A key of the account (API keys): a test key while you build. Test payments have the same fields and statuses as live ones.
- A page or a screen of yours that shows the details and takes the payer’s UTR, and a server that reads the payment for it. Your secret key stays on your server: never send it to the payer’s browser or your app.
Create the payment
Section titled “Create the payment”-
Create the payment without
checkout. SendPOST /paymentswith the amount, the method and your reference:A payment you show yourself curl https://api.dev.novaro.ink/payments \-H "Authorization: Bearer sk_live_in_…" \-H "PSP-Version: 2026-11-22.acacia" \-H "Idempotency-Key: order_8812-1:create-payment" \-H "Content-Type: application/json" \-d '{"amount": 49900,"currency": "INR","payment_method_data": { "type": "upi" },"merchant_reference": "order_8812-1","customer": { "id": "cus_4921" }}'merchant_referenceis unique on your account, and anIdempotency-Keyanswers the same payment again for 24 hours: make both of the attempt, not of the order, such asorder_8812-1for the order’s first attempt to pay andorder_8812-2for its second. -
Read the answer. It is
201with the payment: itschannelish2h,checkoutisnull, andnext_action.upi_display_detailsholds what to show the payer. A payment our checks refused is201too,failedwithoutcome.type: blockedand nonext_action: see A blocked payment. Send what you know of the customer with the payment (Fraud prevention): in host to host the payer never opens our page, sodevice_idanduser_agentmatter most here.Response · 201 Created (shortened) {"id": "pay_in_01J9…","status": "awaiting_payer","amount": 49900,"amount_payable": 49900,"currency": "INR","channel": "h2h","checkout": null,"expires_at": 1760357700,"next_action": {"type": "upi_display_details","upi_display_details": {"vpa": "pay.store7@okaxis","amount": 49900,"reference_code": "K7M2Q","upi_uri": "upi://pay?pa=pay.store7@okaxis&pn=…&am=499.00&cu=INR&tn=K7M2Q","qr_code": {"data": "upi://pay?pa=pay.store7@okaxis&pn=…&am=499.00&cu=INR&tn=K7M2Q","image_url_svg": "https://pay-k7m2q.example/c/3fZ…/qr.svg","image_url_png": "https://pay-k7m2q.example/c/3fZ…/qr.png"},"app_links": [{ "app": "paytm", "url": "paytmmp://cash_wallet?…" },{ "app": "phonepe", "url": "phonepe://native?…" }],"hosted_instructions_url": "https://pay-k7m2q.example/c/3fZ…"}},"confirmation_fields": [{ "name": "utr", "pattern": "^[0-9]{12}$" }]}next_actionis there while the payment waits for the payer, andnullin any other status.
Show the details to the payer
Section titled “Show the details to the payer”| Show | From | |
|---|---|---|
| The amount to pay | upi_display_details.amount |
The payment’s amount_payable, in paise. It is your amount, or a little less when your account matches payments by amount: show this one, not your own amount. |
| The UPI ID | vpa |
With a Copy button. |
| The note | reference_code |
The payer puts it in the transfer’s note. |
| A QR code | qr_code.data drawn yourself, or the image at qr_code.image_url_svg |
Load the image in the payer’s browser or app, not through your server: it is served from your account’s checkout domain, which limits the requests for each payment and from each address. It answers 410 once the payment can no longer be paid: do not cache it. image_url_png is the same QR as a file to download, for a Download button. Both are null while your account has no checkout domain or its domain was retired, and once the payment’s page has closed. |
| Open a UPI app | upi_uri |
A button: any UPI app on the phone opens it. |
| Open Paytm, Open PhonePe | app_links |
A button for each: they open that app with the amount and the note locked where the app allows it. The list can be empty or shorter: show only the buttons it has. |
| The time left | expires_at |
In seconds since the Unix epoch. |
| A field for the UTR | confirmation_fields |
The payer’s UTR, the 12 digits their UPI app shows once they paid: pass it on. |
Read the payment again every time you show the page. While the payment waits for the payer, its UPI ID and amount may change, and you get payment.instructions_updated each time:
- the details shown can no longer take payments, and we move the payment to others;
- within a minute of its creation, we move the payment to better details than the ones it was first given;
- the payer asked for other details on our page with the same details.
The
reference_codestays, and money sent to the earlier details still pays it. When no other details are free, the payment fails and you getpayment.failed.
Make a new payment for every attempt to pay, with its own merchant_reference and Idempotency-Key (order_8812-2, and so on), and never show one payment’s details for another.
Our page with the same details
Section titled “Our page with the same details”For a payer you would rather not show the details yourself, hosted_instructions_url is our page with the same details, on your account’s checkout domain; it has no way back to you. It is null while your account has no checkout domain or its domain was retired, and once the page has closed.
Pass on the payer’s UTR
Section titled “Pass on the payer’s UTR”When the payer says they paid, take the UTR they type and pass it on with POST /payments/{id}/confirmations. It is optional, as we match payments without it, but it makes the match faster and settles doubtful cases.
curl https://api.dev.novaro.ink/payments/pay_in_01J9…/confirmations \ -H "Authorization: Bearer sk_live_in_…" \ -H "PSP-Version: 2026-11-22.acacia" \ -H "Idempotency-Key: order_8812-1:confirm:412345678901" \ -H "Content-Type: application/json" \ -d '{ "utr": "412345678901" }'- The answer is
200with the payment: one that was waiting for the payer is nowprocessing, and an expired one staysexpired. That is not proof that it is paid: it succeeds when we see the money, and fails if we do not see it in time. 400parameter_invalid: the UTR does not match the field’spattern. Show the message next to the field and let the payer type it again.409reference_already_used: this UTR confirms another payment of your account that has not succeeded or failed, or it is the reference of the bank transaction that paid another payment of your account.409payment_final: the payment already succeeded or failed.
Confirming a payment has every rule: the same UTR sent twice, the most values a payment takes, an expired payment, the UTR that paid a payment that succeeded.
Learn the result
Section titled “Learn the result”You learn what happened from the payment itself, as with the hosted page:
status |
What it means |
|---|---|
awaiting_payer |
The payer has not paid yet, or has not said so. |
processing |
The payer said they paid and gave their UTR. We are looking for the money: it succeeds when we see it, and fails if we have not seen it when the market’s late-payment window closes: 24 hours by default, counted from when it became processing or from its expires_at, whichever is later. |
succeeded |
Paid. Deliver the order. |
expired |
The payer did not pay in time. A late payment can still make it succeed. |
failed |
It will not be paid. One with failure_code: blocked was refused by our checks when it was made, and has no details: show your customer that paying is temporarily unavailable (Fraud prevention). |
- Deliver once, on the
payment.succeededwebhook or on aGET /payments/{id}that sayssucceeded, whichever comes first.payment.succeededcan come again, with a higherversion, when our team corrects the payment’s confirmation, and itsamount_paidandamount_creditedmay change with it: do not deliver an order twice, and keep the payment of the highestversion. - Keep an expired payment’s order open until it is
succeededorfailed. - Credit
amount_credited, notamount. A payer who types the UPI ID by hand types the amount too, and may type another. What arrived and what to credit has the fields. - While the payer waits on your page, update it from your webhook handler, or read the payment every few seconds. On
payment.instructions_updated, show the new details from the payment, not only its status. Stop when it issucceededorfailed.
In your app or a WebView
Section titled “In your app or a WebView”- A native app opens
upi_uriand theapp_linkswith the system: anIntent.ACTION_VIEWon Android,UIApplication.shared.openon iOS. When no app takes the link, the payer still has the UPI ID and the QR code. - Your page in a WebView cannot open another app’s link by itself: hand every link that is not
httporhttpsto the system, as In a WebView shows for our page. The links use the schemesupi:,phonepe:andpaytmmp:. Until your WebView does that, hide the app buttons there and keep the UPI ID and the QR code. - On a desktop there is no UPI app: show the QR code for the payer’s phone, and the UPI ID.
Hosted page or host to host?
Section titled “Hosted page or host to host?”| Hosted page | Host to host | |
|---|---|---|
| Who draws the payment screen | We do, on your checkout domain, in your brand | You do |
| Your code | A redirect to checkout.url and the way back |
The page, the UTR field and the result |
| The UTR | The payer types it on our page | You take it and send POST /payments/{id}/confirmations |
| Details that change while the payer waits | The page follows them | You read the payment again |
| In your app without a WebView | No | Yes |
Trying it out
Section titled “Trying it out”Create a payment with a test key and confirm it with a magic UTR: 000000000001 takes it to succeeded at once, and 000000000004 to succeeded with 1.00 less paid, so you can see amount_paid, amount_credited and amount_mismatch at work. To build your webhook handler, novaro listen sends your test events to your machine, and novaro trigger makes them happen.
The example integration takes both paths. Its guide H2H.md walks through host to host with a real run in test mode.