#Piercy-checkout
1 messages · Page 1 of 1 (latest)
as far as I know, no, it's not possible. You'd find out the final amount after the customer has paid(since for example the amount of tax is going to depend on what the customer ends up entering during the session etc)
What about if I already know the relevent location information? For example, I already know the billing address. Is it possible to pass that into the create checkout session to have it calculate.
it's not
so based on that, theres no way to preview a checkout session?
nope!
well bad news I guess. Ill go back to managers... thats not an ideal scenario though. Its surprising to me stripe doesnt offer this. It makes those properties I mentioned above next to useless
they're there so you can read them after the payment
I mean still seemingly pointless because after the payment I can use the invoice and other endpoints.
No problem, ill have to find a workaround
What about using tax rates instead of automatic, does that change the above scenario to a point where we can get the tax information?
well if you do it that way then you would have to write code to choose the tax rate to apply based on information you collect from the user
and then I suppose you can write some code to calculate the final amount based on the line items you intend to pass and the tax_rate you intend to pass, it would all be a lot of code
Yeah, i mean in our example, we are essentially signing up a club, which will be in a specific canadian province. So it will always be the same
about the only thing I can think of using the upcoming invoice endpoint, but that is not the same thing and I'm sure there's some edge case I'm not aware of, so my answer would be that it's not possible to preview this
you could try doing in test mode and see what the final amounts are on a successful payment and then you can message that to prospective live customers as to the expected amount