Pay-In · Pakistan
Less than 1 minute
Request
Pay-in API for collecting payments from customers in Pakistan (country code pk).
- Amounts are whole PKR (no decimals), 50 – 50,000 per transaction.
- See Regional Payment Guide — Pakistan for
methodcodes and extra fields.
Request URL
Domain: Prefer unified host
openapi.toppayment.com(path unchanged); legacy country domain (e.g.global-pk-openapi.toppayment.com) remains available.
| Environment | URL |
|---|---|
| Sandbox | https://openapi.toppayment.com/sandbox/pk/pay/prePay |
| Production | https://openapi.toppayment.com/pk/pay/prePay |
Request header
| Field | Required | Type | Description |
|---|---|---|---|
| Content-Type | M | String | Fixed value: application/json |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
| mchNo | M | String(32) | Merchant number |
| orderNum | M | String(64) | Merchant order number |
| amount | M | Number | Amount in whole PKR (50–50000) |
| productDetail | M | String(100) | Product description |
| method | M | String(16) | Pay-in method — see Pakistan guide |
| timestamp | M | String(13) | Timestamp (milliseconds) |
| customerName | M | String(64) | Customer name |
| customerEmail | M | String(64) | Customer email |
| customerPhone | M | String(32) | Customer phone |
| documentNo | C | String(100) | 13-digit CNIC; required when method=EASYPAISA |
| downNotifyUrl | M | String(255) | Async notification URL |
| redirectUrl | O | String(512) | Redirect URL after payment (cashier) |
| sign | M | String | Signature — see Signature |
Request example
Content-type: application/json
{
"mchNo": "{{mchNo}}",
"orderNum": "PK1234561",
"amount": 500,
"productDetail": "Test product",
"method": "EASYPAISA",
"timestamp": "1749451858772",
"customerName": "Ali Khan",
"customerEmail": "[email protected]",
"customerPhone": "03001234567",
"documentNo": "3520212345671",
"downNotifyUrl": "https://example.com/notify",
"redirectUrl": "https://example.com/return",
"sign": "Generate per signature rules and replace"
}
Response
Response fields match other countries' pay-in APIs. See Pakistan payment guide for method meanings.
