Accept PKR pay-ins and send payouts through one simple JSON API. Base URL: https://786wen.tech/api/v1/
Every request must be POST (status/balance also accept GET), body application/json, with:
X-API-KEY: your_api_keysign in the bodyFind your API key and secret in the merchant panel → My Details.
Signature algorithm: take all body fields except sign, drop empty values, sort keys A-Z, join as key=value with &, append &key=YOUR_API_SECRET, then md5 in lowercase. If there are no fields the string is just key=YOUR_API_SECRET.
Important: send amount as a string with 2 decimals (e.g. "1000.00") and sign the same text you send.
<?php
function skpay_sign($params, $secret) {
unset($params['sign']);
$params = array_filter($params, function ($v) { return $v !== null && $v !== ''; });
ksort($params, SORT_STRING);
$parts = [];
foreach ($params as $k => $v) $parts[] = "$k=$v";
$s = implode('&', $parts);
$s .= ($s === '' ? '' : '&') . 'key=' . $secret;
return strtolower(md5($s));
}
POST https://786wen.tech/api/v1/payin.php
| Field | Required | Description |
|---|---|---|
| order_id | yes | Your unique order reference (max 64 chars) |
| amount | yes | PKR amount, string, e.g. "1000.00" (within your limits) |
| customer_name / customer_mobile / customer_email | no | Customer details |
| notify_url | no | Your callback URL (falls back to your default webhook) |
| return_url | no | Where the customer returns after paying |
| sign | yes | Signature |
Example:
curl -X POST https://786wen.tech/api/v1/payin.php \
-H "Content-Type: application/json" -H "X-API-KEY: skp_xxxxxxxx" \
-d '{"order_id":"INV1001","amount":"1000.00","customer_mobile":"03001234567","notify_url":"https://yoursite.com/cb","sign":"..."}'
Response:
{"status":"success","data":{
"order_id":"INV1001","sk_order_id":"SKP260101120000AB12CD",
"pay_url":"https://786wen.tech/pay.php?o=SKP260101120000AB12CD",
"amount":"1000.00","fee":"50.00","net":"950.00","order_status":"pending"}}
Redirect your customer to pay_url. net is what is credited to your wallet after payment.
When the order is paid we POST JSON to your notify_url:
{"order_id":"INV1001","sk_order_id":"SKP...","status":"paid","amount":"1000.00",
"fee":"50.00","net":"950.00","paid_at":"2026-01-01 12:05:10","sign":"..."}
Verify sign using the same algorithm and your API secret, then respond with the plain text success (HTTP 200). Otherwise we mark it as not delivered; ask support to resend.
POST https://786wen.tech/api/v1/payin_status.php fields: order_id (yours) or sk_order_id, sign.
{"status":"success","data":{"order_id":"INV1001","sk_order_id":"SKP...","order_status":"paid",
"amount":"1000.00","fee":"50.00","net":"950.00","created_at":"...","paid_at":"..."}}
Order statuses: pending, paid, failed, expired.
POST https://786wen.tech/api/v1/payout.php
| Field | Required | Description |
|---|---|---|
| payout_id | yes | Your unique payout reference |
| amount | yes | Amount the beneficiary receives, e.g. "5000.00" |
| account_name | yes | Beneficiary name |
| account_number | yes | Wallet / bank account number |
| bank_code | yes | Payment method code, see table below |
| mobile | no | Beneficiary mobile |
| notify_url | no | Callback URL |
| sign | yes | Signature |
Payment methods (bank_code):
| Code | Name | account_number format |
|---|---|---|
| EASYPAISA | EasyPaisa | 11-digit mobile, e.g. 03001234567 |
| JAZZCASH | JazzCash | 11-digit mobile, e.g. 03001234567 |
Your payout fee is added on top: total_deducted = amount + fee, taken from your available balance.
{"status":"success","data":{"payout_id":"W2001","sk_payout_id":"SKO...","amount":"5000.00",
"fee":"300.00","total_deducted":"5300.00","order_status":"pending"}}
Payouts may require admin approval, so the first status is usually pending.
{"payout_id":"W2001","sk_payout_id":"SKO...","status":"success","amount":"5000.00",
"fee":"300.00","total_deducted":"5300.00","utr":"...","completed_at":"...","sign":"..."}
Final statuses: success, failed, rejected (failed/rejected release the locked funds). Reply success.
POST https://786wen.tech/api/v1/payout_status.php — fields payout_id or sk_payout_id, sign.
POST https://786wen.tech/api/v1/balance.php — only sign (signature of the empty set = md5("key=SECRET")).
{"status":"success","data":{"balance":"12000.00","locked":"5300.00","available":"6700.00"}}
Errors return {"status":"error","message":"..."} with an HTTP code:
| Code | Meaning |
|---|---|
| 400 | Validation error (missing/invalid field, amount outside limits) |
| 401 | Invalid API key or signature |
| 402 | Insufficient balance (payout) |
| 403 | IP not whitelisted |
| 409 | Duplicate order_id / payout_id |
| 502 | Payment channel temporarily unavailable |
| 503 | Maintenance |
© 2026 SKPay