#demisel-checkout-taxid
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Can you share an API request ID for this error? It will start with req_
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Sure : req_ecuM28EC4j6aOo
And do you have an example of an API call with the same parameters that worked?
yes, here is one from another dev's local environment :
req_3AvGrZ4Vn54wNg
Actually has even less entries in customer_update, but I have already tried that, and doesn't fix the issue (would be even stranger if it did ๐ )
Another one that went ok from the sandbox environment req_VpanYVClbHQuuj
At some point we wondered if may be due to my environment not getting webhooks, but the issue keeps happening even with webhooks setup (and successfully answered)
This request is not attempting to collect tax ID information
What happens if you leave that out of your request
We actually want to optionnaly collect a tax id if the user ticks the box that says they are a company, but sure I can try by remove that
So indeed the requests works fine by removing
.setTaxIdCollection(
SessionCreateParams.TaxIdCollection.builder()
.setEnabled(true)
.build())
.setCustomerUpdate(
SessionCreateParams.CustomerUpdate.builder()
.setName(Name.AUTO)
.build())
But we'd like to leave this on
Wait, I totally missed it. The answer is in the error
Ah yes I know what you're going to say
But let me enable the address update again; the error will be raised anyway, wait a bit
Trying that again :
.setTaxIdCollection(
SessionCreateParams.TaxIdCollection.builder()
.setEnabled(true)
.build())
.setCustomerUpdate(
SessionCreateParams.CustomerUpdate.builder()
.setName(Name.AUTO)
.setAddress(Address.AUTO)
.setShipping(Shipping.AUTO)
.build())
There : req_lqI8m13t3TAZ6aerror 400 with the same error message :
We could not find a valid address on the provided customer. To enable tax ID collection, please set customer_update[address] to auto.
Although the body contains :
"customer_update": {
"name": "auto",
"address": "auto",
"shipping": "auto"
},
Just tried adding
"billing_address_collection": "auto",
Got the same result, error 400 with the error talking about customer_update[address]
Hmmm ... ๐ค
And again, those exact same requests work when called from other dev environments
The previous requests you shared were different between "your" request and other requests. Are you certain those requests are exactly the same?
Yes that is true they are not exactly the same, the line_items and callback urls are different. It doesn't feel like that should have an effect though
Are they also requesting tax ID collection?
Yes, req_3AvGrZ4Vn54wNgfor instance
Same API Version, only different client ip, line items and callback urls
This customer has a completed address though
I'll try again with a valid address, but afair providing an already valid address didn't solve the issue
Alright @thorny panther you solved it !
Our backend code put the locale instead of the country in the address, which failed because I was in the enlocale. The other developper got it to work by being on the frlocale, which appears to resolve to a valid address
Thanks for your help !
Great ๐ I'm happy we got that resolved ๐
To be fair, you're the one who did all the digging so don't forget to pat yourself on the back too
Maybe something could be changed about the documentation ? I was expecting the API to accept an invalid address and allow updating it through customer_update[address] = auto
That is a good suggestion and I will raise it internally