Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

Settlement File Format

The settlement zip file contains one settlement batch file and multiple settlement files.

The settlement batch file contains a list of the following fields:

 No.FieldType(length)Description
1Settle_batch_noString(32)The total settlment may be done in multiple batches. This field indicates the id of a single settlement batch.
2Settle_dateString(19)

The time of settlement of the batch;

Format: YYYY-MM-DD HH:MM:SS

3AmountNumber(9,2)Total Amount in list currency of the batch
4FeeNumber(9,2)Total Commission fee in the list currency of the batch
5SettlementNumber(9,2)Total Settlement amount in list currency of the batch
6CurrencyString(8)The settlement currency of the batch

 

Record Detail

An example of file content:

Settle_batch_no,Settle_date,Amount,Fee,Settlement,Currency

50002017051900000000000000000000 ,2017-05-23 15:36:00,852.40 ,8.52 ,843.88 ,HKD

The single settlment file contains a list of the following fields:

 No.FieldType(Byte)Description
1Partner_transaction_idString(64)A numbered transaction ID(unique in partner system)it is equal to “partner_trans_id” when transaction type is in (payment,reversal,reverse); it is equal to “partner_refund_id” when transaction type is refund
2Transaction_idString(64)A numbered transaction ID (Unique inside the Alipay system)
3AmountNumber(9,2)Amount in list currency/refund amount in list currency
4FeeNumber(9,2)Commission fee
5SettlementNumber(9,2)Settlement amount in list currency
6CurrencyString(8)The currency given in the transaction request.
7Payment_timeString(19)

The time of transaction;

Format: YYYY-MM-DD HH:MM:SS

8Settlement_timeString(19)

The time of settlment;

Format: YYYY-MM-DD HH:MM:SS

9IssueString

Indicator of wallet version:

ALIPAYCN : Alipay

ALIPAYHK: Alipay HK

10ProductStringIdentifier for different Alipay products. Alipay and Alipay HK wap and sdk payment: Cross_wap
11TypeString(8)

Transaction type:
P: payment

R: refund

12StatusString(1)

Trasaction status, with a value of L.

This value means the transaction is liquidated.

13RemarksString(256)Remarks
14original_partner_transaction_IDString(64)

The original partner transaction ID. When the transaction is a payment, the value is same with that of out_trade_no. When the transaction is a refund, the value is same with that of out_return_no.

 

Record Detail

An example of file content:

Partner_transaction_id,Transaction_id,Amount,Fee,Distribute_amount,Settlement,Currency,Payment_time,Settlement_time,Issue,Product,Type,Status,Remarks,Original_partner_transaction_ID

FOREXTRADE_2017051800000001 ,2017051800000000000000000001 ,1.00,0.01,0.99,HKD,2017-05-18 11:49:44,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,P,L,test1,

FOREXTRADE_2017051800000002 ,2017051800000000000000000002 ,1.00,0.01,0.99,HKD,2017-05-18 13:15:37,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,P,L,test2,

FOREXTRADE_2017051800000003 ,2017051800000000000000000003 ,2.00,0.02,1.98,HKD,2017-05-18 17:59:25,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,P,L,test3,

FOREXREFUND_2017051800000001 ,2017051800000000000000000001 ,-1.00,-0.01,-0.99,HKD,2017-05-18 18:02:10,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,R,L,test_refund1,FOREXTRADE_2017051800000001

FOREXREFUND_2017051900000001 ,2017051800000000000000000002 ,-0.60,-0.01,-0.59,HKD,2017-05-19 10:46:03,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,R,L,test_refund2,FOREXTRADE_2017051800000002

FOREXTRADE_2017051900000001 ,2017051900000000000000000001 ,100.00,1.00,99.00,HKD,2017-05-19 10:53:40,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,P,L,test4,

FOREXTRADE_2017052200000001 ,2017052200000000000000000001 ,100.00,1.00,99.00,HKD,2017-05-22 11:06:46,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,P,L,test5,

FOREXTRADE_2017052200000002 ,2017052200000000000000000002 ,100.00,1.00,99.00,HKD,2017-05-22 11:09:11,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,P,L,test6,

FOREXTRADE_2017052200000003 ,2017052200000000000000000003 ,50.00,0.50,49.50,HKD,2017-05-22 12:54:19,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,P,L,test7,

FOREXTRADE_2017052200000004 ,2017052200000000000000000004 ,500.00,5.00,495.00,HKD,2017-05-22 14:05:58,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,P,L,test8,

FOREXTRADE_2017052200000005 ,2017052200000000000000000005 ,1000.00,10.00,990.00,HKD,2017-05-22 14:08:46,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,P,L,test9,

FOREXREFUND_2017052200000001 ,2017052200000000000000000004 ,-500.00,-5.00,-495.00,HKD,2017-05-22 17:13:43,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,R,L,test_refund3,FOREXTRADE_2017052200000004

FOREXREFUND_2017052200000002 ,2017052200000000000000000002 ,-100.00,-1.00,-99.00,HKD,2017-05-22 17:16:04,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,R,L,test_refund4,FOREXTRADE_2017052200000002

FOREXREFUND_2017052200000003 ,2017052200000000000000000005 ,-400.00,-4.00,-396.00,HKD,2017-05-22 17:17:48,2017-05-23 15:36:00,ALIPAYHK,Cross_wap,R,L,test_refund5,FOREXTRADE_2017052200000005