#Scott Prins
1 messages · Page 1 of 1 (latest)
Hi, are you able to share the request id where you're seeing this error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
I'm trying to allow the connected accounts to accept the payments directly and I take a platform fee
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);
const creatorStripeAccount =
await ctx.prisma.userStripeConnect.findFirstOrThrow({
where: { userId: input.userId },
});
const paymentIntent = await stripe.paymentIntents.create(
{
amount: input.amount,
currency: "usd",
automatic_payment_methods: {
enabled: true,
},
application_fee_amount: input.platformFee,
},
{
stripeAccount: creatorStripeAccount.stripeId,
}
);
return paymentIntent;
} catch (error) {
console.log(error);
}```
Yep so are you setting the Connected Account header client side when you render Payment Element: https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application ?
Yep that's the problem
these are the two errors I get, and it didnt start happening until I added the application_fee_amount and the stripeAccount fields in the payment intent
Need to initialzie Stripe using your publishable key and the Connected Account
Client side
so not my(the paltform) account?
You use your platform's publishable key and the Stripe Account header. See the doc above
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});```
ok I think its somewhat working, but I am in test mode and in the platform account I am not seeing the fee being added to my account, is it under a payment or somewhere else?
Can you provide the PaymentIntent ID you are testing with?
The actual PaymentIntent will exist in your Connected Account
Which you can view from your platform
oh it's there under collected fees
The fee will be in a separate tab on your platform Dashboard here: https://dashboard.stripe.com/test/connect/application_fees
Yep
one other qoestion
how do I take on the stripe processing fee and not pass it to the connected account?
You can't
You would have to build it into your app fee
The processing fees will always take place on the account where the charge takes place
I tried to, I got the payment amount for the donation from the form, then I add 12% to that to cover my fee plus Stripes fee at the time of creating the paymentIntent, but I still see both fees showing in the connected account's dashboard
Right that's what I mean. It is impossible to not have the processing fee happen
You would just take a smaller app fee if you want to be responsible for the processing fee as the platform
makes sense I guess