Skip to content

INR APM using host-to-host#

The host-to-host communication allows a merchant to send all the data needed for a payment in the background without using XGateway checkout pages. This flow has the best conversion rate because it allows the customer to stay withim merchant domain.

Payment Flow#

The host-to-host flow for INR payment consists of 3 steps:

  1. Create an invoice
  2. Get payment details
  3. Confirm the payment

Important Integration rules

  • Make sure to notify the customer to submit a correct UTR.
  • If a UTR is not submitted, the invoice will be cancelled.
  • If a wrong UTR is submitted, the invoice will be cancelled.

Create an invoice#

Use the following body against extended invoice creation API

Request body

{
"amount":"501",
"baseCurrency":"INR",
"customerId":"some-customer-uuid",
"orderId":"some-order-id",
"paymentCurrency":"INR",
"paymentMethod":"basic_h2h",
"paymentSystem":"UPI"
}

Take the invoice ID from the response body (highlighted)

Response example

{
"data": {
"amount": "100.00",
"baseCurrency": "EUR",
"createdAt": "2026-01-28T14:35:00.000Z",
"customerId": "3f0a9b6d-8c2b-4f21-9f6b-7a8e2d5c4b1f",
"id": "5d7c2f4a-1b6e-4e3a-8c9f-2a3b4d5e6f7a", // <- THIS ONE!!!
"paymentUrl": "https://checkout.xgateway.tech/5d7c2f4a-1b6e-4e3a-8c9f-2a3b4d5e6f7a",
"status": "created",
"strategy": "floating",
"type": "deposit",
"accountId": "9a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"orderId": "f1e2d3c4-b5a6-7f8e-9d0c-1b2a3e4f5d6c",
"paymentCurrency": "EUR",
"transactions": []
},
"success": true
}

Get payment details#

Get the payment details for a UPI transaction using this API and the invoice ID

GET

Confirm the payment#

Use the following API to submit the UTR.

POST

Confirming a transaction#

Prefer callbacks over polling; they are signed and retried. For high-risk operations, confirm state via API (see the risks and details on the Callbacks Handling page). API responses are the source of truth.

To confirm the received deposit callback is valid, please use the API endpoint.

Testing on Demo environment#

Check the deposits and withdrawals simulation page for ways to test the integration.