Welcome To Nagorikpay Docs Last updated: 2026-09-04
Nagorikpay is a simple and Secure payment automation tool which is designed to use personal account as a payment gateway so that you can accept payments from your customer through your website where you will find a complete overview on how Nagorikpay works and how you can integrate Nagorikpay API in your website
API Introduction
Nagorikpay Payment Gateway enables Merchants to receive money from their customers by temporarily redirecting them to www.Nagorikpay.com. The gateway is connecting multiple payment terminal including card system, mobile financial system, local and International wallet. After the payment is complete, the customer is returned to the merchant's site and seconds later the Merchant receives notification about the payment along with the details of the transaction. This document is intended to be utilized by technical personnel supporting the online Merchant's website. Working knowledge of HTML forms or cURL is required. You will probably require test accounts for which you need to open accounts via contact with Nagorikpay.com or already provided to you.
API Operation
REST APIs are supported in two environments. Use the Sandbox environment for testing purposes, then move to the live environment for production processing. When testing, generate an order url with your test credentials to make calls to the Sandbox URIs. When you're set to go live, use the live credentials assigned to your new signature key to generate a live order url to be used with the live URIs. Your server has to support cURL system. For HTML Form submit please review after cURL part we provide HTML Post method URL also
The total amount payable. Please note that you should skip the the trailing zeros in case the amount is a natural number.
Yes
10 or 10.50 or 10.6
success_url
URL to which the customer will be returned when the payment is made successfully. The customer will be returned to the last page on the Merchant's website where he should be notify the payment successful.
Yes
https://yourdomain.com/sucess.php
cancel_url
URL to return customer to your product page or home page.
Yes
https://yourdomain.com/cancel.php
webhook_url
IPN callback URL
No
https://yourdomain.com/webhook.php
metadata
Optional extra data (JSON) to attach to the payment — for example your internal order or invoice reference.
No
{"order_id":"AB-123"}
Variables Needs For Payment Verify
Field Name
Description
Required
Example Values
transaction_id
Transaction id received as a query parameter from the success URL provided during payment creation.
Yes
OVKPXW165414
Headers Details
Header Name
Value
Content-Type
application/json
API-KEY
App key From Brands
Integration
You can integrate our payment gateway into your PHP Laravel WordPress WooCommerce sites.
Payment Link (where customers will complete their payment)
Error Response
status
bool
FALSE
message
String
Message associated with the error response
Completing Payment Page task you will be redirected to success or cancel page based on transaction status with the following Query Parameters:
yourdomain.com/(success/cancel)?transactionId=******&paymentMethod=***&paymentAmount=**.**&paymentFee=**.**&status=pending or success or failed
When you create a payment you may pass a webhook_url. Nagorikpay then POSTs the outcome of that payment to your URL automatically — you never have to poll for it. Every delivery is recorded in your merchant panel → Webhook Logs, where you can inspect the exact request your server received (or missed) and resend it at any time.
How & when the webhook fires
Immediately after checkout — the customer finishes paying on the gateway page. If the payment method confirmed the money instantly you will receive status = completed. Methods that need manual review (bank transfer / QR) send status = pending first and the money is confirmed later.
When a pending payment auto-verifies — once the money is confirmed inside the review window, Nagorikpay sends a second webhook with status = completed.
A cancelled or abandoned payment never triggers a webhook — the customer is simply returned to your cancel_url.
Payload fields
Nagorikpay sends a form-urlencoded POST to your webhook_url. The same fields are also appended to the redirect back to your success_url, so the two always agree.
Field
Description
paymentMethod
The payment method used (e.g. bkash, nagad, card).
transactionId
Unique Nagorikpay transaction id for this payment.
method_transaction_id
The payment-provider reference the customer entered (e.g. the bKash/Nagad TrxID), when the method captured one. Empty for methods without one.
paymentAmount
The amount the customer paid.
paymentFee
Fee deducted for this payment.
status
Outcome: completed | pending | failed.
Handle & verify
Reply to the webhook as fast as possible with any HTTP 2xx — Nagorikpay treats a 2xx response as delivered. Do the heavy work afterwards. Before fulfilling an order it is safest to confirm the payment with our verify endpoint (see Verify Request above). A minimal PHP receiver looks like:
<?php
// 1) Acknowledge fast — Nagorikpay treats any 2xx as delivered.
http_response_code(200);
// 2) Capture what was POSTed.
$paymentMethod = $_POST['paymentMethod'] ?? '';
$transactionId = $_POST['transactionId'] ?? '';
$methodTransactionId = $_POST['method_transaction_id'] ?? '';
$paymentAmount = $_POST['paymentAmount'] ?? '';
$status = $_POST['status'] ?? '';
// 3) Confirm via api/payment/verify before fulfilling (see "Verify Request").
// Then mark the order as paid in your own database.
Delivery logs & resend (merchant panel)
Open Webhook Logs from your merchant sidebar to see every delivery for your account: target URL, timestamp, the exact payload that was POSTed and the HTTP response code/body your server returned.
Click Resend to replay a delivery — Nagorikpay re-sends the exact stored payload to the same URL (you do not provide the URL again) and logs the new attempt as a fresh entry so you can confirm it arrived.
The default view shows only the webhooks that point to your own site. Confirmations Nagorikpay sends back to itself to close its Invoice / Add Funds flows appear under Platform Callbacks and normally need no action from you.
Modules & Plugins
Ready-made modules and plugins to drop Nagorikpay into your favourite platform. Download, configure your API keys and start accepting payments.
Seamlessly connect nagorikPay to Active CMS websites for managing payments with ease. Perfect for businesses using Active CMS to run their online services. Video here
Enhance Market BOB platforms by integrating our secure payment solution. Accept payments instantly and automate your order management workflow. Video here
Nagorikpay provides a ready-made Laravel module for developers. Easily integrate payment gateway APIs into your Laravel projects with minimal coding effort. Video here