Nagad
Receive payments from customers using their nagad wallet.
Send funds directly to a recipient's nagad wallet.
Available through Checkout and H2H integrations.
Nagad is a digital wallet and mobile financial service available in Bangladesh. Amanpay supports Nagad for both customer payments and payouts.
For purchases, customers can pay using their nagad wallet through Checkout or H2H integration.
For payouts, funds are sent directly to the recipient's nagad wallet using their mobile number.
Purchase
Nagad purchases are available through Amanpay Checkout and Host-to-Host (H2H) integration.
| Parameter | Value |
|---|---|
| URL | https://gateway.amanpay.io |
| API endpoint | /payments/purchases/initiate |
| HTTP request method | POST |
| Request body format | JSON |
Purchase · Checkout
To initiate a purchase with the Nagad payment method using Amanpay Checkout, add the following parameters to your request.
Request parameters
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Required | HTTP header indicating the media type of the resource sent in the request body. |
Authorization | calculated | Required | For more details about request signature generation, see the About the signature section. |
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantId | integer | Required | Your unique merchant ID that you got from Amanpay when integrating. |
paymentId | string | Required | Payment ID unique within your system. |
amount | number | Required | The amount is specified in major units and may include decimal places, for example, 500.50. |
currency | string | Required | Code of the purchase currency in the ISO-4217 alpha-3 format. |
customerId | string | Conditional | Customer's ID unique within your system. If not passed in the request, the value from the customerEmail parameter is used.Either customerEmail or customerId must be provided. |
customerEmail | string | Conditional | Customer's email. Either customerEmail or customerId must be provided. |
customerIp | string | Optional | Customer's IP address. |
paymentMethod | string | Optional | Payment method's code. Pass nagad in this parameter to preselect this payment method for your customer on the checkout page. If not passed, the customer will have to choose the payment method themselves on the checkout page. |
nagadNumber | string | Optional | Customer's mobile phone number associated with their Nagad e-wallet. If not passed in the request, the customer will have to enter their mobile phone number themselves on the checkout page. Pass this parameter together with the paymentMethod parameter. |
returnUrl | string | Optional | URL to redirect the customer to after they've completed a payment. |
{
"merchantId": 1758378,
"paymentId": "payment_812",
"amount": 250.00,
"currency": "BDT",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com",
"paymentMethod": "nagad"
}
{
"transactionId": "1003592",
"paymentID": "ORDER_100001_117_100",
"status": "PENDING",
"amount": 2000,
"currency": "BDT",
"redirectUrl": "https://page.amanpay.io/checkout/example-session-id",
"paymentType": "purchase"
}
{
"result_code": "DUPLICATE_PAYMENT_ID",
"result_message": "Payment ID already exists"
}
For the full list of possible responses, see Responses & Callbacks.
Purchase · H2H
Nagad purchases are available through Host-to-Host integration.
Request parameters
To initiate a purchase with the Nagad payment method via H2H integration, add the following parameters to your request.
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Required | HTTP header indicating the media type of the resource sent in the request body. |
Authorization | calculated | Required | For more details about request signature generation, see the About the signature section. |
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantId | integer | Required | Your unique merchant ID that you got from Amanpay when integrating. |
paymentId | string | Required | Payment ID unique within your system. |
amount | number | Required | The amount is specified in major units and may include decimal places, for example, 500.50. |
currency | string | Required | Code of the purchase currency in the ISO-4217 alpha-3 format. |
customerId | string | Conditional | Customer's ID unique within your system. If not passed in the request, the value from the customerEmail parameter is used.Either customerEmail or customerId must be provided. |
customerEmail | string | Conditional | Customer's email. Either customerEmail or customerId must be provided. |
paymentMethod | string | Required | Payment method's code. Pass nagad. |
nagadNumber | string | Optional | Customer's mobile phone number associated with their Nagad e-wallet. |
returnUrl | string | Optional | URL to redirect the customer to after they've completed a payment. |
{
"merchantId": 1758378,
"paymentId": "payment_812",
"amount": 2000.00,
"currency": "BDT",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com",
"paymentMethod": "nagad",
"nagadNumber": "01121111111"
}
{
"transactionId": "1002858",
"paymentID": "ORDER_100001_316_852",
"status": "PENDING",
"amount": 2000,
"currency": "BDT",
"paymentType": "purchase"
}
{
"result_code": "DUPLICATE_PAYMENT_ID",
"result_message": "Payment ID already exists"
}
For the full list of possible responses, see Responses codes and messages.
Channel 1 · Nagad payment URL
P2C
H2H
Nagad payment URL
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Required | HTTP header indicating the media type of the resource sent in the request body. |
Authorization | calculated | Required | For more details about request signature generation, see the About the signature section. |
| Parameter | Type | Required | Description |
|---|---|---|---|
transactionId | integer | Required | Payment ID within the AmanPay payment platform. |
operationId | integer | Optional | Operation ID within the AmanPay payment platform. |
additional_data | object | Required | Additional data required to continue the purchase flow. |
additional_data.PaymentData | string | Required | Payment link that the customer must open to continue the purchase. |
status | string | Required | Purchase status. PENDING means no additional data is required to continue the purchase flow. |
{
"additional_data": {
"PaymentData": "https://payment.mynagad.com:30000/check-out/MDgxNDE3MDcyNzU2NS42ODYwMDUxMTMyNjUzOTkuQVBCOVlBNkZETjMuZmI4MWNkMjUzMDU4OGIxYTUyMmQ="
},
"operationId": 653725,
"transactionId": 102073,
"status": "PENDING"
}
The Nagad payment details will be provided in the callback and in the payment status response Responses & Callbacks
Channel 2 · Nagad payment details
P2P
H2H
Nagad payment details
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Required | HTTP header indicating the media type of the resource sent in the request body. |
Authorization | calculated | Required | For more details about request signature generation, see the About the signature section. |
| Parameter | Type | Required | Description |
|---|---|---|---|
transactionId | integer | Required | Payment ID within the AmanPay payment platform. |
operationId | integer | Optional | Operation ID within the AmanPay payment platform. |
additional_data | object | Required | Contains additional data required to complete the purchase. |
additional_data.PaymentData | string | Required | Customer's payment details required to complete the purchase. |
additional_fields | string[] | Required | List of additional fields that the merchant must provide to complete the purchase. |
status | string | Required | Purchase status. SPECIFICATION means that additional payment details are required to continue the purchase flow. |
{
"additional_data": {
"PaymentData": "0222222222"
},
"additional_fields": [
"TrxId"
],
"operationId": 102383,
"transactionId": 102540,
"status": "SPECIFICATION"
}
Upon receiving such a callback, you should provide Amanpay with the data it needs by sending it a request as follows:
| Parameter | Value |
|---|---|
| URL | https://gateway.amanpay.io |
| API endpoint | /payments/purchases/specify/{operationId} |
| HTTP request method | POST |
| Request body format | JSON |
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Required | HTTP header indicating the media type of the resource sent in the request body. |
Authorization | calculated | Required | For more details about request signature generation, see the About the signature section. |
| Parameter | Type | Required | Description |
|---|---|---|---|
transactionId | integer | Required | Unique transaction ID assigned to the payment. |
merchantId | integer | Required | Your unique merchant ID provided by Amanpay during integration. |
additionalFields | object | Required | Additional data required for the payment. |
additionalFields.TrxId | string | Required | Transaction ID assigned by the payment provider. |
{
"transactionId": 62861,
"merchantId": 1758378,
"additionalFields": {
"TrxId": "12345"
}
}
Payout
To initiate a payout with the Nagad payment method, add the following parameters to your request.
| Parameter | Value |
|---|---|
| URL | https://gateway.amanpay.io |
| API endpoint | /payments/payouts/initiate |
| HTTP request method | POST |
| Request body format | JSON |
Request parameters
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Required | HTTP header indicating the media type of the resource sent in the request body. |
Authorization | calculated | Required | For more details about request signature generation, see the About the signature section. |
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantId | integer | Required | Your unique merchant ID that you got from Amanpay when integrating. |
paymentId | string | Required | Payment ID unique within your system. |
amount | number | Required | The amount is specified in major units and may include decimal places, for example, 500.50. |
currency | string | Required | Code of the payout currency in the ISO-4217 alpha-3 format. |
customerId | string | Conditional | Customer's ID unique within your system. If not passed in the request, the value from the customerEmail parameter is used.Either customerEmail or customerId must be provided. |
customerEmail | string | Conditional | Customer's email. Either customerEmail or customerId must be provided. |
customerName | string | Required | Customer's full name. |
paymentMethod | string | Required | Payment method's code. Pass nagad in this parameter. |
recipientType | string | Required | Customer's account type. Pass mobile_wallet in this parameter. |
recipientMobileNumber | string | Required | Customer's mobile phone number associated with their Nagad e-wallet. |
{
"merchantId": 1758378,
"paymentId": "payment_812",
"amount": 500.00,
"currency": "BDT",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com",
"customerName": "Mark Cooper",
"paymentMethod": "nagad",
"recipientType": "mobile_wallet",
"recipientMobileNumber": "285937571757185"
}
{
"transactionId": "1003685",
"paymentID": "payment_812",
"status": "PENDING",
"amount": 500,
"currency": "BDT",
"paymentType": "payout"
}
{
"result_code": "DUPLICATE_PAYMENT_ID",
"result_message": "Payment ID already exists"
}
For the full list of possible responses, see Responses & Callbacks.