Search / Order Search for Periodic Fixed-Amount Purchases on Credit Cards

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

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.

Response Parameter Details:

MerchantID String(10)
MerchantTradeNo String(20)

Merchant Transaction ID transmitted to ECPay when order was created.

TradeNo String(20)

The ECPay transaction ID generated in the first authorization.

RtnCode Int

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.

PeriodType String(1)
Types of periods.
Frequency Int
Execution frequency.
ExecTimes Int
Number of executions
PeriodAmount Int
Amount per authorization.
amount Int
Authorized amount.
gwsr Int
Transaction authorization ID.
process_date String(20)

Time of successful authorization.
The format is yyyy/MM/dd HH:mm:ss.

auth_code String(6)

Authorization code.

card4no String(4)

Last 4 digits of credit card

card6no String(6)

First 6 digits of credit card

TotalSuccessTimes Int
Total number of successful authorizations
TotalSuccessAmount Int
Total amount successfully authorized.
ExecStatus String(1)

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
ExecLog Array

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.
RtnCode Int

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.

amount Int
Authorized amount.
gwsr Int
Transaction authorization ID.
process_date String(20)

The format is yyyy/MM/dd HH:mm:ss.

auth_code String(6)
Authorization code.
TradeNo String(20)

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"}
  ]
}

				
			

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

Green World