Hey there! I’m building a way users can raise money through donations with the Stripe plugin. I want to create a simple option for the person donating to choose to pay the transaction fees on top of the amount they are donating, so the person receiving the money receives 100% of the amount wished to donate.
For example, if someone chooses to donate $50 and they click a checkbox to choose to pay the Stripe transaction fees (2.9% + 30cents), they would be charged $51.80 total and the charity would receive $50.00.
However, this math is a bit complicated for a simple workflow in Bubble, especially if I add in my app fees on top. Workflow-wise, how would you go about getting this total in Bubble to work properly?
That is a good question, because if you were to try to charge the amount + the fees, then that would change the amount, thus changing the fees as well. Kind of a catch 22. Hmm
Structure it as a formula where each part is added on top of the base donation amount. Stripe works in cents, not dollars, so make sure to convert if you’re working with dollar amounts in Bubble. For example, a $10.00 donation would be 1000 cents in Stripe, not 10. Add your app’s fee by including any percentage or fixed fee you set.
You can set up flows that use custom states or group values (the “group VARs” technique) that use state data to calculate the parts that make up the total and … the total … dynamically.