Skip to content

Create Pay-in Order (/payin/create)

Description

The merchant invokes this endpoint to initiate a pay-in (collection/deposit) request. The platform creates the transaction and returns a cashier checkout URL (payUrl).


Request Information

  • Endpoint: /payin/create
  • Method: POST
  • Content-Type: application/json; charset=utf-8

HTTP Headers

HeaderRequiredTypeDescription
merchantNoYesStringMerchant ID assigned by the platform
signYesStringBase64-encoded RSA digital signature of the request body

Request Body Parameters

ParameterRequiredTypeExampleDescription
timestampYesLong1772880000000Current epoch timestamp in milliseconds
merchantOrderNoYesString202603070001Unique order reference generated by the merchant system
amountYesString220.00Transaction amount (maximum 2 decimal places)
payTypeYesStringBKASHPayment method channel; fixed value: BKASH
notifyUrlYesStringhttps://api.merchant.com/payin/notifyAsynchronous webhook callback URL
nameNoStringRahim UddinCustomer full name
mobileNoString01712345678Customer mobile number (10-11 digits starting with 01)
emailNoStringuser@example.comCustomer email address
remarkNoStringTest OrderCustom remarks (echoed back in callback)

Request Payload Example

json
{
  "timestamp": 1772880000000,
  "merchantOrderNo": "202603070001",
  "amount": "220.00",
  "payType": "BKASH",
  "notifyUrl": "https://api.merchant.com/payin/notify",
  "name": "Rahim Uddin",
  "mobile": "01712345678",
  "email": "user@example.com",
  "remark": "Test Order"
}

Response Parameters

Success Response

json
{
  "code": 1,
  "msg": "success",
  "data": {
    "merchantNo": "M1639466186292",
    "merchantOrderNo": "202603070001",
    "platOrderNo": "876324486452871168",
    "amount": "220.00",
    "fee": "0",
    "payUrl": "https://gateway.example.com/checkout/876324486452871168",
    "expireTime": "2026-05-05 11:11:11",
    "status": "1"
  }
}

Failure Response

json
{
  "code": 0,
  "msg": "param merchant error"
}

Response Fields Description

FieldTypeDescription
codeInteger / StringResponse code: 1 indicates success, 0 indicates failure
msgStringMessage description
dataObjectPayload data object (null if code is 0)
data.merchantNoStringMerchant ID
data.merchantOrderNoStringMerchant order number
data.platOrderNoStringPlatform transaction number
data.amountStringOrder transaction amount
data.feeStringService processing fee
data.payUrlStringCashier checkout page redirect URL
data.expireTimeStringOrder expiration timestamp (yyyy-MM-dd HH:mm:ss)
data.statusStringOrder status:
0: Created
1: Expired
2: Failed
3: Succeeded

Bangladesh Payment Gateway API Specifications