Scenario:
The merchant can search for authorization details of every transaction under order inquiry for periodic fixed-amount purchases.
- Step 1. Merchant: Transmit the following parameters to API URLS via Server Site POST.
- Step 2. ECPay : Return periodic fixed-amount order information once received and verified to be correct.
API URLS:
- Stage:https://payment-stage.ecpay.com.tw/Cashier/QueryCreditCardPeriodInfo
- Production:https://payment.ecpay.com.tw/Cashier/QueryCreditCardPeriodInfo
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 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
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.
Response Parameter Details:
Merchant Transaction ID transmitted to ECPay when order was created.
The ECPay transaction ID generated in the first authorization.
A return value of 1 indicates successful authorization, while any other value indicates failure. For more information on error codes, please refer to the list of transaction status codes.
Time of successful authorization.
The format is yyyy/MM/dd HH:mm:ss.
Authorization code.
Last 4 digits of credit card
First 6 digits of credit card
The return value is as follows:
- If it is 0, the authorization has been canceled
- If it is 1, the authorization is being processed
- If it is 2, the authorization has been completed
Individual authorization records.
- For example, if authorization has been successful for 3 times already (TotalSuccessTimes is 3), you will see 3 authorization records.
- For field details, see the authorization detail parameters for periodic fixed-amount purchases below.
A return value of 1 indicates successful authorization, while any other value indicates failure. For more information on error codes, please refer to the list of transaction status codes.
The format is yyyy/MM/dd HH:mm:ss.
ECPay transaction ID.
Please save the link between the ECPay transaction ID and the merchant transaction ID [MerchantTradeNo].
Return examples
{
"MerchantID":"1050123",
"MerchantTradeNo":"ecpay1234",
"TradeNo":"20140721173014442498",
"RtnCode":1,
"PeriodType":"D",
"Frequency":1,
"ExecTimes":12,
"PeriodAmount":1000,
"amount":1000,
"gwsr":24548751,
"process_date":"2014/07/21 17:35:45",
"auth_code":"237523",
"card4no":"2369",
"card6no":"523782",
"TotalSuccessTimes":3,
"TotalSuccessAmount":3000,
"ExecStatus":"1",
"ExecLog":
[
{"RtnCode":1,"amount":1000,"gwsr":24548751,"process_date":"2014/07/21 17:35:45","auth_code":"237523","TradeNo":"20140721173014442498"},
{"RtnCode":1,"amount":1000,"gwsr":24549277,"process_date":"2014/07/22 01:12:30","auth_code":"185279","TradeNo":"20140722011230346534"},
{"RtnCode":1,"amount":1000,"gwsr":24552639,"process_date":"2014/07/23 01:12:25","auth_code":"693851","TradeNo":"20140723011225646424"}
]
}