#ronho

1 messages · Page 1 of 1 (latest)

coral willowBOT
left stream
#

i can see the new postal/zip attached to the customer

edgy heart
#

When you customer go back and correct the mistake, what is the status of the Invoice?

left stream
#

stil in draft

#

in_1OCvAGBrTZhN2ebMUWqwdhej

#

the postal code on the customer is in BC, so theoretically it should charge GST/PST instead of HST

#

just not sure how to get the tax_rate to update

edgy heart
left stream
#

yeah

#

this is the code snippet after i modified the customer

#
invoice_details = stripe.Invoice.modify(
                draft_invoice,
                automatic_tax={"enabled": True},
                expand = ['total_tax_amounts.tax_rate'],
            )
edgy heart
#

Umm can you provide its request id? req_xxx

left stream
#

yes one second

#

hmm sorry where can i see the req id?

#

req_0JJUeOyKuuoLFN

edgy heart
left stream
#

i think this might be it

edgy heart
#

Hmm I see, and txr_1OCv6rBrTZhN2ebModynXhsn on the response is the old tax rate?

left stream
#

yes thats correct

edgy heart
#

Just idea but can you try to turn off automatic_tax and then turn on again, via 2 API calls

#

Btw this says you can just finalize after update the address

#

Could you try in test mode to see if it's updated to the new address?

left stream
#

im not sure about the second suggestion about finalizing after updating.. what do i do if the updated address is still invalid?

edgy heart
#

The second suggestion is to update the address to correct value (correct the mistake) and then try to finalize again. Let's just try it to see if it still give you the previous error

left stream
#

ok turning it off and on actually worked

#

would that result in extra charges? i guess one extra charge since stripe tax has to recalculate?

#

or not really since the first one didn't calculate in the first place

edgy heart
#

I don't think so though. But any the second suggestions mean if you just proceed to finalize (without tunring off and on) you can still have the same effect. Can you quickly try it?

left stream
#

ok

#

wait so

#

so right now my flow is

#

enter card info (and gather postal/zip) -> show the confirmation screen with tax -> finalize and pay

#

i wait till the last moment to finalize

#

so i need to move up my finalization step basically?

edgy heart
#

but when stripe tries to calculate tax, it gives me an error
Which step is this on your above flow?

left stream
#

during finalize and pay

#

but we would like to display the updated tax during the confirmation screen, before we finalize

#

because the user can still back out and change their card info, and then we'd have to update the tax

#

and if we finalize before they hit confirm and pay, then we cannot update the tax values

edgy heart
#

Yes so you would want them to inpurt again back in the previous screen, then proceeed again to the finalize and pay screen

left stream
#

right, but once i get to the confirm page, i haven't finalized yet

#

but i would need the updated tax values already

edgy heart
#

I know, but the suggestion means if you finalize there, with your customer already update the newest address, it should automatically use the updated value

#

Can you just try it in test mode?

left stream
#

ok, so basically try to finalize on the confirm screen

#

so if i finalize on the confirm screen then yes i dont need to turn it off and on

#

but it causes the other issue where if the customer goes back again to update their address then the invoice is locked

edgy heart
#

Why? The Invoice is still in draft and how can it be locked?

left stream
#

but you said to try to finalize again right?

#

so now its:

  • user enters bad postal
  • try to finalize on confirm screen, fails
  • goes back to correct
  • go to confirm screen again
  • try to finalize
  • finalize successfully
  • user presses "confirms" invoice gets paid
edgy heart
#

Yeah this flow looks great to me. Do you mean even after this the customer can go back again and update their address?

left stream
#

yea that is correct

#

the customer can still go back to change their payment at this point

#

which is why i finalize so late in the flow, so that if the customer returns to a previous screen i can still update the invoice

edgy heart
#

Finalized Invoice can't be changed anyway. So if you want to provide the flexibility, should be before finalizing