#jowthejow_code

1 messages ยท Page 1 of 1 (latest)

rain waspBOT
#

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

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

cerulean spear
#

Sorry first I wonder why you named your function createCheckoutSession where in actual it calls an Account Update API? Seem unrelated

#

And the error seems to be the icon parameter

lusty pagoda
#

Hummm.... now that you mention I understand the below shouldnt be called everytime a checkout sessions is made: "// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
const stripe = require('stripe')('sk_test_51PXooJHIfwP9MV0CggKG0OP1VO6t2SsenmZ3wFCuAtPtEFArtUJeJfKdRazuNwFJvUluXfpcdL7zVIK8SXDLrYzY00qgsGPoWZ');

const account = await stripe.accounts.update(
'{{CONNECTED_ACCOUNT_ID}}',
{
settings: {
branding: {
icon: '{{FILE_ID}}',
logo: '{{FILE_ID}}',
primary_color: '#663399',
secondary_color: '#4BB543',
},
},
}
);"

#

Let me see if I can find the error in my log

#

This is all i see...

#

The last two posts were my attempt to get new file ids

cerulean spear
#

Hmm that means the SDK errored before ever sending to Stripe API ๐Ÿค”

#

But if you stop calling that Account Update API, it won't happen anyway

lusty pagoda
#

ok... but then if i move it to my create account call, i will probably get the same error no?

#

Like this:

#

exports.createAccount = async (req, res) => {
try {
const { email } = req.body;

const account = await stripe.accounts.create({
  capabilities: {
    card_payments: { requested: true },
    transfers: { requested: true },
  },
  country: "BR",
  type: "custom",
  email: email, // Add email to the account creation
  settings: {
    branding: {
      //For Live:
      // icon: "file_1QNJoQHIfwP9MV0CF9UnXhcF",
      // logo: "file_1QNJnIHIfwP9MV0CcM4zIWKb",

      //For test:
      icon: "file_1QNKE4HIfwP9MV0CfAlhD6Xc",
      logo: "file_1QNKEgHIfwP9MV0CnY0x16kh",
      primary_color: "#9500ff",
      secondary_color: "#bd75f0",
    },
  },
});

// Return account id
return { account: account.id };

} catch (error) {
console.error("Error creating Stripe account:", error);
res.status(500).json({ error: error.message });
}
};

#

Ill test, just a second

lusty pagoda
#

It worked ๐Ÿ™‚

#

Is there a place where I could see all my uploaded files? I bet I have a ton there now

cerulean spear
lusty pagoda
#

Thanks

#

One last question... in the embeded form for connect accounts... can I pre-fill some of the parts so that it becomes shorter for the user?

#

Like the type of wokr they do to receive payments through my platform, it is all the same since they are all tattoo artists...

#

I could remove that step if Ican possibly pre-fill it in the account creation

cerulean spear