Created
May 19, 2017 12:50
-
-
Save joelbradbury/7f36da27b16a8d186072980afeea73f4 to your computer and use it in GitHub Desktop.
Floom discount debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
£43.99 | |
ch_1A4WhUJOG9s44O5lPIPAvEhD | |
https://dashboard.stripe.com/payments/ch_1A4WhUJOG9s44O5lPIPAvEhD | |
Transaction with an 18% discount | |
--- | |
Ratable total (products) : £45.00 | |
Total discount: 18% of £45.00 == £8.10 | |
Total rateable after discount = £36.90 | |
Delivery: £6.99 | |
Customer Paid: 45.00 + 6.99 - 8.10 = £43.89 | |
A. Floom standard fee (if there were no discount) @20% = 45 * 0.2 = £9 | |
B. Floom application fee of 20% : (45 - 8.10) * 0.2 = £7.38 | |
Merchant expected payout: | |
= (product + delivery - floom fee) | |
= 45 + 6.99 - 9 | |
= £42.99 | |
Merchant actual payout (case B) : | |
= (product(adjusted) + delivery - floom fee(adjusted)) | |
= 36.90 + 6.99 - 7.38 | |
= £36.51 | |
Merchant Underpayment: | |
= Expected - Actual | |
= 36.51 - 42.99 | |
= £-6.48 | |
Merchant made up total: | |
= Actual + Makeup payment | |
= 36.51 + 6.48 | |
= £42.99 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment