NirmaataDeveloper GuideLegacy guide

Merchant Launch Guide

Go from merchant setup to your first live payment. Each stage ends with a checkpoint so both your operations and development teams know when to move on.

New to APIs? Your website's backend sends a request to NRPS. The endpoint is the address for that action. Headers identify your merchant, and the JSON body carries details such as the order number and amount. NRPS answers with a response. A webhook is a separate update that NRPS sends to your server when the payment status changes.

Your launch checklist

  1. 01Onboard your merchant

    Confirm account access and payment routes.

  2. 02Get API credentials

    Set up test keys and webhook signing.

  3. 03Run sandbox simulations

    Test success and failure without paying.

  4. 04Connect your test environment

    Exercise checkout from your own app.

  5. 05Integrate transactions

    Start with Manual Payments or Auto UPI.

  6. 06Sign off and go live

    Complete UAT and verify your first production payment.

Frequently Asked Questions

Where should I start if my merchant is already set up?

Start with API Credentials if you have access and your routes are active.

Where can I test without paying?

Use Checkout Sandbox to simulate success and failure without contacting a provider.

Stage 01

Merchant Onboarding

Work with the NRPS platform team to set up your merchant account, assign payment routes, and grant access to the people who will manage payments and reconciliation.

  • Confirm your merchant name, operations contact, and developer contact.
  • Confirm which routes you will launch with: manual UPI, IMPS, RTGS, or Auto UPI.
  • Share the test and live webhook URLs and any IP or domain allowlist requirements with your administrator.

Ready when: Your team can sign in and confirm that the intended payment routes are active.

Frequently Asked Questions

Who can activate a payment route?

Ask your NRPS platform contact or authorized administrator to confirm the route assignment and activation.

What should I provide before development starts?

Share your developer contact, the methods you plan to use, your test webhook URL, and any IP or domain allowlist requirements.

IP and domain allowlists

Each merchant can optionally restrict API access by:

  • allowed_ips
  • allowed_domains

Both are comma-separated fields on the merchants table. If a field is empty, that check is skipped.

Examples:

Example
allowed_ips = 203.0.113.10,198.51.100.25
allowed_domains = merchant.example.com,checkout.example.com

IP checks use the request client IP. Domain checks use the Origin header first and then Referer.

