Scenario
Provide Merchant execution inquiry funding reconciliation information.
API URLs
- Stage: https://ecpayment-stage.ecpay.com.tw/1.0.0/Cashier/QueryTradeMedia
- Production: https://ecpayment.ecpay.com.tw/1.0.0/Cashier/QueryTradeMedia
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.
MerchantID String(10)
Required
DateType String(1)
Required
Type of date to be queried:
- When querying the settlement date, please bring 1 for the parameter.
- If you want to check the funding date, please bring 2 to the parameter.
BeginDate String(10)
Required
Start date to be queried. Date Format is「yyyy-MM-dd」
EndDate String(10)
Required
End date to be queried. Date Format is 「yyyy-MM-dd」. The maximum period is 1 month.
PaymentType String(2)
To check the payment method of the order:
- 01 : If it is a credit card, then the parameter should be 01.
- 02 : If it is a network ATM, the parameter should be 02.
- 03 : If it is an ATM, the parameter should be 03.
- 04 : If it is a convenience store code, the parameter should be 04.
- 05 : If it is a convenience store barcode, the parameter should be 05.
- 11 : If the parameter is for Dream Flex Installment, the parameter should be 11.
Data Example:(Json format)
{
"MerchantID": "3002607",
"DateType": "1",
"BeginDate": "2022-01-30",
"EndDate": "2022-01-01",
"PaymentType": "01"
}
Response (CSV File)
Special note: Response parameters are in Chinese only.
特店交易編號 String
綠界交易編號 String
Format is yyyy/MM/dd HH:mm:ss
付款方式 String
手續費率 String
結算日期 String
Format is yyyy/MM/dd HH:mm:ss
撥款日期 String
Format is yyyy/MM/dd HH:mm:ss
金流手續費 Decimal(8,4)
平台手續費 Decimal(8,4)
退款金額 Int
應收款項(淨額) Int