Search / Search ATM, CVS, or BARCODE Code Retrieval

Scenario

This API provides merchants to search ATM, CVS, or BARCODE Code Retrieval.

❗ Special Note:If the order has already been paid for, no query number results will be provided, please use the Query Order API for order information.

API URLS

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

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

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

Return Parameter Detail

RtnCode Int

Return value:

  • 1: success
  • rest: fail
RtnMsg String(200)
Transaction message.
MerchantID String(10) 
MerchantTradeNo String(20) 

Merchant transaction ID.

  • Merchant Transaction ID transmitted to ECPay when order was created.
StoreID String(20)
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.

  • Please save the link between the ECPay transaction ID and the merchant transaction ID [MerchantTradeNo].
TradeAmt Int
Transaction amount.
PaymentType String(20)
Transaction type.
TradeDate String(20)

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

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

Please refer to the Appendix Checksum Mechanism.

When the ChoosePayment parameter is set as CVS payment

PaymentNo String(14)
Payment code.
PaymentURL String(100)
Payment URL.
ExpireDate String(10)

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

When the ChoosePayment parameter is set as ATM payment

BankCode String(3)
Payment bank code.
vAccount String(16)
Payment virtual account number.
ExpireDate String(10)

Payment deadline.
The format is yyyy/MM/dd.

When the ChoosePayment parameter is set as Barcode payment

Barcode1 String(20)
First barcode strip number.
Barcode2 String(20)
Second barcode strip number.
Barcode3 String(20)
Third barcode strip number.
ExpireDate String(20)

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

YAML

The provided YAML file is used to define information such as the configuration, structure, operations, and infrastructure management of the API, making it easier for developers to understand and use the API.

				
					openapi: 3.1.0
info:
  title: ECPay ATM/CVS/BARCODE Payment Info Query API
  version: 1.0.0
servers:
  - url: https://payment.ecpay.com.tw
    description: Production Environment
  - url: https://payment-stage.ecpay.com.tw
    description: Testing Environment
paths:
  /Cashier/QueryPaymentInfo:
    post:
      summary: Query payment information for ATM/CVS/BARCODE
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                MerchantID:
                  type: string
                  description: Merchant ID provided by ECPay
                MerchantTradeNo:
                  type: string
                  description: Merchant trade number
                TimeStamp:
                  type: integer
                  description: Unix timestamp of the request
                CheckMacValue:
                  type: string
                  description: CheckMac value for verification
                PlatformID:
                  type: string
                  description: Partner platform ID
              required:
                - MerchantID
                - MerchantTradeNo
                - TimeStamp
                - CheckMacValue
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  RtnCode:
                    type: integer
                    description: Transaction status code
                  RtnMsg:
                    type: string
                    description: Transaction message
                  MerchantID:
                    type: string
                    description: Merchant ID
                  MerchantTradeNo:
                    type: string
                    description: Merchant trade number
                  StoreID:
                    type: string
                    description: Store ID under the merchant
                  TradeNo:
                    type: string
                    description: ECPay trade number
                  TradeAmt:
                    type: integer
                    description: Transaction amount
                  PaymentType:
                    type: string
                    description: Payment type selected by the merchant
                  TradeDate:
                    type: string
                    description: Order creation date (yyyy/MM/dd HH:mm:ss)
                  CustomField1:
                    type: string
                    description: Custom field 1
                  CustomField2:
                    type: string
                    description: Custom field 2
                  CustomField3:
                    type: string
                    description: Custom field 3
                  CustomField4:
                    type: string
                    description: Custom field 4
                  CheckMacValue:
                    type: string
                    description: CheckMac value
                  PaymentNo:
                    type: string
                    description: Payment code (for CVS payments)
                  PaymentURL:
                    type: string
                    description: Payment link (for CVS payments)
                  ExpireDate:
                    type: string
                    description: Payment deadline (yyyy/MM/dd HH:mm:ss)
                  BankCode:
                    type: string
                    description: Bank code (for ATM payments)
                  vAccount:
                    type: string
                    description: Virtual account number (for ATM payments)
                  Barcode1:
                    type: string
                    description: First segment of barcode (for BarCode payments)
                  Barcode2:
                    type: string
                    description: Second segment of barcode (for BarCode payments)
                  Barcode3:
                    type: string
                    description: Third segment of barcode (for BarCode payments)
				
			

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

Green World