Skip to main content
/epay/submit.php is the browser-oriented Epay compatibility endpoint. It creates or reuses a Kyren order and returns HTTP 302 to /epay/redirect/{orderId} or an upstream payment page. Use this path when the customer browser is redirected to checkout. It uses pid + sign, not x-api-key, and end-user browser visits do not require a merchant server IP allowlist.

Parameters

Required parameters:
ParameterDescription
pidKyren-issued merchant Epay-compatible merchant ID.
typePayment type. Supported values include alipay, wxpay, creditcard, crypto, and paynow.
out_trade_noYour merchant order number.
notify_urlMerchant payment result notification URL.
return_urlBrowser return URL after checkout.
nameOrder or product name.
moneyDecimal string amount, for example "9.99".
signEpay-compatible MD5 signature.
sign_typeSignature type, usually MD5.
Optional parameters:
ParameterDescription
money_typeCurrency or money type if provided by your existing integration.
display_merchant_namePer-payment merchant display name shown on Kyren intermediate payment pages.
paramPassthrough merchant metadata returned in notifications.

Example form

<form method="post" action="https://api.kyren.top/epay/submit.php">
  <input type="hidden" name="pid" value="10001" />
  <input type="hidden" name="type" value="alipay" />
  <input type="hidden" name="out_trade_no" value="ORDER_10001" />
  <input type="hidden" name="notify_url" value="https://merchant.example.com/notify" />
  <input type="hidden" name="return_url" value="https://merchant.example.com/return" />
  <input type="hidden" name="name" value="AI credits" />
  <input type="hidden" name="money" value="9.99" />
  <input type="hidden" name="display_merchant_name" value="Campaign Store" />
  <input type="hidden" name="param" value="account_123" />
  <input type="hidden" name="sign" value="lowercase_md5_signature" />
  <input type="hidden" name="sign_type" value="MD5" />
  <button type="submit">Pay</button>
</form>

Notification handling

After payment completes, Kyren sends a GET request to notify_url with: pid, trade_no, out_trade_no, type, name, money, trade_status, param, sign, and sign_type. Verify the signature, process the result idempotently, then return the plain string:
success
See Epay MD5 signature and the submit.php API reference.