#Ben Clum - Stripe Account
1 messages ยท Page 1 of 1 (latest)
for some additional context, this is an express account in test mode
the API docs say that these fields are optional, so I would be surprised if they can't be cleared: https://stripe.com/docs/api/accounts/update#update_account-business_profile
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Do you have the specific request ID for the Update request?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
yes let me look
Okay you did manage to clear the city in the support_address property on this request by passing an empty string:
https://admin.corp.stripe.com/iar/req_ls6vI4AC4ZWBxH
it looks like the Ruby stripe gem is deleting those fields in the request: https://dashboard.stripe.com/acct_1Ie3zCS69F8scC0K/test/logs/req_IPwIgL0X1QeaXR
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I made this request: p.processor.update_account("acct_1Ie3zCS69F8scC0K", {"business_profile"=>{"support_phone"=>nil, "support_email"=>nil, "name"=>nil, "support_url": nil, "support_address"=>{"city"=>nil, "line1"=>nil, "line2"=>nil, "state"=>nil, "country"=>nil, "postal_code"=>"1123"} } })
Right, as I was saying I think you need to pass empty strings, not nil
If i pass empty strings it gives me Stripe::InvalidRequestError ((Status 400) (Request req_pYiauu4crUwDUW) Invalid email address: )
looks like support_email gives the above error with an empty string, and support_phonegives this error for empty string: Stripe::InvalidRequestError ((Status 400) (Request req_VVCuAKHIIxaSIg) You passed an empty string for 'business_profile[support_phone]'. We assume empty values are an attempt to unset a parameter; however 'business_profile[support_phone]' cannot be unset. You should remove 'business_profile[support_phone]' from your request or supply a non-empty value.)
so are email and phone number not able to be cleared? even though they are optional fields?
I'm trying to reproduce on my end
any updates here?
Well that's irritating. So None (Python) or nil (Ruby) work for support_phone and support_email.
Sorry, more chatter than expected
so it's an issue with the ruby stripe cli?
Not necessarily, I think it has more to do with the phone number/email validation processes
Just confirmed in the Python library, passing None for support_address.city does not update anything
But passing an empty string "" does unset the billing address info
empty string seems to work for all the fields except for phone and email
Yeah, I think it has to do with the validation functions for those two fields
do I need to submit a bug report somewhere?
I can raise it as feedback internally and you can create a Github issue for the client library if you want.
thanks! I'll do that