Payment
- The user enters the amount.
- The user is redirecting to the payment page.
- The user makes a payment on the Nagad side - enters wallet number, PIN, sends money.
- Paykassma sends a postback to the merchant's side.
- Funds are credited to the user’s balance on the merchant platform.
Payment window integration (plugin)
Example of a link to open a Nagad payment window:
|
---|
wallet_type=nagad_api currency_code=BDT Available languages (lang): en, bn
Pay attention to the description of the parameters payment_url_success_id / payment_url_fail_id/ payment_url_pending_id and success_url / fail_url / pending_url.
To use payment_url_success_id / payment_url_fail_id / payment_url_pending_id you need to send the URLs to Paykassma support and use the received IDs in the parameters.
To use success_url / fail_url / pending_url you must use hashing URLs ( For more details on hashing click here).
For the description of all the plugin parameters click here.
API integration
Creating payment
http://api.{server_URL}/api/v1/payment/create/nagad_api?secret={pluginapi_secret}
Request method:
POST
Format:
JSON
Parameters:
Name | Type | Required | Description |
secret | string | yes | API access key. |
Body:
Name | Type | Required | Max Length | Description |
amount | float | yes | limited by min and max. | Payment amount. |
currency | string | yes | 3 | Currency code. |
label | string | yes | 190 | The unique identifier (ID) of the user who makes the payment. |
custom_transaction_id | string | yes | 190 | Transaction ID in the Client's system. Must be unique. |
success_url | string | yes | no limit | Redirect URL to the success page after the payment. |
fail_url | string | yes | no limit | Redirect URL to the fail page after the payment. |
cancel_url | string | yes | no limit | Redirect URL to cancel page. |
{ "custom_transaction_id": "custom_transaction_1", "amount": 100, "currency": "BDT", "label": "test_user", "success_url": "https://success_url.com", "fail_url": "https://fail_url.com", "cancel_url": "https://cancel_url.com" }
{ "status": "ok", "payment_url": "Nagad_URL"// Nagad payment page }
{ 'status': 'fail', 'message': 'MESSAGE' }
Deposit postback
For the general documentation on post backs click here.
Example of a postback for a Nagad deposit
{ "signature": "56beb10ead1cd49475f1e16dd668a29fff3d4fb9", "wallet_type": "nagad_api", "amount": 600, "currency_code": "BDT", "label": "234", "direction": "ingoing", "created_datetime": "2023-08-20 19:04:08", "access_key": "FQ9jMwrNSkFbyMNqYFf6Ed4xeKmjHK", "additional_data": [ { "activated_datetime": "2023-08-20 22:04:07", "exchanger_identifier": null, "comment": "", "amount": "600", "currency_code": "BDT", "wallet_type": "nagad_api", "stockpiling_id": 1061, "transaction_id": "52AD1EA4", "transaction_type": 1, "plugin_custom_order_id": "1234", "withdrawal_id": null, "withdrawal_status": null, "account_number": "", "account_name": "", "account_email": "", "bank_details": { "bank_code": "", "branch_code": "" } } ] }
The Paykassma server is waiting for a response in json {"status": "ok"} response code 200, otherwise, when receiving a different response, Paykassma will forward the postback with a certain frequency.
Repeated postbacks must also be answered with {"status":"ok"} response code 200.
Withdrawals for users
Payments to users are made by using Nagad method ( for more details on Nagad method click here).