Rounding and trimming

Trimming in the Fee-Per-_ Files

The fee-per-* files will represent fees with greater precision (ex: discount rates) than in the rounded aggregate file and in the clearing statement for representative purposes. To simplify presentation, PPRO trims digits after the fourth decimal place in the fee-per-* files. There is no rounding in the fee-per-* files.

This means that, for example, a transaction of 1.03 EUR billed a fee of 0.74% would be rendered as a fee of 0.0076 EUR in the fee-per-transaction file. See the sample file below:

MERCHANT_TX_IDTX_IDPAYMENT_REFERENCEEVENT_TYPEEVENT_TIMESTAMPMERCHANT_IDPAYMENT_METHODFEE_TYPEAMOUNTCURRENCYCOUNTRY
123454340343643D1OAIMSUCCEEDED2019-02-25T03:35:38ZMERCHANTID1WeChatPayDISCOUNT_FEE-0.42USDCN
123463761625294Y175TRSUCCEEDED2019-02-25T08:27:50ZMERCHANTID1WeChatPayDISCOUNT_FEE-0.49USDCN
1234737616328545I7048SUCCEEDED2019-02-25T08:31:33ZMERCHANTID1WeChatPayDISCOUNT_FEE-0.343USDCN
12348432984714264IT6SSUCCEEDED2019-02-25T08:48:33ZMERCHANTID2WeChatPayDISCOUNT_FEE-0.3206USDCN
1234943413993732H3ZWKSUCCEEDED2019-02-25T12:16:45ZMERCHANTID2WeChatPayDISCOUNT_FEE-0.3262USDCN
123504342422493F4RACISUCCEEDED2019-02-25T17:29:50ZMERCHANTID2WeChatPayDISCOUNT_FEE-0.6761USDCN
123514342469383JEHQ3CSUCCEEDED2019-02-25T17:40:51ZMERCHANTID2WeChatPayDISCOUNT_FEE-0.6761USDCN
222224340343643D1OAIMSUCCEEDED2019-02-25T03:35:38ZMERCHANTID1WeChatPayDISCOUNT_FEE-0.32EURCN
333333761625294Y175TRSUCCEEDED2019-02-25T08:27:50ZMERCHANTID1WeChatPayDISCOUNT_FEE-0.39EURCN
4444437616328545I7048SUCCEEDED2019-02-25T08:31:33ZMERCHANTID1WeChatPayDISCOUNT_FEE-0.243EURCN
55555432984714264IT6SSUCCEEDED2019-02-25T08:48:33ZMERCHANTID1WeChatPayDISCOUNT_FEE-0.2206EURCN
6666643413993732H3ZWKSUCCEEDED2019-02-25T12:16:45ZMERCHANTID2WeChatPayDISCOUNT_FEE-0.2262EURCN
777774342422493F4RACISUCCEEDED2019-02-25T17:29:50ZMERCHANTID2WeChatPayDISCOUNT_FEE-0.5761EURCN
888884342469383JEHQ3CSUCCEEDED2019-02-25T17:40:51ZMERCHANTID2WeChatPayDISCOUNT_FEE-0.5761EURCN

Rounding in the Aggregate File

For the aggregate file, the volumes of all transactions based on a combination of merchant, scheme, currency, and EVENT_TYPE are summed before multiplying the summed value against the %-based fee (ex: DISCOUNT_RATE). This amount is then rounded to the nearest cent using a normal rounding mechanism: up from .005, down from .004 (regardless of whether the values are positive or negative). Non-%-based fees are simply multiplied against the count of transactions and then summed; no rounding of these fees is necessary.

The above data would then appear in the aggregated file as per the following example:

MERCHANT_IDPAYMENT_METHODEVENT_TYPEEVENT_COUNTAGGREGATE_AMOUNTCURRENCY
MERCHANTID1WeChatPayDISCOUNT_FEE4-1.17EUR
MERCHANTID1WeChatPayDISCOUNT_FEE3-1.25USD
MERCHANTID2WeChatPayDISCOUNT_FEE3-1.38EUR
MERCHANTID2WeChatPayDISCOUNT_FEE4-2.00USD