#zeke_best-practices

1 messages ¡ Page 1 of 1 (latest)

arctic lagoonBOT
alpine finchBOT
#

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.

arctic lagoonBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260093067608854579

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

eternal whale
#

Hi there, how can I help?

cunning sorrel
#

@eternal whale Can you help me with this ERR 400 please

#

parameter_missing - application_fee_amount
Looks like you are missing the application_fee_amount field. This field allows the platform to take an application fee on direct charges. It can be any positive number up to the amount of the charge.

#

RQ: req_beRx5xR1lIhbkC

#

HERE is my code

#

const stripeSession = await stripe.checkout.sessions.create({
success_url: ${process.env.NEXT_PUBLIC_SERVER_URL}/thank-you?orderId=${order.id},
cancel_url: ${process.env.NEXT_PUBLIC_SERVER_URL}/cart,
payment_method_types: ["card"],
mode: "payment",
metadata: {
userId: user.id,
orderId: order.id,
},
line_items,
payment_intent_data: {
application_fee_amount: 123,
},
});

    console.log("Stripe session created successfully:", stripeSession);
eternal whale
#

What are you trying to achieve? Direct charge or destination charge?

cunning sorrel
#

I believe a direct charge! Im trying to take 10% of each product sold on my marketplace

eternal whale
#

You should specify a stripe_account in the request.

By specifying a stripe_account, you are telling Stripe that you want to make an API call on behalf of a connected account. You can refer to this doc to learn more about making API request for connected account (https://stripe.com/docs/connect/authentication)

Learn how to add the right information to your API calls so you can make calls for your connected accounts.

cunning sorrel
#

So like a connected user?

#

Or put myself down