Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joelbradbury/7f36da27b16a8d186072980afeea73f4 to your computer and use it in GitHub Desktop.
Save joelbradbury/7f36da27b16a8d186072980afeea73f4 to your computer and use it in GitHub Desktop.
Floom discount debug
£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