#sapir.asras
1 messages · Page 1 of 1 (latest)
should I send the phone number in international format only for the person object?
and for companies send the phone number as it is?
Hi there, I noticed you've inserted many spaces into the phone number " 1 234 204 3879". A valid phone number should look like "+12342043879"
it's also not working without the spaces https://dashboard.stripe.com/acct_1K6xCM2HOUDgIskJ/logs/req_NPS60osCXZrF3M?t=1682320278
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
and I send it with +1 and it ignores the +
-d "company[phone]"="+12342043879"
That's because you added a leading space character, see https://dashboard.stripe.com/logs/req_NPS60osCXZrF3M
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
this is the way I send it:
-d "company[phone]"="+12342043879"
I'm not sure why it's adding an extra space
I tried this and it's still adding space
https://dashboard.stripe.com/acct_1K6xCM2HOUDgIskJ/logs/req_Bgkp571WsyZZ6O?t=1682320618
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Send me your full Stripe CLI command
with the live key?
No, without the live key.
curl https://api.stripe.com/v1/accounts/acct_1K6xCM2HOUDgIskJ \ -d "company[phone]"=+12342043879"
Change -d "company[phone]"=+12342043879"
to
-d "company[phone]"=+12342043879
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Show me your full command?
curl https://api.stripe.com/v1/accounts/acct_1K6xCM2HOUDgIskJ \ -d "company[phone]"=+12342043879
How do I include special characters like @ and & in the cURL POST data? I'm trying to pass a name and password like:
curl -d name=john passwd=@31&3*J https://www.mysite.com
This would cause
looks like it's a problem of how curl interpret the post data
-d "company[phone]"="%2B12342043879"
Try this
it works like that
but what is the difference between this update to this
curl https://api.stripe.com/v1/accounts/acct_1K6xCM2HOUDgIskJ/persons/person_1N0JCH2HOUDgIskJ6m5xkRAg \ -d "phone"="+1 234 204 3879"
this working just fine
I'm not an expert in curl, please consult the curl manual on how it interpret post data
I'm trying to make changes in the code, I'm sending the update with the api I used the crul just to test the updates
so when I use update account it fails if I send it in this format +1XXX but on the person it's faling
I just want to make sure what is the format you are expecting because I was told once to send it in this format +1XXX for updating account or person but know I see errors
so should I use this format only for persons updates?
Hey! Taking over for my colleague. Can you share the requestId of the failure request ?
Hi @grim gulch I'd suggest you to test it from the actual code instead of curl.
Check the body of your request phone: " 12342043879", you are not sending +
As I explained earlier, the curl command misinterprets the data (i.e., change + character to an empty space), and therefore causes the API fails.
just a sec I'll try to find the log of the request that failed from the update sent from the code
this is the request that failed
https://dashboard.stripe.com/acct_1K6xCM2HOUDgIskJ/logs/req_StUXfNNhH96tQl
That's because you added many spaces in between the phone number.
Change +1 234 204 3879 to +12342043879
but here it works with the spaces
https://dashboard.stripe.com/logs/req_gAHMTLhlle7ft3
If you want to use spaces in all cases upgrade your API the the latest version 2022-11-15, otherwise, remove all spaces in all your current cases.