EPay-compatible integration

Parameters and MD5 signing for the traditional EPay (Dujiaoka) interface.

Endpoint

POST https://api.alsoluna.xyz/payments/epay/v1/order/create-transaction/submit.php

Both GET and POST are accepted, with parameters in the query string or form body, matching the traditional EPay integration style.

Request parameters

ParameterDescription
pidMerchant id
typePayment method, e.g. usdt.tron / usdt.ton / alipay
out_trade_noYour order id
notify_urlAsynchronous notification URL
return_urlSynchronous redirect URL
nameProduct name
moneyAmount (fiat)
signSignature
sign_typeAlways MD5

Signing

The signature is MD5 (traditional EPay style), lowercase hex:

  1. Take every parameter except sign and sign_type
  2. Sort the names in ASCII order and join as key1=value1&key2=value2...
  3. sign = md5(joined + secret_key), lowercase
function sign(params, secretKey) {
  const sorted = Object.keys(params)
    .filter((k) => k !== 'sign' && k !== 'sign_type')
    .sort()
    .map((k) => k + '=' + params[k])
    .join('&')

  return crypto.createHash('md5').update(sorted + secretKey).digest('hex')
}

Behaviour

  • On success the payer is redirected to the hosted checkout; its status endpoint is identical to the Alsopay integration
  • Notification and signature verification are described in "Callback verification"
  • Which payment methods (type) are available depends on the networks and tokens enabled in your environment