Key points
- Enable it under Developers → Epay gateway in the portal. The gateway is https://api.kukopay.com/epay; the numeric pid decides sandbox or live, and each environment has its own 32-character key.
- submit.php (browser redirect) and mapi.php (server call, returns payurl) create an ordinary KukoPay order; api.php?act=order looks one up. The same out_trade_no returns the same order.
- Sign like the reference SDK: drop sign, sign_type and empty values, sort by name, join as k=v&k=v without URL-encoding, append the key, MD5 lowercase.
- money is a bare decimal read in the currency chosen in the portal, with at most two decimals.
- Only a successful payment is notified: a signed GET to notify_url with trade_status=TRADE_SUCCESS. Answer the body success; otherwise it is retried, up to 6 sends in all.
- Epay orders are ordinary orders: refunds, disputes and payouts work as usual, and later events still reach your webhook endpoints.
- Set the order lifetime (default 30 minutes) no longer than your system's own order timeout, or a buyer may pay an order it has already cancelled.
Example
json
{
"code": 1,
"msg": "success",
"trade_no": "TRD_SB_9F3A…",
"payurl": "https://checkout.kukopay.com/checkout?trade_no=TRD_SB_9F3A…&token=…",
"request_id": "req_…"
}