#Gkiokan-hi
1 messages · Page 1 of 1 (latest)
Hi there! What is your question?
@boreal timber please write your question in this thread.
Oh sorry mate. I just wrote the question on a new message. My bad.
No worries, I adding it to the thread here:
Yesterday I got a strange bug that resolved in a customer_tax_location_invalid. Apperently I was using all kind of addresses and they worked. I reworked my code to create first the Customer on registration process with Stripe and use a 0 euro subscription on registration.
Since then It throw me the customer_tax_location_invalid and couldn't locate the tax country automatically.
Even real addresses where rejected. Now I have changed my create stripe customer parameter with country => 'DE' to enforce that.
Is this a bug or what is fully here? As I said, I used any kind of addresses before and they worked. This confuses me why it is not working partially now.
can you share the request ID where you see that error?
Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
lemme check
req_LKlOps0Wi5MpQ3
take this as example
this was the last one i guess
req_Iw0FUDxcNUIGDE
This one is working but this has the country => 'DE' as appended hardcoded parameter.
Do you need my account id or something so you can see all other logs, too?
Thanks! Give me a few minutes to look into this.
For the error this is the request for the user that has been created req_u7Ao5yz5hA9iAZ
The customer creation doesn't return the tax location error. The subscription does it.
Sure take your time. It drove me nuts all the night yesterday
For req_LKlOps0Wi5MpQ3, the customer you used is cus_LmreUByNZh2W7P.
This customer does have an address, but the country is not set, so I think this is the issue
As you can see on this page, we do need the country to compute tax https://stripe.com/docs/tax/customer-locations#supported-formats
When creating a customer, you can look at tax.automatic_tax to know if the address is valid for Stripe tax or not. https://stripe.com/docs/api/customers/object#customer_object-tax-automatic_tax
lemme check
But this worked for the last months. Only now after I change the code flow to create the customer on registration instead of the subscription time this happend.
On customer creation I have this one "tax_exempt": "none",
Is there a way to check the location verification on it's own?
But this worked for the last months. Only now after I change the code flow to create the customer on registration instead of the subscription time this happend.
Could you share an ID where this worked?
Is there a way to check the location verification on it's own?
I recommend using what I mentioned earlier:tax.automatic_taxon the customer. Note that you won't see this field by default, you need to expand it https://stripe.com/docs/expand
Unfortunatelly I deleted all test data to see how it would work out on a clean fresh production env
Sure. Lemme modify the code I will check and reply to you afterwards
Interesting
can you check this out
I just dleeted all customers again and migrated a fresh db
Customer create with hardcoded country worked.
But If I update only the street parameter it then again throws out the country value and says "tax country not set"
cus_Ln2OoeYD9rqpMb
But the Address is legit itself
again throws out the country value and says "tax country not set"
where does that happen/where do you see that exactly?
On the Stripe Dashboard on the customer itself
this part here
Status des Steuerstandorts
Nicht erkannter Standort
Lemme set the country code for the customer on update hardcoded I guess it should automatically find it
The thign is. This was never an issue before. Seems to be something with my config after I deleted the test data
ok
i wait
This is the customer ID cus_Ln2OoeYD9rqpMb
I know yep
so I mean this seems normal to me, the address you provided is missing the country component so that's not a complete address.
You say that it used to work, which maybe is possible(it's entirely possible we have started being more strict about this), hard to say without a previous example. Either way the path forward is clear, just collect the country in whatever method you have to get the customer's address.
On the documentation for the tax location it says it is strict for the US but for example the EU it is enough if you provide street and city or postalcode
can you link me to that documentation?
Yea the only workaround I could do now is to set the country code hardcoded for now as we will only deploy in germany
Sure
seems really easy yes
Below the tap "Everywhre else"
ouh, all of them to have country code. But this doesn't explain why the location recognition worked before
interesting; like I said it's possible we changed this and haven't updated the docs yet
I see
Do I have somewhere in Stripe a global config to set a default country?
So I could omit the country part