#kesbal-Tax

1 messages · Page 1 of 1 (latest)

little matrix
#

👋 happy to help

#

it's going to take me a minute to get you your answer, I don't have it off the top of my head. please bear with me

little matrix
#

so basically have you considered using Checkout? It would really takeaway all of this integration hassle and deal with it for you

#

that could be a really good alternative for you

#

if you want to stick on your current integration then you'd have to change the workflow to get the ip_location before creating the Customer and pass that at first

mystic egret
#

Ok.
What about if he changes country field and I need to show recalculated tax and total amount? Should I use /v1/invoices/upcoming for this or update Stripe Customer location?

mystic egret
gray sandal
#

I think either would work but /v1/invoices might be a bit lighter.

#

This is for the page before you create the subscription right?

mystic egret
#

No, after subscription object already exist

gray sandal
#

Gotcha. So having that all on one page will be a bit tricky because of how subscriptions + the payment element work

#

Basically, to have the payment intent, you need your subscription's invoice to be finalized, so you won't be able to edit the invoice or change the price on the payment intent really.

#

So you will need to create a new subscription, start a new subscription cycle to create a new invoice, or have this payment intent be separate from the subscription and just start your user with a 1 month trial

#

Also now that I think about it you will need to delete the first payment element that was on the page and generate a new one as payment intents currently can't be swapped out at the moment.

#

I am trying to think of whether there are easier ways to that middle part of getting a new payment intent.

mystic egret
#

I think it's possible to have subscription with invoice and payment intent assigned when 'payment_behavior' => 'default_incomplete' passed during POST /v1/subscriptions. It's only I don't know if I can update that invoice (with status="open") later to reflect new customer location

gray sandal
#

I don't think you can modify the subscription like that while it is open unfortunately. Will check in to it and get back to you