Skip to content
NovaroPayDocs
2026-11-22.acaciacurrent
Theme
Merchant portal(opens in a new tab)

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.

  • 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.
  1. Create the payment without checkout. Send POST /payments with 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_reference is unique on your account, and an Idempotency-Key answers the same payment again for 24 hours: make both of the attempt, not of the order, such as order_8812-1 for the order’s first attempt to pay and order_8812-2 for its second.

  2. Read the answer. It is 201 with the payment: its channel is h2h, checkout is null, and next_action.upi_display_details holds what to show the payer. A payment our checks refused is 201 too, failed with outcome.type: blocked and no next_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, so device_id and user_agent matter 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_action is there while the payment waits for the payer, and null in any other status.

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_code stays, and money sent to the earlier details still pays it. When no other details are free, the payment fails and you get payment.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.

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.

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.

The payer's UTR
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 200 with the payment: one that was waiting for the payer is now processing, and an expired one stays expired. 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.
  • 400 parameter_invalid: the UTR does not match the field’s pattern. Show the message next to the field and let the payer type it again.
  • 409 reference_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.
  • 409 payment_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.

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.succeeded webhook or on a GET /payments/{id} that says succeeded, whichever comes first. payment.succeeded can come again, with a higher version, when our team corrects the payment’s confirmation, and its amount_paid and amount_credited may change with it: do not deliver an order twice, and keep the payment of the highest version.
  • Keep an expired payment’s order open until it is succeeded or failed.
  • Credit amount_credited, not amount. 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 is succeeded or failed.
  • A native app opens upi_uri and the app_links with the system: an Intent.ACTION_VIEW on Android, UIApplication.shared.open on 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 http or https to the system, as In a WebView shows for our page. The links use the schemes upi:, phonepe: and paytmmp:. 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 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

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.