All /api/* requests are logged by NRPS, including invalid credentials, blocked IP/domain attempts, and malformed payloads. Secrets and tokens are masked in logs.

Stage 02

Get Your API Credentials

Ask your merchant administrator for the test API key, test API secret, and test webhook signing secret. Send the API credentials from your server and use the signing secret only to verify incoming webhooks. Keep live credentials separate.

  1. API key: Put the key issued for this merchant in the X-Api-Key header.
  2. API secret: Put the matching secret from the same environment in X-Api-Secret.
  3. Signing secret: Store it on the server receiving webhooks. Do not send it with API requests.
  4. Base URL: Replace {BASE_URL} with the NRPS address provided by your administrator. Keep the endpoint path after it.
  5. JSON requests: Set Content-Type: application/json when you send a JSON body. In the cURL example, -X sets the HTTP method, -H adds a header, and -d supplies the body.
Request headers
X-Api-Key: YOUR_TEST_API_KEY
X-Api-Secret: YOUR_TEST_API_SECRET

Ready when: Your backend can authenticate a test request, and your callback receiver has the test signing secret.

API Examples

Authenticated request (cURL)
Authenticated request (cURL)
curl -X POST "{BASE_URL}/api/v1/payments" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -d '{"order_id":"ORDER-1001","amount":1250.00,"customer_name":"Customer Name"}'
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
amount
For a new request, required amount in Indian rupees: 10.00 means ten rupees, not ten paise. In a response, this is the original request amount.
customer_name
Optional customer name for the request.

Frequently Asked Questions

Is the webhook signing secret the same as the API secret?

No. The API secret authenticates requests you send. The signing secret verifies webhooks you receive.

Can I put test keys in frontend code?

No. Make authenticated requests from your backend and keep API secrets out of browser code and shared logs.

Stage 03

Checkout Sandbox

Copy the endpoint for an assigned route in Merchant Details → Developer Checkout. Use manual UPI, IMPS, RTGS, or Auto UPI, depending on what your merchant has configured.

POST Create sandbox payment
POST /api/v1/developer-checkout/routes/123/payments
Content-Type: application/json
X-Api-Key: YOUR_TEST_API_KEY
X-Api-Secret: YOUR_TEST_API_SECRET

{
  "order_id": "SANDBOX-001",
  "amount": "10.00",
  "return_url": "https://merchant.example.com/success",
  "failure_url": "https://merchant.example.com/failure"
}
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
amount
For a new request, required amount in Indian rupees: 10.00 means ten rupees, not ten paise. In a response, this is the original request amount.
return_url
Optional full URL on your site for the customer to return to. A browser redirect is not proof of payment.
failure_url
Optional full URL on your site for the unsuccessful result where the checkout flow supports it.

Replace 123 with your route ID. Open the returned payment_url and select Simulate Success or Simulate Failure. Keep the returned payment_id for status checks.

The route ID is the number in the endpoint copied from Merchant Details. It identifies the payment route you are simulating, not the merchant or order. POST creates a request; GET reads information.

Test mode only. NRPS sends the signed result to your configured test webhook URL. It does not contact a payment provider or fall back to your live webhook URL.

Test customer redirects

Include return_url and failure_url in the request to exercise the corresponding redirects.

Ready when: Both simulations produce a verified webhook and the expected order status in your system.

Frequently Asked Questions

Why don't I see the route I want to test?

Developer Checkout only lists active, supported routes assigned to your merchant. Ask your NRPS administrator to verify the route.

Why didn't my test webhook arrive?

Confirm your test webhook URL and test signing secret are configured, then check the test webhook logs. Sandbox does not fall back to the live URL.

Complete HTTP and JSON Examples

Sandbox request with return URLs
Sandbox request with return URLs
POST /api/v1/developer-checkout/routes/123/payments
Content-Type: application/json
X-Api-Key: YOUR_TEST_API_KEY
X-Api-Secret: YOUR_TEST_API_SECRET

{"order_id":"SANDBOX-001","amount":"10.00","return_url":"https://merchant.example.com/success","failure_url":"https://merchant.example.com/failure"}
Stage 04

Connect Your Test Environment

Sandbox validates simulated outcomes. Next, run the normal integration from your staging app with NRPS test credentials so you can verify how your own checkout behaves.

See the manual payment examples or the Auto UPI example for your route.

  1. Fetch your available payment methods and create a request from your backend.
  2. Store the returned payment_id and open payment_url. Configure staging return URLs for both outcomes.
  3. Confirm the order result from a verified webhook or status lookup, not from the browser redirect.

Test keys and sandbox are not the same. A normal test request can still open a configured provider checkout. Use Developer Checkout when you need a guaranteed no-payment simulation. Confirm the provider environment before attempting a payment.

Ready when: Your staging app can create a request, open checkout, and reconcile the result by payment ID.

Frequently Asked Questions

Does a test API key guarantee no money will move?

No. A normal test request can open a configured provider checkout. Use Developer Checkout for a no-payment simulation.

Can I mark an order paid after a customer redirect?

No. Confirm the payment through a verified webhook or an authenticated status lookup.

Stage 05

User Acceptance Testing & Sign-off

Have development and operations test the routes they plan to launch. Record a payment ID for each case so either team can trace the result.

  • Success and failure: Verify the order status, customer return page, and webhook for both outcomes.
  • Manual routes: Verify UTR submission and the staff review flow on each applicable route.
  • Auto UPI: Verify confirmation and check expiry or cancellation where the route supports it.
  • Webhook recovery: Verify that duplicate delivery does not credit the order twice and that a status lookup can reconcile a missed update.

Ready when: Your development and operations teams have reviewed the results and agreed to launch.

Frequently Asked Questions

Do we need to test every available method?

Test every route you plan to launch. Record the payment ID and expected versus actual outcome for each case.

How do we check for duplicate credits?

In staging, process the same verified webhook event twice and confirm your system applies the credit only once.

Stage 06

Launch in the Live Environment

Reference: Manual Payments, Auto UPI, and Webhooks.

  1. Configure live API credentials and the live signing secret in your production backend. Keep your staging settings unchanged.
  2. Verify the live webhook URL, return URLs, allowed IPs or domains, and active routes.
  3. Run one approved, low-value live payment. Verify the customer return, signed webhook, status lookup, and reconciliation before opening traffic.

Launch complete when: The first live payment matches in NRPS and your merchant system, and your operations team knows where to check future issues.

Frequently Asked Questions

What changes when we switch to live?

Use your live API credentials, live webhook URL and signing secret, and production return URLs. Recheck allowed IPs or domains and active routes before opening traffic.

What if the first payment succeeds but our order stays unpaid?

Pause rollout, check the payment status and webhook delivery by payment ID, and reconcile the existing attempt before asking the customer to pay again.

Manual Payments

Use POST /api/v1/payments for a manual UPI, IMPS, or RTGS route. Open the returned payment_url for the customer. After paying, the customer submits their bank transaction reference (UTR) for review. Keep the returned payment_id for status checks.

Before You Send a Link

  1. Check availability. Call GET /api/v1/payment-methods to see the active methods configured for your merchant. A manual method needs an active collection account.
  2. Retry the same request with the same order ID. For the same merchant and environment, a repeated order_id returns the existing payment request instead of creating a second one. Use a new order ID when you need a fresh request.
  3. Set an expiry if needed. Use payment_expires_at for a future date and time. If omitted, the standard link expiry is 24 hours from creation. A route or checkout session can apply a shorter limit.
  4. Use each link once. Once the customer successfully submits the UTR or payment details, the link locks even while staff review is pending. Do not resend a used link. An expired or used link needs a fresh payment request if payment is still needed; check the earlier status first to avoid a duplicate payment.

Manual UPI, IMPS and RTGS

Payment methods: response
Payment methods: response
{
  "success": true,
  "data": {
    "payment_methods": [
      { "code": "UPI", "name": "UPI", "available": true },
      { "code": "IMPS", "name": "IMPS", "available": true },
      { "code": "RTGS", "name": "RTGS", "available": true }
    ]
  }
}
success
true means this API action succeeded, not necessarily that the customer paid. false means the request failed; read the error details.
data
Container holding the result data.
payment_methods
List of payment methods available to this merchant.
code
Method code to send in payment_method, for example UPI.
name
Display name of the payment method.
available
Whether the method is available to use.
Checkout request
Checkout request
{
  "order_id": "ORDER-1001",
  "amount": 1250.00,
  "customer_id": "CUST-1001",
  "customer_name": "Customer Name",
  "customer_email": "customer@merchantdomain.com",
  "customer_mobile": "9999999999",
  "return_url": "https://merchant.example.com/success",
  "failure_url": "https://merchant.example.com/failed",
  "payment_method": "UPI",
  "payment_expires_at": "2026-06-11 18:30:00"
}
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
amount
For a new request, required amount in Indian rupees: 10.00 means ten rupees, not ten paise. In a response, this is the original request amount.
customer_id
Optional customer reference from your own system.
customer_name
Optional customer name for the request.
customer_email
Customer email address. Supply it if you ask NRPS to email the payment link.
customer_mobile
Optional customer phone number. Send it as text to preserve the digits.
return_url
Optional full URL on your site for the customer to return to. A browser redirect is not proof of payment.
failure_url
Optional full URL on your site for the unsuccessful result where the checkout flow supports it.
payment_method
Method code, such as UPI, IMPS, or RTGS. For UPI, the merchant's route determines whether checkout is manual or automated. In a response, this identifies the relevant method.
payment_expires_at
Optional expiry when creating the request. Use YYYY-MM-DD HH:MM:SS. In a response, this is the recorded link expiry; individual routes may apply a shorter checkout window.
Checkout response
Checkout response
{
  "success": true,
  "payment_id": "PAY202606100101019999",
  "request_ref": "R202606100101019999",
  "order_id": "ORDER-1001",
  "amount": 1250,
  "fee_amount": 25,
  "net_amount": 1225,
  "payment_expires_at": "2026-06-11 18:30:00",
  "status": "Received",
  "payment_origin": "checkout",
  "payment_url": "{BASE_URL}/pay/{token}",
  "email_sent": false
}
success
true means this API action succeeded, not necessarily that the customer paid. false means the request failed; read the error details.
payment_id
NRPS payment identifier returned at creation. Save it and use it to check this payment attempt.
request_ref
NRPS request reference returned at creation. Keep it for traceability and endpoints that explicitly ask for it.
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
amount
For a new request, required amount in Indian rupees: 10.00 means ten rupees, not ten paise. In a response, this is the original request amount.
fee_amount
Fee charged on this payment, in rupees.
net_amount
Payment amount minus the fee, in rupees.
payment_expires_at
Optional expiry when creating the request. Use YYYY-MM-DD HH:MM:SS. In a response, this is the recorded link expiry; individual routes may apply a shorter checkout window.
status
Current state of the payment or service described by this response. Received is not a paid result; Approved records approval.
payment_origin
How the request was created: checkout or payment_link.
payment_url
Complete checkout URL. Pass it to the customer unchanged; do not construct it from the example.
email_sent
Whether NRPS sent the link email. This does not indicate that payment was made.
Payment link request
Payment link request
{
  "order_id": "ORDER-1002",
  "amount": 2500.00,
  "customer_name": "Customer Name",
  "customer_email": "customer@merchantdomain.com",
  "payment_method": "UPI",
  "payment_expires_at": "2026-06-11 18:30:00",
  "send_email": true
}
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
amount
For a new request, required amount in Indian rupees: 10.00 means ten rupees, not ten paise. In a response, this is the original request amount.
customer_name
Optional customer name for the request.
customer_email
Customer email address. Supply it if you ask NRPS to email the payment link.
payment_method
Method code, such as UPI, IMPS, or RTGS. For UPI, the merchant's route determines whether checkout is manual or automated. In a response, this identifies the relevant method.
payment_expires_at
Optional expiry when creating the request. Use YYYY-MM-DD HH:MM:SS. In a response, this is the recorded link expiry; individual routes may apply a shorter checkout window.
send_email
Set to true to ask NRPS to email the link. Set to false when your own system will share it.

Use POST /api/v1/payment-links to get a shareable link. With send_email: true, customer_email is required and NRPS sends the link using its configured SMTP email service. With send_email: false or omitted, share the returned link from your own checkout, email, SMS, or messaging system.

Payment link response
Payment link response
{
  "success": true,
  "payment_id": "PAY202606100101029999",
  "request_ref": "R202606100101029999",
  "order_id": "ORDER-1002",
  "amount": 2500,
  "fee_amount": 50,
  "net_amount": 2450,
  "payment_expires_at": "2026-06-11 18:30:00",
  "status": "Received",
  "payment_origin": "payment_link",
  "payment_url": "{BASE_URL}/pay/{token}",
  "email_sent": true
}
success
true means this API action succeeded, not necessarily that the customer paid. false means the request failed; read the error details.
payment_id
NRPS payment identifier returned at creation. Save it and use it to check this payment attempt.
request_ref
NRPS request reference returned at creation. Keep it for traceability and endpoints that explicitly ask for it.
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
amount
For a new request, required amount in Indian rupees: 10.00 means ten rupees, not ten paise. In a response, this is the original request amount.
fee_amount
Fee charged on this payment, in rupees.
net_amount
Payment amount minus the fee, in rupees.
payment_expires_at
Optional expiry when creating the request. Use YYYY-MM-DD HH:MM:SS. In a response, this is the recorded link expiry; individual routes may apply a shorter checkout window.
status
Current state of the payment or service described by this response. Received is not a paid result; Approved records approval.
payment_origin
How the request was created: checkout or payment_link.
payment_url
Complete checkout URL. Pass it to the customer unchanged; do not construct it from the example.
email_sent
Whether NRPS sent the link email. This does not indicate that payment was made.

Frequently Asked Questions

Does submitting a UTR mark the order paid?

No. Wait for approval and confirm it through a verified webhook or the status API.

Customer checkout and UTR rules

Redirect the customer to payment_url. The hosted page displays the amount and the available payment instructions.

For manual UPI, IMPS, and RTGS, the page displays collection details and asks the customer to submit UTR/reference proof. UTR validation is method-specific:

UPI / IMPS12-16 digits only.
RTGS22-character alphanumeric UTR starting with 4-letter bank code.

Duplicate UTR values are rejected for manual methods. After successful manual submission or final automated confirmation, the same payment page URL becomes unavailable.

Payment Origins

Every transaction carries payment_origin so merchants and operators can identify how the payment request was created.

checkoutPayment request created from merchant checkout/API flow.
payment_linkPayment request created as a direct payment link.
Payment Link Lifecycle
Example
created -> customer opens payment page -> customer submits UTR -> submitted -> staff review -> approved/rejected/failed

Important rules:

  • A created payment page can be opened and shared until it expires.
  • After UTR submission, the page becomes unavailable for reuse.
  • Duplicate UTR values are rejected.
  • UPI/IMPS UTR must be 12-16 digits.
  • RTGS UTR must be 22 alphanumeric characters starting with a 4-letter bank code.

Complete HTTP and JSON Examples

description is an optional note about the payment. For an emailed link, include customer_email and set send_email to true. Use GET /api/v1/payment-methods to see which methods are enabled before offering them.

List active payment methods
List active payment methods
GET /api/v1/payment-methods
Manual checkout
Manual checkout
POST /api/v1/payments
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET
Manual checkout: request
Manual checkout: request
{
  "order_id": "ORDER-1001",
  "amount": 1250.00,
  "customer_id": "CUST-1001",
  "customer_name": "Customer Name",
  "customer_email": "customer@merchantdomain.com",
  "customer_mobile": "9999999999",
  "description": "Manual payment collection",
  "return_url": "https://merchant.example.com/payment/success",
  "failure_url": "https://merchant.example.com/payment/failed",
  "payment_method": "IMPS",
  "payment_expires_at": "2026-06-11 18:30:00"
}
Manual checkout: response
Manual checkout: response
{
  "success": true,
  "payment_id": "PAY202606100101019999",
  "request_ref": "R202606100101019999",
  "order_id": "ORDER-1001",
  "amount": 1250,
  "fee_amount": 25,
  "net_amount": 1225,
  "payment_expires_at": "2026-06-11 18:30:00",
  "status": "Received",
  "payment_origin": "checkout",
  "payment_url": "{BASE_URL}/pay/<token>",
  "email_sent": false
}
Payment link and optional email
Payment link and optional email
POST /api/v1/payment-links
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET
Payment link and optional email: request
Payment link and optional email: request
{
  "order_id": "ORDER-1002",
  "amount": 2500.00,
  "customer_name": "Customer Name",
  "customer_email": "customer@merchantdomain.com",
  "customer_mobile": "9999999999",
  "payment_method": "UPI",
  "payment_expires_at": "2026-06-11 18:30:00",
  "send_email": true
}
Payment link and optional email: response
Payment link and optional email: response
{
  "success": true,
  "payment_id": "PAY202606100101029999",
  "request_ref": "R202606100101029999",
  "order_id": "ORDER-1002",
  "amount": 2500,
  "fee_amount": 50,
  "net_amount": 2450,
  "payment_expires_at": "2026-06-11 18:30:00",
  "status": "Received",
  "payment_origin": "payment_link",
  "payment_url": "{BASE_URL}/pay/<token>",
  "email_sent": true
}
Active payment methods
Active payment methods
GET /api/v1/payment-methods
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET
Active payment methods: response
Active payment methods: response
{
  "success": true,
  "data": {
    "payment_methods": [
      {
        "code": "IMPS",
        "name": "IMPS",
        "available": true
      },
      {
        "code": "RTGS",
        "name": "RTGS",
        "available": true
      },
      {
        "code": "UPI",
        "name": "UPI",
        "available": true
      }
    ]
  }
}

Auto UPI

Send payment_method: UPI with an active automated UPI route. Open the returned payment_url for the customer and keep the payment_id for status checks. The payment provider confirms the outcome; the customer does not submit a UTR.

Depending on the route, the customer may see a QR code, an app option, or a provider-hosted checkout. NRPS stores the provider-confirmed UTR when available. Your original order_id identifies the order in your system; your integration should use the NRPS payment_id to check the specific payment and use a verified webhook or authenticated status result to confirm the outcome.

Checkout

Checkout request
Checkout request
POST /api/v1/payments
Content-Type: application/json

{
  "order_id": "ORDER-1001",
  "amount": 1250.00,
  "customer_name": "Customer Name",
  "customer_mobile": "9999999999",
  "payment_method": "UPI",
  "return_url": "https://merchant.example.com/success",
  "failure_url": "https://merchant.example.com/failed"
}
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
amount
For a new request, required amount in Indian rupees: 10.00 means ten rupees, not ten paise. In a response, this is the original request amount.
customer_name
Optional customer name for the request.
customer_mobile
Optional customer phone number. Send it as text to preserve the digits.
payment_method
Method code, such as UPI, IMPS, or RTGS. For UPI, the merchant's route determines whether checkout is manual or automated. In a response, this identifies the relevant method.
return_url
Optional full URL on your site for the customer to return to. A browser redirect is not proof of payment.
failure_url
Optional full URL on your site for the unsuccessful result where the checkout flow supports it.

Frequently Asked Questions

How do I request Auto UPI?

Send UPI as the preferred method. NRPS uses the active UPI route configured for your merchant.

Customer checkout, provider refresh and cancellation

Customer Handling

  1. Redirect the customer to payment_url.
  2. Customer scans the QR and completes payment.
  3. The payment page checks status automatically while open.
  4. Your backend should wait for the merchant webhook, or poll status as a backup.

Status Check

Use status APIs when the customer returns to your site or when your system needs to reconcile an open request. For automated UPI, checking status can trigger a provider status refresh if the request is still open.

GET /api/v1/payments/{payment_id}
GET /api/v1/payment-requests/{request_ref}

Cancel And Recreate

If the customer abandons checkout, wants to change order details, or needs a fresh QR, cancel the open automated UPI request and create a new one. Do not reuse the old payment URL after cancellation.

POST /api/v1/payments/{payment_id}/cancel
POST /api/v1/payment-requests/{request_ref}/cancel

Cancellation is allowed only before the request reaches a final state. If payment has already been confirmed, the cancel API returns an error and your system should use the latest status/webhook result.

Source Of Truth

The final merchant-facing source of truth is the NRPS webhook sent to your configured webhook URL. Status APIs are useful for polling and recovery, but your order should be finalized only after verified API status or webhook confirmation from NRPS.

Complete HTTP and JSON Examples

Active payment methods
Active payment methods
GET /api/v1/payment-methods
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET
Auto UPI checkout
Auto UPI checkout
POST /api/v1/payments
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET
Auto UPI checkout: request
Auto UPI checkout: request
{
  "order_id": "ORDER-1001",
  "amount": 1250.00,
  "customer_id": "CUST-1001",
  "customer_name": "Customer Name",
  "customer_email": "customer@merchantdomain.com",
  "customer_mobile": "9999999999",
  "return_url": "https://merchant.example.com/payment/success",
  "failure_url": "https://merchant.example.com/payment/failed",
  "payment_method": "UPI",
  "payment_expires_at": "2026-06-11 18:30:00"
}
Auto UPI checkout: response
Auto UPI checkout: response
{
  "success": true,
  "payment_id": "PAY202606100101019999",
  "request_ref": "R202606100101019999",
  "order_id": "ORDER-1001",
  "amount": 1250,
  "fee_amount": 25,
  "net_amount": 1225,
  "payment_expires_at": "2026-06-11 18:30:00",
  "status": "Received",
  "payment_origin": "checkout",
  "payment_url": "{BASE_URL}/pay/<token>",
  "email_sent": false,
  "environment": "live"
}

Check Payment Status

Find an attempt by its NRPS payment ID

Status lookup endpoints
Status lookup endpoints
GET /api/v1/payments/{payment_id}
GET /api/v1/payment-requests/{request_ref}
Status lookup: response
Status lookup: response
{
  "success": true,
  "request": {
    "status": "Approved",
    "request_ref": "R202606100101019999",
    "payment_id": "PAY202606100101019999",
    "order_id": "ORDER-1001",
    "payment_method": "UPI",
    "amount": "1250.00",
    "fee_amount": "25.00",
    "net_amount": "1225.00",
    "payment_expires_at": "2026-06-11 18:30:00"
  },
  "payment": {
    "paid_amount": "1250.00",
    "utr": "123456789012",
    "payment_date": "2026-06-10 01:30:00",
    "verification_status": "Verified",
    "verified_at": "2026-06-10 01:40:00",
    "remarks": "Payment approved"
  }
}
success
true means this API action succeeded, not necessarily that the customer paid. false means the request failed; read the error details.
request
The original payment request details.
status
Current state of the payment or service described by this response. Received is not a paid result; Approved records approval.
request_ref
NRPS request reference returned at creation. Keep it for traceability and endpoints that explicitly ask for it.
payment_id
NRPS payment identifier returned at creation. Save it and use it to check this payment attempt.
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
payment_method
Method code, such as UPI, IMPS, or RTGS. For UPI, the merchant's route determines whether checkout is manual or automated. In a response, this identifies the relevant method.
amount
For a new request, required amount in Indian rupees: 10.00 means ten rupees, not ten paise. In a response, this is the original request amount.
fee_amount
Fee charged on this payment, in rupees.
net_amount
Payment amount minus the fee, in rupees.
payment_expires_at
Optional expiry when creating the request. Use YYYY-MM-DD HH:MM:SS. In a response, this is the recorded link expiry; individual routes may apply a shorter checkout window.
payment
Payment and verification details when available.
paid_amount
Amount recorded as paid, in rupees.
utr
Bank transaction reference. Treat it as text, not a number. It may be absent before confirmation.
payment_date
Recorded time of payment.
verification_status
Whether the payment has been verified.
verified_at
Recorded time verification took place.
remarks
Human-readable note about the verification.

Frequently Asked Questions

Which ID should I use?

Use the returned NRPS payment ID to look up a particular payment attempt.

Status Values
ReceivedPayment request has been created and customer action is pending.
Pending VerificationCustomer submitted UTR/proof and review is pending.
ApprovedPayment has been verified and accepted.
RejectedPayment was reviewed and rejected.
FailedPayment failed or was manually failed.
SettledPayment was included in a posted standard payout. Older records may reflect the legacy settlement workflow.
Payment ID lookup: full example
Example
GET /api/v1/payments/{payment_id}
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET

Response:

Example
{
  "success": true,
  "payment_id": "PAY202606100101019999",
  "request_ref": "R202606100101019999",
  "order_id": "ORDER-1001",
  "amount": 1250,
  "utr": "123456789012",
  "payment_expires_at": "2026-06-11 18:30:00",
  "payment_origin": "checkout",
  "status": "Approved",
  "status_name": "Approved",
  "submitted_at": "2026-06-10 01:30:00",
  "reviewed_at": "2026-06-10 01:40:00"
}

API errors are always returned as JSON. Browser/payment-page errors are shown as branded HTML error pages so customers do not see raw system messages.

Request reference lookup: full example
Example
GET /api/v1/payment-requests/{request_ref}
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET

Response:

Example
{
  "success": true,
  "request": {
    "status": "Approved",
    "request_ref": "R202606100101019999",
    "payment_id": "PAY202606100101019999",
    "order_id": "ORDER-1001",
    "payment_method": "IMPS",
    "payment_origin": "checkout",
    "amount": "1250.00",
    "payment_expires_at": "2026-06-11 18:30:00",
    "created_at": "2026-06-10 01:20:00"
  },
  "payment": {
    "paid_amount": "1250.00",
    "utr": "123456789012",
    "payment_date": "2026-06-10 01:30:00",
    "verification_status": "Verified",
    "verified_at": "2026-06-10 01:40:00",
    "remarks": "Payment approved"
  }
}

Complete HTTP and JSON Examples

Authenticated status lookup
Authenticated status lookup
GET /api/v1/payments/{payment_id}
GET /api/v1/payment-requests/{request_ref}
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET

Cancel a Payment

Use cancellation for an open Auto UPI request on a route that supports it, for example when the customer abandons checkout or needs a new request. A final payment cannot be cancelled. If cancellation succeeds and payment is still required, use a fresh request and do not reuse the cancelled URL.

Check availability for the selected route

Cancellation endpoints
Cancellation endpoints
POST /api/v1/payments/{payment_id}/cancel
POST /api/v1/payment-requests/{request_ref}/cancel
Cancellation: response
Cancellation: response
{
  "success": true,
  "payment_id": "PAY202606100101019999",
  "request_ref": "R202606100101019999",
  "order_id": "ORDER-1001",
  "status": "Failed",
  "provider_status": "In Process",
  "message": "Payment request cancelled."
}
success
true means this API action succeeded, not necessarily that the customer paid. false means the request failed; read the error details.
payment_id
NRPS payment identifier returned at creation. Save it and use it to check this payment attempt.
request_ref
NRPS request reference returned at creation. Keep it for traceability and endpoints that explicitly ask for it.
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
status
Current state of the payment or service described by this response. Received is not a paid result; Approved records approval.
provider_status
Status reported by the provider, when available. Use the NRPS status to decide how to update the order.
message
Human-readable outcome or explanation. For a support request, this is the full issue description you supply.

Frequently Asked Questions

Can I assume cancellation succeeded?

Check the cancellation response or look up the payment status before treating the attempt as cancelled.

Balance Summary

This report summarizes your merchant's approved and settled collections. Use it to reconcile collections and fees over a period. It does not tell you whether an individual payment succeeded or how much you can withdraw; use payment status for the first and the portal ledger or payout screen for the second.

Endpoint and request

Balance summary endpoint
Balance summary endpoint
POST /api/v1/balance-summary
Balance summary: request
Balance summary: request
{
  "start_date": "2026-05-01 00:00:00",
  "end_date": "2026-05-03 23:59:59",
  "type": "daily"
}
start_date
Optional start of the report period, formatted YYYY-MM-DD HH:MM:SS.
end_date
Optional end of the report period, in the same format. For a full day, use 23:59:59 on the final date.
type
Choose daily for a day-by-day breakdown or consolidated for a combined total.

Frequently Asked Questions

Is this the status of a single payment?

No. Use the payment status endpoint to look up an individual attempt.

Full balance request and response
Example
POST /api/v1/balance-summary
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET

Default request:

Example
{}

Filtered daily request:

Example
{
  "start_date": "2026-05-01 00:00:00",
  "end_date": "2026-05-03 23:59:59",
  "type": "daily"
}

Response:

Example
{
  "success": true,
  "data": {
    "today": {
      "gross_collection": 15000,
      "fees": 300,
      "net_collection": 14700,
      "settled": 10000,
      "unsettled": 5000,
      "transactions": 3
    },
    "overall": {
      "gross_collection": 85000,
      "settled": 70000,
      "unsettled": 15000,
      "transactions": 20
    }
  }
}

Supported type values:

  • consolidated
  • daily

Service Status

Use this check before starting checkout if your system needs to verify NRPS availability. It checks the service, not the result of a payment or the availability of every payment route.

Endpoint and response

Service status endpoint
Service status endpoint
GET /api/v1/service-status
Service status: response
Service status: response
{
  "success": true,
  "service": "Nirmaata Reconciliation and Provisioning System (NRPS)",
  "status": "live",
  "database": "ok",
  "timestamp": "2026-06-27T10:30:00+05:30"
}
success
true means this API action succeeded, not necessarily that the customer paid. false means the request failed; read the error details.
service
Name of the application being checked.
status
Current state of the payment or service described by this response. Received is not a paid result; Approved records approval.
database
Reported database health; ok means the check passed.
timestamp
Date and time of the event or check. The offset at the end shows its time zone.

Frequently Asked Questions

Does a healthy service status confirm payment?

No. Check the payment status or a verified webhook for the transaction outcome.

Support API

Create a support ticket

Create support ticket endpoint
Create support ticket endpoint
POST /api/v1/support/tickets
Create support ticket: request
Create support ticket: request
{
  "category": "failed_transaction",
  "priority": "high",
  "request_id": "R202606100101019999",
  "utr": "180127144274",
  "subject": "Customer debited but payment not approved",
  "message": "Customer has shared bank confirmation, but the payment is still pending."
}
category
Required ticket category: failed_transaction, refund, technical, settlement, payout, or other.
priority
Optional urgency; defaults to normal. This example uses high.
request_id
For failed_transaction, supply the NRPS request reference associated with the issue. Both this field and the UTR are required in that case.
utr
Bank transaction reference. Treat it as text, not a number. It may be absent before confirmation.
subject
Required short title summarizing the issue.
message
Human-readable outcome or explanation. For a support request, this is the full issue description you supply.
API error: response
API error: response
{
  "success": false,
  "error_code": "DUPLICATE_UTR",
  "message": "This UTR has already been submitted"
}
success
true means this API action succeeded, not necessarily that the customer paid. false means the request failed; read the error details.
error_code
Machine-readable error identifier. For example, DUPLICATE_UTR means the reference was already submitted.
message
Human-readable outcome or explanation. For a support request, this is the full issue description you supply.

Frequently Asked Questions

What should I include when reporting a payment issue?

Include the payment ID, environment, and an explanation. Do not include API secrets or webhook signing secrets.

Ticket request and response

Merchants can raise support tickets through API for failed transactions, refunds, technical issues, settlement queries, payout queries, or general support.

Example
POST /api/v1/support/tickets
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET

Failed transaction tickets require both request_id and utr.

Example
{
  "category": "failed_transaction",
  "priority": "high",
  "request_id": "R202606100101019999",
  "utr": "180127144274",
  "subject": "Customer debited but payment not approved",
  "message": "Customer has shared bank confirmation, but the payment is still pending.",
  "contact_name": "Merchant Support",
  "contact_email": "support@merchant.example.com"
}

Response:

Example
{
  "success": true,
  "ticket_reference": "SUP202606271030001234",
  "status": "open",
  "category": "failed_transaction",
  "created_at": "2026-06-27 10:30:00"
}

Supported category values:

Example
failed_transaction, refund, technical, settlement, payout, other

Webhooks

Verify the signature against the raw request body before updating an order. Use the event ID to deduplicate deliveries.

NRPS sends merchant updates when a payment reaches a reportable outcome through staff review, provider confirmation, or reconciliation. The customer returning to your site does not replace that update.

  1. X-Nirmaata-Webhook-Id identifies the event. Save it so the same event does not credit an order twice.
  2. X-Nirmaata-Webhook-Timestamp is the sent time in Unix seconds. Use the exact header value to build the signature input.
  3. X-Nirmaata-Webhook-Signature is the signature to compare with yours. Use the signing secret for the matching test or live environment.
  4. The raw body is the exact text received before parsing JSON. Verify it first, then read the event and update the matching payment.
Signature headers
X-Nirmaata-Webhook-Id: evt_example
X-Nirmaata-Webhook-Timestamp: 1780000000
X-Nirmaata-Webhook-Signature: sha256={hmac}
Signature input

Compute HMAC-SHA256 over the timestamp, a period, and the raw body, using the signing secret for the environment. Compare the result with the received signature.

Webhook Payload JSON

Payment webhook: payload
Payment webhook: payload
{
  "event": "payment.approved",
  "event_id": "evt_9f4b6e2d7c8a1b2c3d4e5f60",
  "payment_id": "PAY202606100101019999",
  "request_ref": "R202606100101019999",
  "order_id": "ORDER-1001",
  "amount": "1250.00",
  "utr": "123456789012",
  "status": "approved",
  "timestamp": "2026-06-10T01:40:00+00:00"
}
event
Type of payment update, for example payment.approved. Use it to choose how to update the matching order.
event_id
Unique event identifier. Store it to detect duplicate deliveries.
payment_id
NRPS payment identifier returned at creation. Save it and use it to check this payment attempt.
request_ref
NRPS request reference returned at creation. Keep it for traceability and endpoints that explicitly ask for it.
order_id
Your system's order reference. Required when creating a request. Use a fresh value for a new sandbox case; store it alongside the NRPS payment ID.
amount
For a new request, required amount in Indian rupees: 10.00 means ten rupees, not ten paise. In a response, this is the original request amount.
utr
Bank transaction reference. Treat it as text, not a number. It may be absent before confirmation.
status
Current state of the payment or service described by this response. Received is not a paid result; Approved records approval.
timestamp
Date and time of the event or check. The offset at the end shows its time zone.
Webhook signature: calculation
Webhook signature: calculation
sha256=<hmac_sha256(timestamp + "." + raw_json_payload, webhook_secret)>

Frequently Asked Questions

Why isn't my webhook signature matching?

Verify with the signing secret for the correct environment and the exact raw request body. Re-encoding parsed JSON can change the bytes and invalidate the comparison.

What should I do if a webhook is missing or duplicated?

Deduplicate by event ID. If delivery is missing, look up the payment by ID and reconcile its status before making any credit or creating another attempt.

Delivery and retries

Verify the signature and use the event ID to avoid processing a delivery twice. Retries reuse the event ID, timestamp, payload, and signature. Retry actions are recorded in the audit trail.

Full event example and verification

Sent when a submitted payment is approved, rejected, or failed by an authorized reviewer.

Headers:

Example
Content-Type: application/json
X-Nirmaata-Webhook-Id: <event_id>
X-Nirmaata-Webhook-Timestamp: <unix_timestamp>
X-Nirmaata-Webhook-Signature: sha256=<signature>

Payload:

Example
{
  "event": "payment.approved",
  "event_id": "evt_9f4b6e2d7c8a1b2c3d4e5f60",
  "payment_id": "PAY202606100101019999",
  "request_ref": "R202606100101019999",
  "order_id": "ORDER-1001",
  "amount": "1250.00",
  "utr": "123456789012",
  "status": "approved",
  "timestamp": "2026-06-10T01:40:00+00:00"
}

Webhook event names follow the final payment decision, for example:

  • payment.approved
  • payment.rejected
  • payment.failed

Signature:

Example
sha256=<hmac_sha256(timestamp + "." + raw_json_payload, merchant_webhook_secret)>

Merchants should reject webhooks with old timestamps to reduce replay risk.

Webhook retries are performed by the platform if delivery fails. The same event ID, timestamp, payload, and signature are reused for retry attempts.

Every retry action is stored in the audit trail. Delivery attempts are also visible in webhook logs.

Complete HTTP and JSON Examples

Webhook headers
Webhook headers
X-Nirmaata-Webhook-Id: evt_xxx
X-Nirmaata-Webhook-Timestamp: 1780000000
X-Nirmaata-Webhook-Signature: sha256={hmac}

Error Codes

API failures return a stable error_code along with the HTTP status and readable message. Integrations should use error_code for program logic and show message only where suitable.

{
  "success": false,
  "error_code": "DUPLICATE_UTR",
  "message": "This UTR has already been submitted"
}
HTTPError CodeMeaning
400BAD_REQUESTRequest body or request format is invalid.
401INVALID_API_CREDENTIALSAPI key or API secret is missing or incorrect.
401UNAUTHORIZEDRequest is not authorized.
403IP_NOT_ALLOWEDMerchant API key is not allowed from the request IP.
403DOMAIN_NOT_ALLOWEDMerchant API key is not allowed from the request domain.
403FORBIDDENAuthenticated user or API client cannot perform this action.
404PAYMENT_NOT_FOUNDPayment page, payment request, or status record was not found.
404NOT_FOUNDRequested resource was not found.
410PAYMENT_EXPIREDPayment link has expired.
419INVALID_SECURITY_TOKENSecurity token is invalid or expired.
422VALIDATION_FAILEDRequired fields or values failed validation.
422INVALID_AMOUNTAmount is missing, non-numeric, zero, or negative.
422AMOUNT_LIMIT_EXCEEDEDAmount exceeds the platform allowed limit.
422AMOUNT_NOT_SUPPORTEDAmount is outside the configured route/provider limit.
422METHOD_NOT_AVAILABLENo active route is available for the requested payment method.
422INVALID_PAYMENT_METHODPayment method or mapped collection account is invalid.
422INVALID_UTRUTR/reference format is invalid for the selected payment method.
422DUPLICATE_UTRUTR/reference has already been submitted or used.
422INVALID_EXPIRYPayment expiry value is invalid or not in the future.
422SUPPORT_REFERENCE_REQUIREDFailed transaction support requests require request ID and UTR.
422SUPPORT_DETAILS_REQUIREDSupport subject or message is missing.
422INVALID_SUPPORT_CATEGORYSupport category is not supported.
500SERVER_ERRORTemporary internal error.
502UPSTREAM_ERRORExternal dependency failed.
503SERVICE_UNAVAILABLEService is temporarily unavailable.
Metadata and allowed values
Example
GET /api/v1/meta

Returns normalized status and option values from the database.

Frequently Asked Questions

Does this change the payment ID I should store?

No. Keep using the NRPS payment ID to identify a payment attempt.

Security & Audit

  • Never expose API secret or webhook secret in frontend code.
  • Verify every webhook signature before provisioning an order.
  • Reject old webhook timestamps to reduce replay risk.
  • Use merchant IP/domain whitelisting where possible.
  • Treat duplicate UTR as suspicious and do not provision twice.
  • All API attempts are logged, including invalid credentials and blocked IP/domain attempts.
  • API errors stay JSON for integrations. Browser/payment-page errors are shown as branded HTML pages.
API audit and security logging

NRPS maintains:

  • audit_logs for login, OTP, approvals, rejections, failed marking, webhook retries, settlement actions, payout actions, user/role/permission changes, payment-link creation, and customer UTR submission.
  • api_request_logs for all API attempts, valid or invalid.

This helps trace malicious attempts, duplicate submissions, operator actions, and reconciliation decisions.

Frequently Asked Questions

Does this change the payment ID I should store?

No. Keep using the NRPS payment ID to identify a payment attempt.

Settlements & Payouts

Use the portal to review settlement and payout records. These records do not change the payment ID used by your integration.

Settlement and payout references

Settlements and payouts are operational objects managed inside the NRPS portal.

  • Standard Payout records an already-completed transfer and marks the included eligible transactions as settled.
  • Manual Payout records an already-completed transfer against the available ledger balance without changing individual payment statuses.
  • Neither action sends funds. Use the ledger to see the remaining balance.
  • A settlement_reference identifies a settlement record. A payout_reference identifies the payout or transfer record.
  • Historical linked payouts may still show which locked settlements they covered. New Standard and Manual Payouts do not create those links.

These references are currently portal/reporting references. Merchant payment APIs continue to use payment_id, request_ref, and order_id.

Frequently Asked Questions

Does this change the payment ID I should store?

No. Keep using the NRPS payment ID to identify a payment attempt.

Provider Operations

These operations are provider-specific. Confirm that your merchant is eligible before integrating them.

Provider Failed Log API

This endpoint is available only for merchants with an active Auto UPI route. It returns provider-side reconciliation records for the merchant's assigned UPI provider.

Example
GET /api/v1/auto-upi/failed-logs
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET

Query filters:

  • from_date
  • to_date
  • utr
  • order_id
  • request_ref
  • status
  • provider_status
  • page
  • limit

Example:

Example
GET /api/v1/auto-upi/failed-logs?from_date=2026-06-01%2000:00:00&to_date=2026-06-30%2023:59:59&status=unmatched

Response:

Example
{
  "success": true,
  "data": {
    "page": 1,
    "limit": 25,
    "total": 1,
    "records": [
      {
        "id": 101,
        "provider": {
          "code": "merchant_upi_provider",
          "name": "Merchant UPI QR"
        },
        "order_id": "ORDER-1001",
        "request_ref": "R202606100101019999",
        "provider_reference_id": "ORDER-1001",
        "utr": "180127144274",
        "provider_status": "Approved",
        "amount": "1250.00",
        "processing_status": "unmatched",
        "processing_message": "No matching NRPS transaction found",
        "payload": {
          "orderId": "ORDER-1001",
          "rrn": "180127144274",
          "transactionStatus": "Approved",
          "amount": "1250.00"
        },
        "received_at": "2026-06-10 01:40:00"
      }
    ]
  }
}
Claim No-Order Transaction

Use this API when a customer reports a successful UPI debit, but the provider record reached NRPS without a matching merchant order reference.

First search the no-order/failed logs by RRN or UTR. Then create the normal NRPS payment request for the customer order. Finally, claim the provider transaction against that request.

Example
POST /api/v1/auto-upi/no-order-claims
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET

Request:

Example
{
  "rrn": "620976771343",
  "transaction_reference": "PAY202608220101019999",
  "claim_notes": "Customer shared bank confirmation with same RRN."
}

Fields:

  • rrn: Mandatory provider RRN/UTR.
  • transaction_reference: Mandatory NRPS payment_id, order_id, or request_ref.
  • claim_notes: Optional note for internal audit reference.

Validation:

  • RRN must exist for the merchant's assigned Auto UPI provider.
  • Transaction reference must belong to the same merchant.
  • The merchant must have the same provider assigned for UPI.
  • Amount must match.
  • RRN must not already be claimed.

Response:

Example
{
  "success": true,
  "message": "No-order transaction has been claimed and attached successfully.",
  "data": {
    "rrn": "620976771343",
    "transaction_reference": "PAY202608220101019999",
    "claim_status": "claimed"
  }
}
Mark No-Order Transaction As Refunded

Use this API when a no-order transaction was received by mistake and the merchant has refunded the customer instead of creating a customer order.

Example
POST /api/v1/auto-upi/no-order-refunds
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
X-Api-Secret: YOUR_API_SECRET

Request:

Example
{
  "rrn": "620976771343",
  "refund_amount": "1500.00",
  "refund_method": "UPI",
  "refund_reference": "REF620976771343",
  "refund_notes": "Customer paid by mistake and refund was processed."
}

Fields:

  • rrn: Mandatory provider RRN/UTR.
  • refund_reference: Mandatory bank refund reference.
  • refund_method: Mandatory. Accepted values are UPI, IMPS, NEFT, RTGS, or OTHER.
  • refund_amount: Optional for full refund. If blank, NRPS uses the provider transaction amount.
  • refund_notes: Optional note for internal audit reference.

Validation:

  • RRN must exist for the merchant's assigned Auto UPI provider.
  • RRN must not already be claimed, linked, or refunded.
  • Refund amount must be greater than zero.
  • Refund amount cannot be greater than the provider transaction amount.

Response:

Example
{
  "success": true,
  "message": "No-order transaction has been marked as refunded.",
  "data": {
    "rrn": "620976771343",
    "refund_reference": "REF620976771343",
    "claim_status": "refunded"
  }
}

Frequently Asked Questions

Does this change the payment ID I should store?

No. Keep using the NRPS payment ID to identify a payment attempt.