Scenario
Enables merchants to check a single credit card transaction.
API URLS
- Stage: This API can not be used because no real authorizations can be provided.
- Production :https://payment.ecPay.com.tw/CreditDetail/QueryTrade/V2
HTTPS Transfer Protocol
- Content Type :application/x-www-form-urlencoded
- HTTP Method :POST
Request Parameters Description
MerchantID String(10)
Required
CreditRefundId Int
Required
Credit card authorization number.
- When creating order, send [NeedExtraPaidInfo] = Y. Once the consumer makes the payment, ECPay will respond the payment notification to merchant’s ReturnURL, this value = gwsr.
CreditAmount Int
Required
CreditCheckCode Int
Required
Merchant Checksum.
- Or this value can also be found in Merchant’s admin -> Credit Card Acquiring-> Credit Card Authorization Information.
CheckMacValue String
Required
Checksum.
- Please refer to the Appendix Checksum Mechanism.
Return Parameter Details
RtnMsg String(200)
- If it is successful, the return value will be empty string.
- If there is no merchant or the merchant has expired, the return value is: error_Stop.
- If there is no such transaction authorization number, the return value is: error_nopay.
- If an error occurs or the data check fails, the return value is: error.
RtnValue json
JSON chart format.
If the empty string indicates a failed trade.
TradeID Int
Authorization number.
amount Int
Transaction amount
clsamt Int
Amount settled.
authtime String(24)
Transaction time.
status String(30)
If there are no settlement transaction details, the status return value will be:
- Canceled: This transaction has been canceled
- Unauthorized: Unauthorized by bank
- Authorized: Bank has completed authorization
If there are a settlement transaction details, the status return value will be:
- Refused by bank
- To be settled
- Settling
- Has been settled
- To be canceled
- Cancellation in process
- Canceled
- Bank chargeback in progress
- Bank chargeback complete
- Batch failed
- unknown
- Operation canceled
close_data json
close_data Parameter Details
status String(30)
The status return value is as follows:
- Refused by bank
- To be settled
- Settling
- Has been settled
- To be canceled
- Cancellation in processBank chargeback in progress
- Bank chargeback complete
- Batch failed
- unknown
- Operation canceled
amount Int
Transaction amount.
sno String(30)
Settlement serial number.
datetime String(24)
Settlement time.
Return Parameter Sample
{
"RtnMsg":"",
"RtnValue":{
"TradeID":"0015625112",
"amount":"1",
"clsamt":"1",
"authtime":"2016/5/12 下午 07:09:17",
"status":"已關帳",
"close_data":[
{
"status":"已關帳",
"sno":"2782343",
"amount":"1",
"datetime":"2016/5/12 下午 08:00:00"
}
]
}