#surajbarailee_code

1 messages ยท Page 1 of 1 (latest)

simple ledgeBOT
#

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

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

opal zenith
#

Hi, what is the connected account id you're trying to update?

hybrid orbit
#

you mean the account id ? acct_1OEqpsRkbsG1ImKL

opal zenith
#

yes, so that file does belong to that account so what you suspected is not the issue. Can you share the request id where you attempted to upadte it? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request

hybrid orbit
#

req_6p7dDzbKOuFrlv

opal zenith
hybrid orbit
#

But this isnt a file not found issue, is it ? Its just that you cant update logos in standard connected accounts ?

opal zenith
#

It is the latter

hybrid orbit
#

Is there any other way around ? Like providing the logo while you create invoice, rather than saving it beforehand?

opal zenith
#

Testing this

#

Hang tight

simple ledgeBOT
desert hatch
#

Hi there ๐Ÿ‘‹ my teammate is going to need to step away soon, so I'm also starting to look at this.

It looks like you're using Standard Connected Accounts, so there may be limitations about what branding settings you can control as the Platform, since your Connected Accounts have access to their Stripe dashboard where they can maintain all of these settings themselves.

When you created the File you're trying to reference in your account update request, did you use the stripe-account header? If so, do you see the same error when updating the Connected Account with a File that was created without that header?

hybrid orbit
#

let me share the code i am using..

#

async uploadFileToStripe(fileUrl: string, accountId: string) {
const response = await fetch(fileUrl);
if (!response.ok) throw new Error('Failed to fetch file from URL');

    const buffer = await response.arrayBuffer();
    const file = await this.upload(
        { buffer: Buffer.from(buffer), originalname: 'logo.png', mimetype: 'image/png' },
        'business_logo',
        accountId,
    );
    return file.id;
}

async upload(payload, purpose, accountId) {
const upload = await this.client.files.create(
{
file: {
data: payload.buffer,
name: payload.originalname,
type: payload.mimetype,
},
purpose: purpose,
},
{ stripeAccount: accountId },
);

    return upload;
}
desert hatch
#

Gotcha, so you are using the stripeAccount header. Do you see the same error if you drop that from the File upload request?

hybrid orbit
#

yes, i get the same error. Thats why i am confused. And also when i try to list down the files using retrieve of that specific accountId, i see that file in the list

desert hatch
#

Can you share an Account update request and a File ID where you tried that approach?

#

The file shouldn't exist on the Connected Account here.

#

Intuitively I agree that it feels like it should, and I've been pushing for that behavior to exist, but for now updating the branding settings of a Connected Account requires that the file be uploaded to the Platform Account (so stripeAccount should not be used when uploading the file).

hybrid orbit
#

file_1QyarbDeVbvXTUn9LPIDPawD

and i was calling this :

await this.client.accounts.update(
accountId,
{
settings: {
branding: {
logo: file.id,
},
},
},
{ stripeAccount: accountId },
);
}

desert hatch
#

I don't think that call should have the stripeAccount header either.

hybrid orbit
#

yeah i tried removing from both the calls. I still get the same No such file upload.

desert hatch
#

Can you share the IDs of requests from where you tried that?

hybrid orbit
#

req_9WHONXuwAtmK0F

desert hatch
#

Can you double check your code? My tooling is still showing that request was made with the stripeAccount header.

hybrid orbit
#

I think it worked. Well, at least there is not "No such file " problem.