Payment API
Tips
- All requests are
Postrequests, and the data format isjson
Brief Description
- Collection payment method
Request URL
/v1/payproPK/payinApi
Request Method
- POST
Header
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| merchantNo | Yes | string | None |
Body
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| tradeNo | Yes | string | Transaction number (should be unique; recommended format: YYYYMMDDHHMMSS + random number) |
| paymentType | Yes | string | Payment type. Optional values: easypaisa, jazzcash. |
| amount | Yes | string | Amount (no decimals allowed, minimum amount is 100 PKR) |
| name | Yes | string | Payer's name |
| mobile | Yes | string | The payer's mobile phone number (a 10-digit number starting with 3 or an 11-digit number starting with 03) must be a real account |
| Yes | string | Payer's email (should use gmail.com domain, e.g., abc@gmail.com) | |
| customerCert | No | string | Payer's identification number (CNIC - 13 digits - format XXXXXYYYYYYZ) with strong validation |
| remark | No | string | Remarks; this field will be returned as is |
| timestamp | Yes | string | Timestamp (e.g., 1715941383720) |
| custId | No | string | Customer ID. It is recommended to use a complex string to represent the user ID, e.g., m2hkCRuTCK5HKpEkA0ok. Note: For large amounts, the same customer ID with the same amount can only appear once within one hour. |
| sign | Yes | string | Except for sign, the remaining fields should be sorted by the first letter to form key1=value1key2=value2, and then use the app secret as salt to perform MD5 encryption. The final sign should be in lowercase. |
| notifyUrl | Yes | string | Asynchronous callback URL |
Example of Request Parameters
{
"amount": "10000",
"tradeNo": "order45692193212we3111",
"notifyUrl": "https://example.com/notify",
"name": "John Doe",
"customerCert": "1730123456789",
"email": "johndoe@gmail.com",
"mobile": "3115112345",
"remark": "Payment for order #456",
"custId": "m2hkCRuTCK5HKpEkA0ok",
"timestamp": "1730431256223",
"sign": "5b161d2dc6f09a061953bf9e062fcbf1"
}
Response Result
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| msg | Yes | string | Request result (when returning "success", it only indicates that this request was successful; it should not be used for merchant-side logic judgment) |
| code | Yes | string | Request response code (when returning "0000", it only indicates that this request was successful; it should not be used for merchant-side logic judgment). For specific error codes, please refer to the business error code enumeration. |
| timestamp | Yes | string | Transaction time |
| success | Yes | string | Transaction result |
| data | Yes | Object | Returned object |
| data.platFormTradeNo | Yes | string | paypro transaction number, unique |
| data.status | Yes | string | Request result; merchants can use it for logical processing. When the result is "0000", it indicates that the transaction is successful; "0015" indicates processing; all others are error codes and can be treated as failures. |
| data.desc | Yes | string | Error description |
| data.remark | Yes | string | Content returned from the request (returned as is) |
Example of Successful Return
{
"msg": "success",
"code": "0000",
"data": {
"platFormTradeNo": "2kvziksxbvxg062d",
"remark": "Payment for order #456",
"status": "0015",
"desc": "CREATED"
},
"success": true,
"timestamp": 1731653732177
}
