Your clients can pay invoices and store orders from their Nagad account, on Nagad's secure payment page.
Requirements
- RISE 4.2 or newer, with the cron job running.
- A Nagad merchant account with online payment (see Get your credentials).
- Nagad takes BDT only. Amounts with decimals (ex: 10.55) are charged exactly.
Get your credentials
Nagad gives credentials only to approved merchants. There is no self sign-up sandbox.
- Apply as a merchant with the Nagad merchant form (or through your Nagad account manager). Ask for online payment gateway (e-commerce). You need your trade license, TIN, NID, bank details and your website address.
- Nagad asks for your server's public IP address and your website address (ex: https://rise.fairsketch.com/) and adds them to your merchant account. Requests from other addresses are refused.
- Make your key pair (on any computer with OpenSSL):
openssl genrsa -out merchant_private.pem 2048 openssl rsa -in merchant_private.pem -pubout -out merchant_public.pem
Send or upload merchant_public.pem to Nagad. Keep merchant_private.pem secret: its content goes in Merchant Private Key. - Nagad sends you the Merchant ID, the Nagad Public Key and your merchant wallet number, first for the sandbox (with a test account number, OTP and PIN), then for live after your sandbox tests pass.
Paste the keys with or without the -----BEGIN ... KEY----- lines. Sandbox and live keys are different: change all of them when you go live.
Setup
- Install and activate the plugin in Settings > Plugins.
- Go to Settings > Payment methods and edit Nagad.
- Enter the Merchant ID, Merchant Private Key and Nagad Public Key. Merchant Number (your Nagad merchant wallet number) is optional.
- Turn on Testing environment to take test payments with your sandbox details. Turn it off for real payments with your live details.
- Turn on Available on Invoice and save.
There is nothing to set for notifications. A payment is recorded when the client comes back from Nagad. If that is interrupted, the cron job checks the payment with Nagad again.
Testing
Turn on Testing environment and enter your sandbox details. Pay an invoice in BDT with the sandbox account number, OTP and PIN that Nagad gave you.