#robert

1 messages · Page 1 of 1 (latest)

grave oceanBOT
robust tangle
#

I'm running into an issue with updating a connected account's branding via the API. It looks like Stripe won't recognize valid file IDs for the purpose of updating the branding icon or logo.
...
I've verified that the files do exist. I even tried uploading a file first from the connected account's Stripe dashboard and then copying that file ID into this API request... but same issue.

#

Thanks for the info, looking in to what to do here and will get back to you

ebon kettle
#

Thank you!

#

I could provide actual account and file IDs too if that would be helpful

robust tangle
ebon kettle
#

Here's one req_eQsvBcCbUHI51R

robust tangle
#

Thank you! Checking in to that error on that request

ebon kettle
#

Great, thanks! In case it helps here's a file upload request that succeeds: req_WeclHXi9IdsEBJ and then here's the account update request that fails: req_R1zzpm3V0r1Fnl. You'll notice that the file id used in the 2nd request is the same ID that was returned by the first request.

robust tangle
#

Oh I see, the issue is that the file upload was created on the platform account but the call that failed was made on the connected account

ebon kettle
#

Ah. That would make sense. Is it possible to upload files on behalf of the connected account?

robust tangle
#

I believe so, you should be able to make the same call(s) but use that same Stripe-Account header for all of them

#

Would you be able to try that with your setup at the moment?

ebon kettle
#

Yeah let me try again. I thought I was passing the header but I'll double check it this time.

#

Okay here's my file upload request: req_0T0dFKxa8cT4On

#

Can you tell if that uploaded to the connected account correctly? I'm not sure I see that info in the logs. Though I am looking at the logs for the connected account.

robust tangle
#

Yes, that request was made on the connected account

ebon kettle
#

Okay here's the request to update the account branding: req_PPDlWEJn66ttLT

#

I'm passing the file ID that I just created

robust tangle
#

Not 100% sure how it should appear in your logs. I think that connect calls don't appear in your platform account's . Are you seeing those calls in your dashboard logs?

ebon kettle
#

Well I'm testing so I'm logged into my connected account's logs right now

#

I can check the parent account too

robust tangle
#

Oh I am sorry I misread the logs, it looks like the file upload is still happening on the parent account

#

Can you send the snippet of code where you are making that call?

ebon kettle
#

Yeah sure

#

I'm using the Node SDK

#

I might try to use a direct http request to the REST endpoint if I can't get it to work in Node

#
await stripe.files.create(
  {
    purpose: "business_icon",
    file: {
      data: file,
      filename: file.name,
      type: file.type
    }
  }, 
  {  
    stripeAccount: account.stripe_account.id
  }
)
robust tangle
#

I am going to reach out to my colleagues on this one. It actually does look like the file upload and account update calls are being made properly as far as I can see. Will get back to you with what we can find

ebon kettle
#

Okay thank you!

robust tangle
#

Can you try both of those calls again without the Stripe-Account header? It looks like I was wrong and both of these should be happening on the platform

ebon kettle
#

okay going to try that now

#

Boom

#

That did it

robust tangle
#

Nice! I was just getting back from successfully testing that myself

#

Again, apologies I was incorrect earlier. Did not realize which account this had to happen on

ebon kettle
#

Yeah no worries, glad we got it figured out!

#

Is there any other documentation about when I should act on behalf of a connected account vs act directly?

#

I haven't encountered anything aside from this files issue but I didn't know if there's more I should be look at to make sure I know when to do it this way

robust tangle
#

Usually our docs will flag that if it is part of the process. For standard accounts like you are working with there can be a decent mix but probably mostly on the connected account for things like payments and payment related objects. I am actually not immediately thinking of what other processes related to the accounts that would need to be made on the connected account but I would guess those would mostly be for configuring things on the account itself like this.

ebon kettle
#

Okay, yeah that makes sense. Up until now I've been developing with product/prices/subscriptions APIs on behalf of the connected account and I hadn't run into any issues. It was only when I was working on account updates that I encountered this.

#

Thanks for your help!