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_ID | TX_ID | PAYMENT_REFERENCE | EVENT_TYPE | EVENT_TIMESTAMP | MERCHANT_ID | PAYMENT_METHOD | FEE_TYPE | AMOUNT | CURRENCY | COUNTRY |
---|---|---|---|---|---|---|---|---|---|---|
12345 | 434034364 | 3D1OAIM | SUCCEEDED | 2019-02-25T03:35:38Z | MERCHANTID1 | WeChatPay | DISCOUNT_FEE | -0.42 | USD | CN |
12346 | 376162529 | 4Y175TR | SUCCEEDED | 2019-02-25T08:27:50Z | MERCHANTID1 | WeChatPay | DISCOUNT_FEE | -0.49 | USD | CN |
12347 | 376163285 | 45I7048 | SUCCEEDED | 2019-02-25T08:31:33Z | MERCHANTID1 | WeChatPay | DISCOUNT_FEE | -0.343 | USD | CN |
12348 | 432984714 | 264IT6S | SUCCEEDED | 2019-02-25T08:48:33Z | MERCHANTID2 | WeChatPay | DISCOUNT_FEE | -0.3206 | USD | CN |
12349 | 434139937 | 32H3ZWK | SUCCEEDED | 2019-02-25T12:16:45Z | MERCHANTID2 | WeChatPay | DISCOUNT_FEE | -0.3262 | USD | CN |
12350 | 434242249 | 3F4RACI | SUCCEEDED | 2019-02-25T17:29:50Z | MERCHANTID2 | WeChatPay | DISCOUNT_FEE | -0.6761 | USD | CN |
12351 | 434246938 | 3JEHQ3C | SUCCEEDED | 2019-02-25T17:40:51Z | MERCHANTID2 | WeChatPay | DISCOUNT_FEE | -0.6761 | USD | CN |
22222 | 434034364 | 3D1OAIM | SUCCEEDED | 2019-02-25T03:35:38Z | MERCHANTID1 | WeChatPay | DISCOUNT_FEE | -0.32 | EUR | CN |
33333 | 376162529 | 4Y175TR | SUCCEEDED | 2019-02-25T08:27:50Z | MERCHANTID1 | WeChatPay | DISCOUNT_FEE | -0.39 | EUR | CN |
44444 | 376163285 | 45I7048 | SUCCEEDED | 2019-02-25T08:31:33Z | MERCHANTID1 | WeChatPay | DISCOUNT_FEE | -0.243 | EUR | CN |
55555 | 432984714 | 264IT6S | SUCCEEDED | 2019-02-25T08:48:33Z | MERCHANTID1 | WeChatPay | DISCOUNT_FEE | -0.2206 | EUR | CN |
66666 | 434139937 | 32H3ZWK | SUCCEEDED | 2019-02-25T12:16:45Z | MERCHANTID2 | WeChatPay | DISCOUNT_FEE | -0.2262 | EUR | CN |
77777 | 434242249 | 3F4RACI | SUCCEEDED | 2019-02-25T17:29:50Z | MERCHANTID2 | WeChatPay | DISCOUNT_FEE | -0.5761 | EUR | CN |
88888 | 434246938 | 3JEHQ3C | SUCCEEDED | 2019-02-25T17:40:51Z | MERCHANTID2 | WeChatPay | DISCOUNT_FEE | -0.5761 | EUR | CN |
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_ID | PAYMENT_METHOD | EVENT_TYPE | EVENT_COUNT | AGGREGATE_AMOUNT | CURRENCY |
---|---|---|---|---|---|
MERCHANTID1 | WeChatPay | DISCOUNT_FEE | 4 | -1.17 | EUR |
MERCHANTID1 | WeChatPay | DISCOUNT_FEE | 3 | -1.25 | USD |
MERCHANTID2 | WeChatPay | DISCOUNT_FEE | 3 | -1.38 | EUR |
MERCHANTID2 | WeChatPay | DISCOUNT_FEE | 4 | -2.00 | USD |
Updated about 2 months ago