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
| Header | Required | Type | Description |
|---|---|---|---|
merchantNo | Yes | String | Merchant ID assigned by the platform |
sign | Yes | String | Base64-encoded RSA digital signature of the request body |
Request Body Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
timestamp | Yes | Long | 1772880000000 | Current epoch timestamp in milliseconds |
merchantOrderNo | Yes | String | 202603070001 | Unique order reference generated by the merchant system |
amount | Yes | String | 220.00 | Transaction amount (maximum 2 decimal places) |
payType | Yes | String | BKASH | Payment method channel; fixed value: BKASH |
notifyUrl | Yes | String | https://api.merchant.com/payin/notify | Asynchronous webhook callback URL |
name | No | String | Rahim Uddin | Customer full name |
mobile | No | String | 01712345678 | Customer mobile number (10-11 digits starting with 01) |
email | No | String | user@example.com | Customer email address |
remark | No | String | Test Order | Custom 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
| Field | Type | Description |
|---|---|---|
code | Integer / String | Response code: 1 indicates success, 0 indicates failure |
msg | String | Message description |
data | Object | Payload data object (null if code is 0) |
data.merchantNo | String | Merchant ID |
data.merchantOrderNo | String | Merchant order number |
data.platOrderNo | String | Platform transaction number |
data.amount | String | Order transaction amount |
data.fee | String | Service processing fee |
data.payUrl | String | Cashier checkout page redirect URL |
data.expireTime | String | Order expiration timestamp (yyyy-MM-dd HH:mm:ss) |
data.status | String | Order status:0: Created1: Expired2: Failed3: Succeeded |
