Skip to main content
POST
mapi.php (direct create payment compatibility endpoint)

Body

application/x-www-form-urlencoded
pid
string
required

Merchant ID

type
enum<string>
required

Payment channel type in Epay compatibility mode.

Available options:
alipay,
wxpay,
creditcard,
crypto,
paynow
out_trade_no
string
required

Merchant order number (must be unique under one merchant)

notify_url
string<uri>
required

Merchant async callback URL

name
string
required

Product name

money
string
required

Order amount, decimal string, must be greater than 0

clientip
string
required

Client IP address

sign
string
required

Lowercase MD5 signature

sign_type
enum<string>
required

Signature type. Current compatibility implementation only supports MD5.

Available options:
MD5
return_url
string<uri>

Merchant sync return URL

money_type
string
default:CNY

Currency code. Defaults to CNY when omitted.

param
string

Pass-through parameter returned in callbacks and order queries

display_merchant_name
string

Optional per-payment merchant display name shown on Kyren intermediate payment pages

Maximum string length: 80
device
string
default:pc

Device identifier passed to gateway (e.g. pc)

channel_param
string

Optional JSON string for channel-specific fields. Credit card mode supports fields such as: cardNo, cardExpireMonth, cardExpireYear, cardSecurityCode, billFirstName, billLastName, billPhone, billAddress, billCountry, billState, billCity, billZip, email.

userId
string

Optional merchant user identifier passed to the payment gateway when supported.

Response

200 - application/json

Epay-compatible create payment result

code
enum<integer>
Available options:
1
trade_no
string

Platform order ID

out_trade_no
string

Merchant order number

payurl
string | null

Redirect URL for browser/app payment flows

qrcode
string | null

QR code payload or H5 payment URL depending on channel

img
string | null

QR image URL generated from qrcode