Search / Order Search

Scenario

This API provides merchants to search order information and allows them to filter valid orders.

  • Step 1. Merchant: Transmit the following parameters to the API URLS via Server Site POST.
  • Step 2. ECPay : Return order information parameters once received and verified to be correct.

❗ Special Note:

  • If you do not receive the payment result notification after 40 minutes from the time of order generation, you can use the API to check the payment result.
  • If you are calling the API too fast, you will receive an HTTP Status Code 403, so please slow down the API and wait 30 minutes before calling again.If you need to access the API at a high speed, please contact the service provider.
  • For multiple order enquiries, please refer to the Downloading Merchant Balance Statement.

API URLS

  • Stage: https://payment-stage.ecpay.com.tw/Cashier/QueryTradeInfo/V5
  • Production: https://payment.ecpay.com.tw/Cashier/QueryTradeInfo/V5

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

Verification time.
  • 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

Checksum.

PlatformID String(10)
Platform merchant ID (Provided by Green World). 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 Details

MerchantID String(10) 
MerchantTradeNo String(20) 

Merchant transaction ID.

  • Merchant Transaction ID transmitted to ECPay when order was created.
StoreID String(20)

Merchant store ID.

  • 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.

TradeAmt Int
Transaction amount
PaymentDate String(20)

Payment time.

  • The format is yyyy/MM/dd HH:mm:ss
PaymentType String(20)
Payment method selected by merchant.
HandlingCharge Number

Total processing fee.

  • Only calculated after completion – $0 before calculation.
TradeDate String(20)

Transaction time.

  • The format is yyyy/MM/dd HH:mm:ss
TradeStatus String(8)
Transaction status. Return value:
  • If it is 0, the order has been created but payment has not been completed.
  • If it is 1, the order has been created and payment is complete.
  • If it is 10200095, it means that the order has not been created and the consumer has not completed the payment process, therefore the transaction has failed.
ItemName String(400)
Merchandise name.
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

Checksum.

  • The merchant must check the checksum [CheckMacValue] to verify. Please refer to the Appendix Checksum Mechanism.

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

Green World