Query the balance

Request

Item

Mandatory

Data Type

Sample

Description

Method

YES

String(5)

31800

Fill in 31800 (EasyCard transaction)

ServiceType

YES

String

BalanceQuery

Selected Scan2Pay Service type

MchId

YES

String

Account0001

Merchant ID provided by intella

TradeKey

YES

String

sha256...hash

Marchant password provided by intella, this password must be encoded by SHA256

CreateTime

YES

String

20180101120000

Request time, the format is "yyyyMMddHHmmss"

Data

Item

Mandatory

Data Type

Sample

Description

DeviceId

YES

String

01301234

Terminal (reader) number

Retry

YES

String

0

Retry times, fill in 0

Response

Header

Item

Data Type

Sample

Description

StatusCode

String(4)

0000

StatusDesc

String

Success

Description of transaction status

Method

String(5)

31800

Payment method code (EasyCard payment is 31800)

ServiceType

String

BalanceQuery

Selected Scan2Pay Service type

MchId

String

Account0001

Merchant ID

ResponseTime

String

20180101120000

Transaction response time, the format is “yyyyMMddHHmmss”

Data

欄位

型別

範例

說明

EZCardID

String

934528053

Internal card number

EZCardType

String

00

PersonalProfile

String

00

CardNumberForPrint

String

934528053

Balance

String

4000

Balance

TerminalTXNNumber

String

225417

HostSerialNumber

String

225417

ExpiryDate

String

20191230140820

CPUPurseVersion

String

00

BankCode

String

00

AreaCode

String

01

TXNResult

String

Success

Transaction result

Retry

String

0

ErrorCode

String

000000

NewAESKey

String

f49f778a27...bbe6

EZCardPurseID

String

0000000000000000

API Example

Request

{
  "Header": {
    "Method": "31800",
    "ServiceType": "BalanceQuery",
    "MchId": "myMchId",
    "TradeKey": "9af15b336e6a9619928537df30b2e6a2376569fcf9d7e773eccede65606529a0",
    "CreateTime": "20180715104430"
  },
  "Data": "{\"DeviceId\":\"01304187\",\"Retry\":\"0\"}"
}

Response

{
  "Header": {
    "StatusCode": "0000",
    "StatusDesc": "STATUS_SUCCESS",
    "Method": "31800",
    "ServiceType": "BalanceQuery",
    "MchId": "myMchId",
    "ResponseTime": "20180715104434"
  },
  "Data": {
    "EZCardID": "1917740208",
    "EZCardType": "08",
    "PersonalProfile": "00",
    "CardNumberForPrint": "1917740208",
    "Balance": "482",
    "TerminalTXNNumber": "104432",
    "HostSerialNumber": "104432",
    "ExpiryDate": "20250810000000",
    "CPUPurseVersion": "00",
    "BankCode": "32",
    "AreaCode": "01",
    "TXNResult": "Success",
    "Retry": "0",
    "ErrorCode": "000000",
    "NewAESKey": "a3900d6a3e5c02f26bcb1eee506752fb",
    "EZCardPurseID": "0000000000000000"
  }
}

Last updated