SKSKPay API Documentation v1Merchant login

SKPay Payment API

Accept PKR pay-ins and send payouts through one simple JSON API. Base URL: https://786wen.tech/api/v1/

1. Authentication & signing

Every request must be POST (status/balance also accept GET), body application/json, with:

Find 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));
}

2. Create pay-in order

POST https://786wen.tech/api/v1/payin.php

FieldRequiredDescription
order_idyesYour unique order reference (max 64 chars)
amountyesPKR amount, string, e.g. "1000.00" (within your limits)
customer_name / customer_mobile / customer_emailnoCustomer details
notify_urlnoYour callback URL (falls back to your default webhook)
return_urlnoWhere the customer returns after paying
signyesSignature

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.

3. Pay-in callback (webhook)

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.

4. Query pay-in

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.

5. Create payout

POST https://786wen.tech/api/v1/payout.php

FieldRequiredDescription
payout_idyesYour unique payout reference
amountyesAmount the beneficiary receives, e.g. "5000.00"
account_nameyesBeneficiary name
account_numberyesWallet / bank account number
bank_codeyesPayment method code, see table below
mobilenoBeneficiary mobile
notify_urlnoCallback URL
signyesSignature

Payment methods (bank_code):

CodeNameaccount_number format
EASYPAISAEasyPaisa11-digit mobile, e.g. 03001234567
JAZZCASHJazzCash11-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.

6. Payout callback

{"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.

7. Query payout & balance

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"}}

8. Errors

Errors return {"status":"error","message":"..."} with an HTTP code:

CodeMeaning
400Validation error (missing/invalid field, amount outside limits)
401Invalid API key or signature
402Insufficient balance (payout)
403IP not whitelisted
409Duplicate order_id / payout_id
502Payment channel temporarily unavailable
503Maintenance

© 2026 SKPay