#luxterful_error

1 messages ยท Page 1 of 1 (latest)

steady edgeBOT
#

๐Ÿ‘‹ 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/1339181541343100953

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

broken thistle
#

hi there!

split socket
broken thistle
#

you didn't set an address on that customer, so it's expected that you get an error

split socket
#

As described above we add the address to the stripe.confirmSetup method like this:

payment_method_data: {
billing_details: {
email,
address: {
country,
postal_code: postalCode,
state: "",
city: "",
line1: "",
line2: "",
},
},
},

By calling this function we get redirected and i extract the payment method from the setup intent. I add the payment method to the customer. The payment method has the address - i have verified that. This worked last week without any error!

broken thistle
#

in the request you shared (req_2am0Re60ULaegR), you are creating a brand new customer without an address, while at the same time requiring to validate the address. so it's expected to fail.

#

so you should either provide the address when you create the customer, or don't set validate_location: "immediately" when creating the customer

split socket
#

The issue is that this worked last week without this error. Did you change anything in the API?

broken thistle
#

can you share a request ID where you created a customer without an address and with validate_location: "immediately" and it worked?

split socket
#

one sec

#

req_kNaXOKNI2X9KQL

broken thistle
#

thanks, having a look

#

you didn't use the same API version for the two requests, so that might explain the different behaviour

split socket
#

So the newer API does not have this functionality?

#

OR: i also see that in the request when it worked the default payment method was also set immediately. Could this also be the issue that it is missing in the reqeusts when it did not work?

broken thistle
#

i also see that in the request when it worked the default payment method was also set immediately.
that's true

#

could you make some tests on your end to see if adding default_payment_method, or changing the API version fixes the issue?

split socket
#

i will. thanks for your help so far โค๏ธ

steady edgeBOT
split socket
#

adding the default_payment_method solved it

#

we have refactored the code since we thought that it was redudent because on subscription creation the default PM is set as well

#

but turns out its necessary here ๐Ÿ˜„