Scenario
This API provides merchants to search ATM, CVS, or BARCODE Code Retrieval.
Special Note:If the order has already been paid for, no query number results will be provided, please use the Query Order API for order information.
API URLS
- Stage: https://payment-stage.ecpay.com.tw/Cashier/QueryPaymentInfo
- Production: https://payment.ecpay.com.tw/Cashier/QueryPaymentInfo
HTTPS Transfer Protocol
- Content-Type:application/x-www-form-urlencoded
- HTTP Method:POST
Request Parameters Description
MerchantID String(10)
Required
MerchantTradeNo String(20)
Required
Merchant transaction ID.
- Merchant Transaction ID transmitted to ECPay when order was created.
TimeStamp Int
Required
- Convert current time to UnixTimeStamp (see example) to verify the time interval of this interfacing.
- ECPay verification time interval is currently set to be under 3 minutes and interfacing will expire if time is exceeded.
- Reference: http://www.epochconverter.com/。
CheckMacValue String
Required
Please refer to the Appendix Checksum Mechanism.
PlatformID String(10)
Used by contracted platform merchants.
- For general merchants or platform merchant interfacing, please leave empty.
- For use by platform merchants, please set [MerchantID] as the parameter.
Return Parameter Detail
RtnCode Int
Return value:
- 1: success
- rest: fail
RtnMsg String(200)
Transaction message.
MerchantID String(10)
MerchantTradeNo String(20)
Merchant transaction ID.
- Merchant Transaction ID transmitted to ECPay when order was created.
StoreID String(20)
Allows merchants to enter specific store ID.
This parameter only allows a combination of upper and lower case alphanumeric characters.
TradeNo String(20)
ECPay transaction ID.
- Please save the link between the ECPay transaction ID and the merchant transaction ID [MerchantTradeNo].
TradeAmt Int
Transaction amount.
PaymentType String(20)
Transaction type.
TradeDate String(20)
The format is yyyy/MM/dd HH:mm:ss.
CustomField1 String(50)
Merchant notes field
CustomField2 String(50)
Merchant notes field
CustomField3 String(50)
Merchant notes field
CustomField4 String(50)
Merchant notes field
CheckMacValue String
Please refer to the Appendix Checksum Mechanism.
When the ChoosePayment parameter is set as CVS payment
PaymentNo String(14)
Payment code.
PaymentURL String(100)
Payment URL.
ExpireDate String(10)
The format is yyyy/MM/dd HH:mm:ss.
When the ChoosePayment parameter is set as ATM payment
BankCode String(3)
Payment bank code.
vAccount String(16)
Payment virtual account number.
ExpireDate String(10)
Payment deadline.
The format is yyyy/MM/dd.
When the ChoosePayment parameter is set as Barcode payment
Barcode1 String(20)
First barcode strip number.
Barcode2 String(20)
Second barcode strip number.
Barcode3 String(20)
Third barcode strip number.
ExpireDate String(20)
Payment deadline.
The format is yyyy/MM/dd HH:mm:ss.