#newton_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1223011253807616141
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there!
Right, this is unrelated to AVS.
I'm looking at this: https://docs.stripe.com/tax/customer-locations
We list supported formats for address values. This section will likely be helpful: https://docs.stripe.com/tax/customer-locations#handling-errors
Errors are returned if a location is deemed invalid at the time of invoice finalization
Errors are returned if a location is deemed invalid at the time of invoice finalization
Interesting! So we won't know about the invalid address until time of invoice ...
Still reading the links your provided above (thanks!) but does this mean an invalid address means tax can't be calculated and we won't know at time of checkout if the invoice is days/weeks/months later?
Oh wait. https://docs.stripe.com/tax/customer-locations says "When finalization happens during an API request, such as creating a subscription or sending an invoice, Stripe returns a customer_tax_location_invalid error"
So if we add a trail period of X days then the first invoice finalization won't happen for X days but the address will be validated immediately instead of in X days?
As long as you collect an address from your customer at the start of the trial, yes.
And yes, the first non-zero invoice will happen in X days
but that first non-zero invoice will fail to finalize if the customer's address is not valid.
We close idle threads, which makes them read-only
How long until a thread is considered idle?
I don't want to bomdard you w/ questions (that may already be answered in the links you provided) to keep the thread alive if I have time to fully read through the links you provided before asking more follow up questions.
We usually close after it's been idle for ~20-25 mins
Question 1) If we don't use Stripe Tax (and instead use a service like AvaTax) is address validation still done?
Question 2) Is any address validation done if there is no invoicing done? E.g., We create some Customer objects w/ an address ( https://docs.stripe.com/api/customers/object#customer_object-address ) in advance is there anyway to check that the address is valid before creating the first invoice?
1: Yes, validation is still done
2: Yep! If you create a customer and add a value for address or shipping address, we'll still validate. You can retrieve the customer and expand the tax hash even before/without creating an invoice or subscription
If we retrieve the customer and expand the tax hash and then tax.automatic_tax has the value of unrecognized_location is there a way to know what specificaly is wrong? E.g., "invalid zip code" or "street does not exist"
Hold on, let me do a bit more testing
No, it's not more granular than this.
If it's unrecognized_location, we recommend collecting the address from the customer once more and checking the tax hash again
OK. Thanks
Is there a way to get more real-time feedback on the address validation? E.g., if we use the Embedded form ( https://docs.stripe.com/checkout/embedded/quickstart ) and have the Session object with billing_address_collection set to required (https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-billing_address_collection) will the embedded checkout form block submission until the address is valid? Or does the verification still not happen until later so a customer can submit an invalid billing address?
Submission of the form will be blocked until a customer provides an address, and at least the minimum valid values to be able to calculate tax
So, for example, a US-based customer is prompted for line 1, line 2, city, postal, state, country. They cannot submit the form with an invalid postal or without providing country; we auto-populate state based on postal.
OK, thanks!
This is super helpful.
I think I'm out of questions for now.