Payment

This API implement is necessary.

If the card balance is not enough for the payment, cards with auto top-up function will top-up automatically and then process the payment.

Request

Item

Mandatory

Data Type

Sample

Description

Method

YES

String(5)

31800

Fill in 31800 (EasyCard transaction)

ServiceType

YES

String

Payment

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

Amount

YES

String

100

Payment amount

StoreOrderNo

YES

String

PO01010001

Order number

Body

No

String

Todayspecial

Product name

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

Payment

Selected Scan2Pay Service type

MchId

String

Account0001

Merchant ID

ResponseTime

String

20180101120000

Transaction response time, the format is “yyyyMMddHHmmss”

Data

Item

Data Type

Sample

Description

EZCardID

String

934528053

Internal card number

EZCardType

String

00

PersonalProfile

String

00

CardNumberForPrint

String

934528053

Amount

String

10

Payment amount

Balance

String

3990

BeforeTXNBalance

String

4000

Balance before payment

TerminalTXNNumber

String

230143

HostSerialNumber

String

230143

Time

String

230143

Date

String

20180612

ExpiryDate

String

20191230

CPUPurseVersion

00

BankCode

00

AreaCode

01

AutoTopUpAmount

0

TXNResult

String

Success

Transaction result

Retry

String

0

ErrorCode

String

000000

OrderId

String

PO180101001

Merchant order number

DongleDeviceID

String

08100DE0A57E

RRNumber

String

18061223014301

TXNType

String

Payment

NewAESKey

String

61c4d0f9...3607

DeviceNumber

String

0830000001304104

request

JSON

Information needs to be printed on invoice or receipt, please refer to Printing information for EazyCard transaction

For EasyCard transaction, the Header field “StatusCode” means the success of calling API, instead of success of transaction. Please refer to the Data field “TXNResult” (Success/Fail), and the “ErrorCode” “000000” means the transaction is successful, otherwise it’s error.

API Example

Request

{
  "Header": {
    "Method": "31800",
    "ServiceType": "Payment",
    "MchId": "myMchId",
    "TradeKey": "9af15b336e6a9619928537df30b2e6a2376569fcf9d7e773eccede65606529a0",
    "CreateTime": "20180715104643"
  },
  "Data": "{\"DeviceId\":\"01304187\",\"Retry\":\"0\",\"Amount\":\"10\",\"StoreOrderNo\":\"PO-20180715-005\",\"Body\":\"Chicken Rice\"}"
}

Response

{
  "Header": {
    "StatusCode": "0000",
    "StatusDesc": "STATUS_SUCCESS",
    "Method": "31800",
    "ServiceType": "Payment",
    "MchId": "myMchId",
    "ResponseTime": "20180715104650"
  },
  "Data": {
    "EZCardID": "1917740208",
    "EZCardType": "08",
    "PersonalProfile": "00",
    "CardNumberForPrint": "1917740208",
    "Amount": "10",
    "Balance": "462",
    "BeforeTXNBalance": "472",
    "TerminalTXNNumber": "104644",
    "HostSerialNumber": "104644",
    "Time": "104644",
    "Date": "20180715",
    "ExpiryDate": "20250810",
    "CPUPurseVersion": "00",
    "BankCode": "32",
    "AreaCode": "01",
    "AutoTopUpAmount": "0",
    "request": {
      "Amount": "10",
      "Retry": "0",
      "BatchNumber": "18071511",
      "SameCard": "0",
      "ServiceType": "Payment",
      "TerminalID": "09900000",
      "DeviceID": "01304187",
      "TerminalTXNNumber": "104644",
      "HostSerialNumber": "104644",
      "Time": "104644",
      "Date": "20180715",
      "AESKey": "a304c6beb25bb660d5d9668eb1d6bf3b"
    },
    "TXNResult": "Success",
    "Retry": "0",
    "ErrorCode": "000000",
    "OrderId": "PO-20180715-005",
    "DongleDeviceID": "5B100DE00F97",
    "RRNumber": "18071510464488",
    "TXNType": "Payment",
    "NewAESKey": "574660f677ee8314812ad829a6b48bf7",
    "DeviceNumber": "0990000001304187"
  }
}

Last updated