Search / Searching ATM, CVS, or BARCODE Code Retrieval Result

Scenario

Merchants can call this API to seach the payment code of ATM, CVS, or BARCODE payment.

API URLs

  • Stage: https://ecpayment-stage.ecpay.com.tw/1.0.0/Cashier/QueryPaymentInfo
  • Production: https://ecpayment.ecpay.com.tw/1.0.0/Cashier/QueryPaymentInfo

Message format

  • Content Type:application/json
  • HTTP Method:POST

Request (Json format)

MerchantID String(10)
Required

For platform merchants, the value please populate with the Platform merchant’s MerchantID.

RqHeader Object
Required

Request header

Timestamp Number
Required

Unix timestamp

❗ Special note:

  • ECPay will verify the timestamp.If ECPay receives the request is more 10 minutes late than the timestamp, the transaction will be failed.
  • Merchants are suggested to synchronize the time of a computer on client- or server-side to another server or nearest reference time source.
  • For more details can be seen here; another online tool can be found here.

Data String
Required

Payload of JSON that has been encrypted.

Request Example (Json format)

				
					{
    "MerchantID": "3002607",
    "RqHeader": {
        "Timestamp": 1234567890
    },
    "Data": "enter your data"
}
				
			

Message payload of Data (Json format)

❗ Special note: please urlencode the JSON string firstly and then do AES encryption.

PlatformID String(10)

Platform merchant’s MerchantID.

MerchantID String(10)
Required

MerchantTradeNo String(20)
Required

Merchant’s order ID

Data Example:(Json format)

				
					{
    "MerchantID": "3002607",
    "MerchantTradeNo":"20180914001"
} 

				
			

Response (Json format)

MerchantID String(10)
 

Merchant ID

RpHeader Object

Timestamp Number

Unix timestamp

TransCode Int
 

Response codes to indicate whether the payload is successfully accepted.

  • 1: Payload (i.e. MerchantID, RqHeader, and Data) is successfully accepted by ECPay.
  • Others: failed.

TransMsg String(200)
 

Response message to indicate whether the payload is successfully accepted.

Data String

Payload of JSON that has been encrypted.

Response Example (Json format)

				
					{
    "MerchantID": "3002607",
    "RpHeader": {
        "Timestamp": 1234564848
    },
    "TransCode": 1,
    "TransMsg": "Success",
    "Data": "…"
}
				
			

Message payload of Data (Json format)

RtnCode Int

Response codes to indicate whether the API is successfully executed or not.

  • 1: API is successfully executed.
  • Others: failed.
  • For more details please see error codes.

RtnMsg String(200)

Response messages.

PlatformID String(10)

MerchantID String(10)

OrderInfo Object

Order information

MerchantTradeNo String(20)

Merchant’s order ID (a unique identifier).

TradeNo String(20)

ECPay’s order ID

TradeAmt Int

Transaction amount

TradeDate String(20)

Time at which the order.

Format: yyyy/MM/dd HH:mm:ss

PaymentType String(20)

Payment method

PaymentDate String(20)

Date of payment. Format: yyyy/MM/dd HH:mm:ss

ChargeFee Number

ECPay’s service charge

TradeStatus String(8)

Status of transaction. Possible values:

  • 0: the order was created but the payment has not yet been made.
  • 1: the order was created and the payment has been made.

CVSInfo Object

CVS information

PaymentNo String(14)

Payment number

ExpireDate Int

Payment deadline

PaymentURL String(100)

Payment URL. A URL provided by ECPay for merchants to display 3-stripe CVS payment number on consumer’s mobile.

BarcodeInfo Object

ExpireDate String(20)

Payment deadline. Format: yyyy/MM/dd HH:mm:ss

Barcode1 String(20)

First barcode stripe number. Possible value:

  • A 9-digit serial number.
  • If the payment method is CVS, the value returned would be blank.

Barcode2 String(20)

Second barcode stripe number. Possible value:

  • A 16-digit serial number.
  • If the payment method is CVS, the value returned would be blank.

Barcode3 String(20)

Third barcode stripe number. Possible value:

  • A 15-digit serial number.
  • If the payment method is CVS, the value returned would be blank.

ATMInfo Object

BankCode String(3)

Bank code

vAccount String(16)

Payment virtual account number.

ExpireDate String(10)

Payment deadline.

CustomField String(200)

A parameter for merchant to place customized value.

Data Example(Json format)

				
					{
    "RtnCode": 1,
    "RtnMsg": "Success",
    "MerchantID": "3002607",
    "OrderInfo": {
        "MerchantTradeNo": "20180914001",
        "TradeNo": "1809261503338172",
        "PaymentDate" :"2018/09/26 14:59:54",
        "TradeAmt" :"500",
        "PaymentType" :"Credit",
        "TradeDate" :"2018/09/26 14:59:54",
        "ChargeFee" :10,
        "TradeStatus" :"1"
    },
    "CVSInfo": {
        "PaymentNo": "12345678901234",
        "ExpireDate": 7,
        "PaymentURL": "https://aa.aa.aa"
    },
   "BarcodeInfo": {
		"ExpireDate":"2020/12/31 15:12:20",
        "Barcode1":"123456789",
        "Barcode2":"1234567890123456",
        "Barcode3":"123456789012345"
    },
   "ATMInfo": {
		"BankCode":"800",
        "vAccount":"1234567890",
        "ExpireDate":"2020/12/31"
    }
}
				
			

Copyright © Green World FinTech Service Co., Ltd. All rights reserved.

Green World