Nagad: pay from the Nagad wallet
Connect the Nagad merchant payment gateway. The merchant ID, the two keys Nagad gives you, server whitelisting for live, testing and common errors.
Nagad needs the most preparation of the payment providers, because Nagad gives you the technical details by e-mail and checks your server before live payments. Start early.
What it is#
The Nagad merchant payment gateway lets a buyer pay from their Nagad wallet at your checkout. The buyer pays on the Nagad page and returns to your store. It suits shops with a Nagad merchant account and many Nagad users among their buyers.
What you need#
- A Nagad merchant account with the payment gateway approved. After onboarding Nagad e-mails you the integration details. Nagad does not publish its API publicly.
- Four fields in Jukto:
| Field in Jukto | What it is |
|---|---|
| Merchant ID | Your Nagad merchant identifier |
| Merchant number | Your merchant wallet number, 01XXXXXXXXX (optional) |
| Merchant private key | Your own private key (secret) |
| Nagad public key | The public key of Nagad (a block of text) |
- For Live: Nagad must whitelist your store address and the Jukto server address. Without it Nagad may not answer.
Where to find your keys#
- 1
Get the integration details from Nagad
After your merchant account is approved, Nagad e-mails the integration details. If you did not get them, ask your Nagad account manager.
- 2
Copy the merchant details
Copy your Merchant ID and, if you want, your merchant wallet number into Merchant ID and Merchant number.
- 3
Paste the two keys
Nagad gives two keys: your own Merchant private key and the Nagad public key. Paste the private key into Merchant private key and the public key into Nagad public key, as the whole text including the BEGIN and END lines if they have them.
- 4
Ask for whitelisting before live
For Live, ask Nagad to whitelist your store address and the Jukto server address. The provider page shows both under Addresses to register at the provider.
- 5
Match the mode
Choose Sandbox (testing) or Live to match the keys. Nagad sends sandbox details separately after you apply.
What Jukto does#
- Keys. Saved encrypted for this website only. The private key is a secret and is never shown again.
- Payment. Jukto signs and encrypts the request with your keys, opens the payment with Nagad and sends the buyer to the Nagad page. The amount is in BDT.
- Verification. Nagad has no server notice. When the buyer returns, Jukto asks Nagad directly and accepts only a "Success" answer with the same order and amount.
- Order. On success the payment shows Paid. A cancelled or aborted payment shows Cancelled, a failed one Failed, and the order stays unpaid.
- Refunds. Nagad has no refund call for merchants. Refund the buyer in your Nagad panel, then record the return on the order. Jukto shows "This provider has no refund API. Refund it in the provider panel and record the return on the order."
Text version of the diagram
- Jukto opens the payment to Buyer pays on Nagad
- Buyer pays on Nagad to Buyer returns
- Buyer returns to Jukto asks Nagad to verify
- Jukto asks Nagad to verify to Success, same order and amount?
- Success, same order and amount? to Order marked paid (Yes)
- Success, same order and amount? to Not paid: stays unpaid (No)
Test and turn on#
- 1
Open the provider
Go to Dashboard > Tools > Integrations, open the Payments group and choose Nagad.
- 2
Choose the mode and fill the fields
Pick Sandbox (testing) or Live, fill the four fields and press Save.
- 3
Press Test connection
Jukto checks that both keys can be read, signs a sample, and checks that the Nagad gateway can be reached from the Jukto server.
- 4
Read the result
A pass means the keys are readable and the gateway is reachable. It is not a full check: a real payment is the only full check, and Nagad whitelists server addresses for live.
- 5
Press Turn on
After Nagad confirms the whitelisting, switch to Live, turn it on and place one small real order. Check the Payments list.
Common errors#
| What you see | What it means | What to do |
|---|---|---|
| the Nagad keys could not be read; paste the private key and Nagad public key again as Nagad gave them | A key was copied incompletely | Paste both keys again as whole blocks |
| the keys are readable, but the Nagad sandbox could not be reached from our server | The host did not answer (Sandbox) | Try again later; ask Nagad about the sandbox |
| the keys are readable, but Nagad could not be reached from our server | The host did not answer (Live) | Try again; check with Nagad |
| Nagad answered with data this key cannot read; check the merchant private key | Wrong private key | Paste the private key that belongs to your Merchant ID |
| Nagad did not accept the payment request | Nagad refused the new payment | Read the message that follows; ask Nagad about whitelisting |
| Nagad did not return a payment reference | Nagad answered without a reference | Try again; ask Nagad if it repeats |
| Nagad did not answer the status check | Verification could not reach Nagad | Press Check again on the payment later |
| order id does not match | The answer was for another order | The order stays unpaid; look at the payment in the Nagad panel |
Next#
- Payments overview
- bKash: the other big wallet.
- Integrations overview

Comments (0)
Anyone can comment. Please do not post phone numbers, passwords or customer details.