pid + sign instead of x-api-key. Build sign as the lowercase MD5 of k=v&... plus the merchant key.
Algorithm
- Remove
signandsign_type. - Drop parameters with empty values.
- Sort the remaining parameters by ascending key in ASCII key order.
- Join each pair as
k=v, separated with&. - Append the merchant key directly to the joined string.
- Compute MD5 and output lowercase hexadecimal.
&key= segment. Append the merchant key directly after the joined parameter string.
Example
Input parameters:sign_type, dropping empty values, and sorting by key:
merchant_secret, sign this exact string:
sign is the lowercase MD5 hexadecimal digest of that signing string.
Verification checklist
- Use the Kyren-issued
pidand merchant key for the merchant account receiving the order. - Exclude both
signandsign_typebefore signing. - Drop empty values before sorting.
- Sort by raw parameter key, not by display label or JSON order.
- Keep decimal values as strings, for example
"9.99". - Send
sign_typeasMD5when the endpoint requires it, but do not include it in the signing string.
Common mistakes
- Adding
&key=before the merchant key. - Including
sign_typein the signing string. - Keeping blank optional parameters in the signing string.
- Signing a rounded or numeric money value instead of the original decimal string.
- Sending
x-api-keyto an Epay-compatible endpoint.
submit.php API reference for the redirect checkout endpoint schema.