curl --request POST \
--url https://api.kyrenpay.com/epay/submit.php \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data pid=merch_001 \
--data type=alipay \
--data out_trade_no=order_20260409001 \
--data notify_url=https://merchant.example.com/pay/notify \
--data return_url=https://merchant.example.com/pay/return \
--data 'name=AI Credits Package' \
--data money=99.00 \
--data money_type=CNY \
--data 'display_merchant_name=Campaign Store' \
--data param=user_42 \
--data sign=fb7f5f742f89eb1f137fbc293f2bf42a \
--data sign_type=MD5import requests
url = "https://api.kyrenpay.com/epay/submit.php"
payload = {
"pid": "merch_001",
"type": "alipay",
"out_trade_no": "order_20260409001",
"notify_url": "https://merchant.example.com/pay/notify",
"return_url": "https://merchant.example.com/pay/return",
"name": "AI Credits Package",
"money": "99.00",
"money_type": "CNY",
"display_merchant_name": "Campaign Store",
"param": "user_42",
"sign": "fb7f5f742f89eb1f137fbc293f2bf42a",
"sign_type": "MD5"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
pid: 'merch_001',
type: 'alipay',
out_trade_no: 'order_20260409001',
notify_url: 'https://merchant.example.com/pay/notify',
return_url: 'https://merchant.example.com/pay/return',
name: 'AI Credits Package',
money: '99.00',
money_type: 'CNY',
display_merchant_name: 'Campaign Store',
param: 'user_42',
sign: 'fb7f5f742f89eb1f137fbc293f2bf42a',
sign_type: 'MD5'
})
};
fetch('https://api.kyrenpay.com/epay/submit.php', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kyrenpay.com/epay/submit.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "pid=merch_001&type=alipay&out_trade_no=order_20260409001¬ify_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Fnotify&return_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Freturn&name=AI%20Credits%20Package&money=99.00&money_type=CNY&display_merchant_name=Campaign%20Store¶m=user_42&sign=fb7f5f742f89eb1f137fbc293f2bf42a&sign_type=MD5",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kyrenpay.com/epay/submit.php"
payload := strings.NewReader("pid=merch_001&type=alipay&out_trade_no=order_20260409001¬ify_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Fnotify&return_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Freturn&name=AI%20Credits%20Package&money=99.00&money_type=CNY&display_merchant_name=Campaign%20Store¶m=user_42&sign=fb7f5f742f89eb1f137fbc293f2bf42a&sign_type=MD5")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kyrenpay.com/epay/submit.php")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("pid=merch_001&type=alipay&out_trade_no=order_20260409001¬ify_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Fnotify&return_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Freturn&name=AI%20Credits%20Package&money=99.00&money_type=CNY&display_merchant_name=Campaign%20Store¶m=user_42&sign=fb7f5f742f89eb1f137fbc293f2bf42a&sign_type=MD5")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kyrenpay.com/epay/submit.php")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "pid=merch_001&type=alipay&out_trade_no=order_20260409001¬ify_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Fnotify&return_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Freturn&name=AI%20Credits%20Package&money=99.00&money_type=CNY&display_merchant_name=Campaign%20Store¶m=user_42&sign=fb7f5f742f89eb1f137fbc293f2bf42a&sign_type=MD5"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "签名验证失败"
}{
"code": 42901,
"message": "Too many requests"
}submit.php (redirect checkout compatibility endpoint)
Creates (or reuses) an Epay-compatible payment and returns HTTP 302 redirect to the hosted payment page. This endpoint also accepts GET with the same parameters.
Paydify:商户一次性加密货币通道绑定 Paydify 时使用 type=crypto(不是 paydify)。
返回 302 到 Kyren 本地 /epay/redirect/{orderId},入口受理时不创建上游支付。
买家在本地页选择 App / 网络并确认 USDT 报价后,才创建上游支付和展示二维码。
无需商户提交 App、网络或 Paydify 专用 channel_param。目标环境须已部署且渠道已开通。
Signature algorithm:
- Remove
signandsign_type, and drop empty values. - Sort parameters by key in ascending order.
- Join as
k=vwith&, append merchant API key. - MD5 the final string and compare in lowercase.
curl --request POST \
--url https://api.kyrenpay.com/epay/submit.php \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data pid=merch_001 \
--data type=alipay \
--data out_trade_no=order_20260409001 \
--data notify_url=https://merchant.example.com/pay/notify \
--data return_url=https://merchant.example.com/pay/return \
--data 'name=AI Credits Package' \
--data money=99.00 \
--data money_type=CNY \
--data 'display_merchant_name=Campaign Store' \
--data param=user_42 \
--data sign=fb7f5f742f89eb1f137fbc293f2bf42a \
--data sign_type=MD5import requests
url = "https://api.kyrenpay.com/epay/submit.php"
payload = {
"pid": "merch_001",
"type": "alipay",
"out_trade_no": "order_20260409001",
"notify_url": "https://merchant.example.com/pay/notify",
"return_url": "https://merchant.example.com/pay/return",
"name": "AI Credits Package",
"money": "99.00",
"money_type": "CNY",
"display_merchant_name": "Campaign Store",
"param": "user_42",
"sign": "fb7f5f742f89eb1f137fbc293f2bf42a",
"sign_type": "MD5"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
pid: 'merch_001',
type: 'alipay',
out_trade_no: 'order_20260409001',
notify_url: 'https://merchant.example.com/pay/notify',
return_url: 'https://merchant.example.com/pay/return',
name: 'AI Credits Package',
money: '99.00',
money_type: 'CNY',
display_merchant_name: 'Campaign Store',
param: 'user_42',
sign: 'fb7f5f742f89eb1f137fbc293f2bf42a',
sign_type: 'MD5'
})
};
fetch('https://api.kyrenpay.com/epay/submit.php', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kyrenpay.com/epay/submit.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "pid=merch_001&type=alipay&out_trade_no=order_20260409001¬ify_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Fnotify&return_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Freturn&name=AI%20Credits%20Package&money=99.00&money_type=CNY&display_merchant_name=Campaign%20Store¶m=user_42&sign=fb7f5f742f89eb1f137fbc293f2bf42a&sign_type=MD5",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kyrenpay.com/epay/submit.php"
payload := strings.NewReader("pid=merch_001&type=alipay&out_trade_no=order_20260409001¬ify_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Fnotify&return_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Freturn&name=AI%20Credits%20Package&money=99.00&money_type=CNY&display_merchant_name=Campaign%20Store¶m=user_42&sign=fb7f5f742f89eb1f137fbc293f2bf42a&sign_type=MD5")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kyrenpay.com/epay/submit.php")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("pid=merch_001&type=alipay&out_trade_no=order_20260409001¬ify_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Fnotify&return_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Freturn&name=AI%20Credits%20Package&money=99.00&money_type=CNY&display_merchant_name=Campaign%20Store¶m=user_42&sign=fb7f5f742f89eb1f137fbc293f2bf42a&sign_type=MD5")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kyrenpay.com/epay/submit.php")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "pid=merch_001&type=alipay&out_trade_no=order_20260409001¬ify_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Fnotify&return_url=https%3A%2F%2Fmerchant.example.com%2Fpay%2Freturn&name=AI%20Credits%20Package&money=99.00&money_type=CNY&display_merchant_name=Campaign%20Store¶m=user_42&sign=fb7f5f742f89eb1f137fbc293f2bf42a&sign_type=MD5"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "签名验证失败"
}{
"code": 42901,
"message": "Too many requests"
}Body
Merchant ID
Payment channel type in Epay compatibility mode. crypto 按商户绑定选择 Satogate 或 Paydify;Paydify 不新增独立 type 值,也不能通过请求参数覆盖绑定。
alipay, wxpay, creditcard, crypto, paynow Merchant order number (must be unique under one merchant)
Merchant async callback URL
Merchant sync return URL
Product name
Order amount, decimal string, must be greater than 0. Paydify 下此值为 money_type 对应的商品计价金额,不是应付 USDT 数量;买家费用按现有规则计算。
Lowercase MD5 signature
Signature type. Current compatibility implementation only supports MD5.
MD5 Currency code. Defaults to CNY when omitted. Paydify 在本地页按此计价币种锁定有效 USDT 报价,报价不可用时不回退提交 USD。
Pass-through parameter returned in callbacks and order queries
Optional per-payment merchant display name shown on Kyren intermediate payment pages
80Optional merchant user identifier passed to the payment gateway when supported.
Optional device hint. For Alipay/WeChat, reusing the same out_trade_no with a different device flow can be rejected.
pc, mobile Optional JSON string for non-card channel-specific fields. For type=creditcard, the raw value participates in signature verification but is ignored after verification. Do not send card details or billing/contact data in this field; the buyer enters card information on a hosted payment page.