Transaction File Format

This file consists of two parts, which are the header and record details.

File header

The following table lists the fields in the file header:

No.FieldType (Length)Description
1PartnerString(16)

The unique ID that is assigned by Alipay to identify a partner. The ID is composed of 16 digits beginning with 2088.

2Payment_timeString(10)The date when the transaction is completed. Format: yyyy-MM-dd HH:mm:ss
3Total_countNumber(9)The total number of records in this file

Record Detail

 No.FieldType(Length)Description
1Partner_transaction_idString(64)

The unique ID that is assigned by the partner to identify a transaction in the partner system.

  • When Transaction_type is PAYMENT, REVERSAL or CANCEL, the value is same as that of partner_trans_id.
  • When Transaction_type is REFUND, the value is same as that of partner_refund_id.
2Transaction_idString(64)

The unique ID that is composed of digits and assigned by Alipay to identify a transaction

3Transaction_amountNumber(9,2)

The transaction amount in settlement currency

4Charge_amountNumber(9,2)

The commission fee that is charged for the transaction in settlement currency

5CurrencyString(8)

Settlement currency

6Payment_timeString(19)

The date and time when the transaction is completed. Format: yyyy-MM-dd HH:mm:ss

7Transaction_typeString(8)

The transaction type. The value can be:

  • PAYMENT
  • REVERSAL
  • REFUND
  • CANCEL
8RemarkString(256)Remarks
9Secondary_merchant_industryString(4)

The merchant category code that is assigned by Alipay to identify an industry. See MCC list for details.

10Secondary_merchant_nameStringSecondary merchant name
11

Secondary_merchant_id

String

The unique ID that is assigned by the partner to identify a secondary merchant

12Operator_nameString

Operator name, such as a store name or a taxi driver name

13Order_sceneString

The business scenario where the transaction is completed. The value can be:

  • shopQrCode: Merchant QR mode
  • paymentQrCode: Barcode payment mode
  • transactionQrCode: Transaction QR mode
  • externalCreateOrder: Third-party Merchant QR Code (Standard mode)
  • transactionQrCode: Third-party Merchant QR Code (Simple mode)
14Trans_currencyString(8)

The pricing currency

15Trans_amountNumber(9,2)

The order amount in the pricing currency

16

Trans_forex_rateString

Exchange rate between the settlement currency and the pricing currency

17

Issue

String

Payment method type. The value can be:

  • ALIPAYHK
  • ALIPAYCN

Sample

Partner:208800000000|Payment_time: 2013-12-02|Total_count:4

Partner_transaction_id|Transaction_id|Transaction_amount|Charge_amount|Currency|Payment_time|Transaction_type|Remark|Secondary_merchant_industry|Secondary_merchant_name|Secondary_merchant_id|Operator_name|Order_scene|Trans_currency|Trans_amount|Trans_forex_rate|Issue

0001|201312020445|100|3|HKD|2013-12-02 10:45:42|PAYMENT||5812|xxx|1234|xxx|shopQrCode|TWD|100|0.031|ALIPAYCN

0002|201312020446|100|3|HKD|2013-12-02 10:45:13|REVERSAL||5812|xxx|1234|xxx|shopQrCode|TWD|100|0.031|ALIPAYCN

0003|201312020448|100|3|HKD|2013-12-02 10:45:09|REFUND|Refund|5812|xxx|1234|xxx|shopQrCode|TWD|100|0.031|ALIPAYCN