#undefined - fees
1 messages · Page 1 of 1 (latest)
Taking a look now
To clarify some more: I'm now using a webhook event to set the payment status and to set the stripe fees that are paid, it works great. But was just wondering if I can set the stripe fees at the same time the checkout session was started.
When you say "set Stripe fees that are paid" what do you mean? Are you just trying to pass-through the Stripe fees to the Customer when they enter the Checkout session?
Ah sorry should have clarified some more: In my application I've made an Order object where I 'set' / save data. And basically yes, I would like to get the Stripe fee given an amount and used payment method. But now that I think about it would probably be safer to just set this data after the payment was successful.
Thanks for the context! Are you just needing a post-payment report of all the fees by payment-type then? I'm trying to understand where in the lifecycle of a payment you need this data and why.
Just don't want to point you in the wrong direction or cause a false-start
Sure!
I need to create an invoice with all the costs for the customer after a payment was made. So for example:
- Product: 10 euro
- Stripe fees / transaction costs: 0,29 euro
subtotal: 10,29 euro
tax: 2,16 (21%) euro
total: 12,45 euro
Currently I'm doing the following:
My app makes the order object and sets the product prices data.
My app creates the checkout session
The customer completes the payment
My app waits for the completed checkout webhook event
My app then sets the fees that are paid to Stripe using the balance/transaction API.
My app then calculates the correct tax and changes the subtotal field.
Would be a bit cleaner to set it upfront before the actual checkout session is started. But not sure if that is a good idea or not. And if it's even possible using the Stripe API.
I hope that helps! Thanks!
Ahhhhh, okay. Thank you for the verbosity!
So, there isn't a graceful way to calculate the Stripe fees without hard-coding the applicable rates. This becomes exponentially more complicated for every country and currency you might take payments for. Post-payment fee calculation is the only "right" way here IMO.
Allright!
That is fine, and thanks for confirming that
Better to be safe than sorry I guess
🙂
For sure! I wish I had a better answer for you. Seems awfully anti-climactic after all the preamble (apologies)