Skip to main content

bKash

Payment method's logo bkash.svg
Payment method's typeE-wallets
CountryBangladesh
CurrencyBDT

To initiate a purchase with the bKash payment method, add the following parameters to your request:

ParameterTypeRequiredDescription
merchantIdintegerRequiredYour unique merchant ID that you got from Amanpay when integrating.
paymentIdstringRequiredPayment ID unique within your system.
amountnumberRequiredPurchase amount in major currency units, e.g., pass 10.52 for 10 dollars 52 cents or 11.00 for 11 dollars.
currencystringRequiredCode of the purchase currency in the ISO-4217 alpha-3 format.
customerIdstringOptionalCustomer's ID unique within your system. If not passed in the request, the value from the customerEmail parameter is used.
customerEmailstringRequiredCustomer's email.
paymentMethodstringOptionalPayment method's code. Pass bkash 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.
bkashNumberstringOptionalCustomer's mobile phone number associated with their bKash e-wallet. If not passed, the customer will have to enter their mobile phone number themselves on the checkout page. Pass this parameter in the request together with the paymentMethod parameter.
returnUrlstringOptionalURL to redirect the customer to after they've completed a payment.

You can also add any optional parameters described in the Create a purchase request section to your request.

Here is an example of a request to initiate a purchase with the bKash payment method.

curl -X POST "https://gateway.amanpay.io/payments/purchases/initiate" \
-H "Content-Type: application/json" \
-H "Authorization: b78d07bc3e51899182339bfb39c85ab8629085c80f9b2312444669a3bdd78cc0522a1bcca50ede6be3a90fcf489100304cde09e14fa51a175a5fed0e36f6c26b" \
-d '{
"merchantId": 1758378,
"paymentId": "payment_812",
"amount": 250.51,
"currency": "BDT",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com",
"paymentMethod": "bkash",
"bkashNumber": "185927571757184"
}'

To initiate a payout with the bKash payment method, add the following parameters to your request:

ParameterTypeRequiredDescription
merchantIdintegerRequiredYour unique merchant ID that you got from Amanpay when integrating.
paymentIdstringRequiredPayment ID unique within your system.
amountnumberRequiredPayout amount in major currency units, e.g., pass 10.52 for 10 dollars 52 cents or 11.00 for 11 dollars.
currencystringRequiredCode of the payout currency in the ISO-4217 alpha-3 format.
customerIdstringOptionalCustomer's ID unique within your system. If not passed in the request, the value from the customerEmail parameter is used.
customerEmailstringRequiredCustomer's email.
customerNamestringRequiredCustomer's full name.
paymentMethodstringRequiredPayment method's code. Pass bkash in this parameter.
recipientTypestringRequiredCustomer's account type. Pass mobile_wallet in this parameter.
recipientMobileNumberstringRequiredCustomer's mobile phone number associated with their bKash e-wallet.

You can also add any optional parameters described in the Create a payout request section to your request.

Here is an example of a request to initiate a payout with the bKash payment method.

curl -X POST "https://gateway.amanpay.io/payments/payouts/initiate" \
-H "Content-Type: application/json" \
-H "Authorization: b78d07bc3e51899182339bfb39c85ab8629085c80f9b2312444669a3bdd78cc0522a1bcca50ede6be3a90fcf489100304cde09e14fa51a175a5fed0e36f6c26b" \
-d '{
"merchantId": 1758378,
"paymentId": "payment_812",
"amount": 250.51,
"currency": "BDT",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com",
"customerName": "Mark Cooper",
"paymentMethod": "bkash",
"recipientType": "mobile_wallet",
"recipientMobileNumber": "185927571757184"
}'