mapi.php (direct create payment compatibility endpoint)
Creates (or reuses) an order directly and returns Epay-style response fields.
For QR-style channels, response includes qrcode and img.
For redirect-style channels, response includes payurl.
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.
Body
Merchant ID
Payment channel type in Epay compatibility mode.
alipay, wxpay, creditcard, crypto, paynow Merchant order number (must be unique under one merchant)
Merchant async callback URL
Product name
Order amount, decimal string, must be greater than 0
Client IP address
Lowercase MD5 signature
Signature type. Current compatibility implementation only supports MD5.
MD5 Merchant sync return URL
Currency code. Defaults to CNY when omitted.
Pass-through parameter returned in callbacks and order queries
Optional per-payment merchant display name shown on Kyren intermediate payment pages
80Device identifier passed to gateway (e.g. pc)
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.
Response
Epay-compatible create payment result
- Option 1
- Option 2