Downloading Merchant Balance Statement

Scenario

Merchants can download their statements in CSV format.

  • Step 1. Merchant: Transmit the specific order details and category to ECPay via POST (HTTP Method).
  • Step 2. ECPay : Upon receiving a merchant’s order inquiry and checking the details, return a CSV file for the merchant to download.

❗ Special Note:

  1. The API has restrictions on IP access. Please set up the IP on “Merchant’s Admin Website -> System development management -> System onterface setting.”
  2. Only 1 CSV may be downloaded per minute.

API URLS

  • Stage:https://vendor-stage.ecpay.com.tw/PaymentMedia/TradeNoAio
  • Production :https://vendor.ecpay.com.tw/PaymentMedia/TradeNoAio

HTTPS Transfer Protocol

  • Content Type :application/x-www-form-urlencoded
  • HTTP Method :POST

Request Parameters Description

MerchantID String(10)
Required

DateType String(1)
Required

Search date category.
The date category to be inquired
  • 2: Check date paid
  • 4: Check date disbursed date
  • 6: Check order date

BeginDate String(10)
Required

Query start date.
The start date of the query Date format is “yyyy-MM-dd“.

EndDate String(10)
Required

Query end date.
The end date of the query Date format is “yyyy-MM-dd“.
PaymentType String(2)

Payment method.
Check the payment method for an order

  • 01: Credit cards
  • 02: WebATM
  • 03: ATM
  • 04: Convenience store codes
  • 05: Convenience store barcodes
  • 08: Credit card (OTP)
  • 10: FamilyMart barcode
  • 11: Flexible Installment
  • 12: OPAY TWQR
  • Ignore this parameter: search all

PlatformStatus String(1)

Order category.
The order category to be inquired
  • 1: General order
  • 2: Platform order
  • Ignore this parameter: search all

PaymentStatus String(1)

Order category.
The order payment status to be inquired
  • 0: Unpaid orders
  • 1: Paid orders
  • 2: Failed orders
  • Ignore this parameter: All orders

AllocateStatus String(1)

Disbursement status.
The disbursement status of the order to be inquired
  • 0: Order has not been disbursed
  • 1: Order has been disbursed
  • Ignore this parameter: All order

MediaFormated String(1)
Required

The format of the file to be downloaded

  • 0: Old file format
  • 1: New file format
CharSet String(1)

File encoding format to download

  • If it is in Big5 format, please bring 1 parameter.
  • If it is in UTF8 format, please bring 2 parameters.
  • If this parameter is not passed in or is null, the default is Server Default encoding format.

CheckMacValue String
Required

Checksum.
Please refer to the Appendix Checksum Mechanism.

Response CSV Old File Format Details:

Transaction date String

The default format is yyyy/MM/dd hh:mm:ss

ECPay transaction ID String

Merchant order ID String
ATM barcode String
Transaction amount Int
Payment method String
Payment result String
Payment date String

The default format is yyyy/MM/dd hh:mm:ss

Payment source (Bank/Convenience store) String
Retail fee Int
Rate (% or $ per transaction) String
Retail fee sum Number
Receivables (net)Number
Disbursement status String
Disbursement date String

The default format is yyyy/MM/dd hh:mm:ss

Note String

Response CSV New File Format Details:

Order date String

The default format is yyyy/MM/dd hh:mm:ss

Merchant order ID String

ECPay order ID String

Store ID String
MID String
Platform name String
Payment method String
Rate (per transaction) String
Credit card authorization number String
Last 4 digits of credit card String
Convenience store information/ATM payment account String
Payment status String
Transaction amount Int
Refund date String

The default format is yyyy/MM/dd hh:mm:ss

Refund amount Int
Transaction fee Number
Platform fee Number
Receivables (net) Number
Disbursement status String
Note String
Merchant Notes String
Merchandise name String
Transaction description String
Payer name String
Payer phone number String
Payer email String
Recipient name String
Recipient phone String
Recipient address String
Recipient email String
Business Tax ID String

❗ Special Note:

  1. The download format is the same as the “General order inquiry/Overall payments” in the admin website for merchants.
  2. If there is no data, the statement file will only contain the field names.
  3. If an error occurs, the statement fill will include a data entry recording the messages returned at the time of execution at the “Notes” or “Merchant Notes” section, in addition to the field names. All remaining fields will be empty.
  4. The file’s default encryption method is BIG-5.

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

Green World