Version 1.0

NationalPay Developer Documentation

Integrate NationalPay Payment Gateway into your website or application using our secure REST APIs. Create payment orders, receive webhook notifications and manage transactions with ease.

REST API JSON Webhook UPI
Base URL
https://gateway.nationalpay.co/api
API Version
v1.0
Authentication
API Key
NationalPay Developer Documentation

Integrate NationalPay Payment Gateway within minutes.


Getting Started

Use your API Key to create payment orders.

Base URL https://gateway.nationalpay.co/api
Request Type POST
Content-Type application/json

Authentication

Every request requires your API Key.

apikey : YOUR_API_KEY

Create Payin Request POST

Endpoint

https://gateway.nationalpay.co/api/pg/create-request
Request Parameters
Parameter Type Required Description
apikey String Yes Your API Key
mobile String Yes Customer Mobile Number
amount Decimal Yes Payment Amount
request_id String Yes Unique Request ID
redirect_url URL Yes Customer Redirect URL
remark1 String No Optional
remark2 String No Optional
Example Request
{
"apikey":"YOUR_API_KEY",
"mobile":"9876543210",
"amount":"100",
"request_id":"ORD10001",
"redirect_url":"https://yourwebsite.com/payment-response",
"remark1":"Test",
"remark2":"Demo"
}
Success Response
{
"status":true,
"message":"Request Created Successfully",
"result":{
"request_id":"ORD10001",
"payment_url":"Payment_link"
}

Payin Callback

After the payment status changes, NationalPay sends a POST request to your configured webhook URL.

Webhook Method : POST
Your Webhook URL : https://yourdomain.com/payment/webhook
Success Response
{
"status": true,
"order_id": "ORD123456",
"amount": "100.00",
"utr": "123456789012",
"status_text": "SUCCESS"
}
Failed Response
{
"status": false,
"order_id": "ORD123456",
"amount": "100.00",
"status_text": "FAILED"
}

Create Payout Request POST

Endpoint

https://gateway.nationalpay.co/api/pg/payout/create-request
Request Parameters
Parameter Type Required Description
apikey String Yes Your API Key
request_id String Yes Unique Request ID
mobile String Yes Customer Mobile Number
amount Decimal Yes Payout Amount
holder_name String Yes Beneficiary Name
bank_name String Yes Beneficiary Bank Name
account_number String Yes Beneficiary Account Number
ifsc String Yes Bank IFSC Code
Example Request
{
"apikey":"YOUR_API_KEY",
"request_id":"PAYOUT10001",
"mobile":"XXXXXXXXXX",
"amount":"500",
"holder_name":"XXXXXXXX",
"bank_name":"State Bank of India",
"account_number":"XXXXXXXX",
"ifsc":"XXXXXXXX"
}
Success Response
{
"success":true,
"message":"The payout request has been successfully initiated.",
"amount":"1000",
"request_id":"PAYOUT10001",
"transaction_id":"TXN20260708123456"
}

Payout Callback

NationalPay sends a callback whenever the payout status changes.

Method : POST
Callback URL : https://yourdomain.com/payout/callback
Success Callback
{
    "status": true,
    "message": "Payout successful. The amount has been transferred.",
    "data": {
        "status": "success",
        "request_id": "PAYOUT10001",
        "transaction_id": "TXN20260708123456",
        "amount": 500.00,
        "charge": 10.00,
        "total_amount": 510.00,
        "transfer_mode": "IMPS",
        "utr": "123456789012"
    }
}
Failed Callback
{
    "status": false,
    "message": "Payout failed.",
    "data": {
        "status": "failed",
        "request_id": "PAYOUT10001",
        "transaction_id": "TXN20260708123456",
        "amount": 500.00,
        "charge": 10.00,
        "total_amount": 510.00,
        "transfer_mode": "IMPS",
        "utr": null
    }
}

Error Codes

The following error codes may be returned by the NationalPay API.

HTTP Code Status Message
200 Success Request Created Successfully
401 Unauthorized Invalid API Key
404 Not Found Order Not Found
422 Validation Failed Required parameters missing or invalid.
500 Server Error Internal Server Error.
Need Integration Support?

Contact our technical team for API integration assistance.

📧 support@nationalpay.in 🌐 www.nationalpay.in 📞 +91 8929566356

© 2026 NationalPay. All Rights Reserved.