#zonosdustin
1 messages · Page 1 of 1 (latest)
Hi, can you share the exact/ fulls CLI request you're passing to your terminal?
I think you might have misspelled the parameter, https://stripe.com/docs/api/customers/create#create_customer-preferred_locales
Are you able to double check on that?
Yes.
I've tried several variations:
-d "preferred_locales=[auto]"
-d preferred_locales=[auto]
-d preferred_locales=auto
-d "preferred_locales=auto"
-d "preferred_locales=["auto"]"
Heres the full command with one example:
stripe customers create
--project-name=connect
-v 2022-11-15
-d "description=Customer for dustin+random@test.com"
-d "shipping[name]=Dustin Test"
-d "shipping[phone]=8015554444"
-d "shipping[address][city]=Midvale"
-d "shipping[address][country]=us"
-d "shipping[address][line1]=205 E. Greenwood Cir."
-d "shipping[address][postal_code]=84047"
-d "shipping[address][state]=Utah"
-d "email=dustin+random@test.com"
-d "name=Dustin Test"
-d phone=8015554444
-d "invoice_settings[footer]=Customer test footer note"
-d "preferred_locales=[auto]"
I think the issue is that you're passing [auto] there
Why?
That parameter asks that you pass https://stripe.com/docs/api/customers/create#create_customer-preferred_locales the customer’s preferred languages
I believe I read in a user guide that it was an available option to have the pdf select the local based on the browser, but I believe I have navigated away from that doc. Maybe I misunderstood.
Lol. I should have paid attention, that doc was for StripeJS supported locals.
No problem!
Do yo have a doc for the supported locals for this setting? I keep searching and ending up at the StripeJs doc.
Can you give me a valid example parameter? I'm trying the different syntaxes with fr but still getting the error.
Are you sating 'FR' and 'ES' are not working for instance?
Correct.
{
"error": {
"message": "Invalid array",
"param": "preferred_locales",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_RGfjpQQ8nUmY90?t=1693006406",
"type": "invalid_request_error"
}
}
Let me test this
Thank you
I've tried it with the quotes inside the array, outside, the array, and both.
It's all in the terminal via the CLI
My advice: never do curl for this
way faster to just write code with the langage you're familiar with like you would in your integration
but you want -d "preferred_locales[]=auto" I think
For sure. I'm running some "quick" tests.
Looks like that worked.
Thank you!!
Exactly what I needed. 😉
yay!
Do you mind if I close this thread? My team has to run and we're trying to close all threads
Yep I'm good now. Take care!