Skip to content

Merchant API

Merchant Information Query

Call this API to query merchant information, including: balance, merchant name, etc.

  • Request Method: GET
  • API Path: http://[API Domain]/api/v1/mch/info
  • Request Example: http://[API Domain]/api/v1/mch/info?mch_id=[Merchant ID]&sign=[Signature]
  • Request Parameters:
ParameterTypeRequiredDescription
mch_idnumberYesMerchant ID, note this parameter is also signed
noncestringYesRandom string, at least 6 characters
timestampnumberYesUNIX timestamp, 10 digits
signstringYesParameter signature. See Signature Algorithm
  • Response:
Parameter NameTypeDescription
idnumberMerchant ID
namestringMerchant Name
created_atstringMerchant Creation Time

Response Example:

json
{
  "code": 200,
  "payload": {
    "id": 20,
    "name": "Demo Merchant",
    "created_at": "2022-11-22 17:37:52"
  }
}

Merchant Balance Query

Call this API to query the merchant's balance

  • Request Method: GET
  • API Path: http://[API Domain]/api/v1/mch/balance
  • Request Parameters:
ParameterTypeRequiredDescription
mch_idnumberYesMerchant ID, note this parameter is also signed
currencystringYesCurrency code, see System Currency Codes
noncestringYesRandom string, at least 6 characters
timestampnumberYesUNIX timestamp, 10 digits
signstringYesParameter signature. See Signature Algorithm
  • Response:
ParameterDescription
balanceMerchant Balance

Response Example:

json
{
  "code": 200,
  "payload": {
    "balance": 23456
  }
}

Released under the MIT License.