#wackness_api

1 messages ¡ Page 1 of 1 (latest)

deft vaporBOT
#

👋 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/1361672410150998067

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

spiral sparrow
#

And sorry I forgot, I cannot set a business name to the connected accounts, I don't have access to them

green scroll
#

Hi, let me help you with this.

#

Where do you see the error exactly?
And how does the payment succeed if you see an error?

#

It seems like you want to use direct charges - where the Connected account (CA) is charging the customer directly. This way the CA pays the fees.

Direct charge:
stripeAccount=user.stripe_account_id

Destination charge (Platform charges the customer, then transfers funds to CA):
transfer_data[destination]=user.stripe_account_id

spiral sparrow
#

Yes sorry my explanations are wrong. Currently the payment is not suceeding with this setup:
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [
{
price_data: {
currency: 'eur',
product_data: {
name: Facture ${facture.invoice_number} pour ${facture.client},
},
unit_amount: Math.round(totalTTC * 100),
},
quantity: 1,
},
],
mode: 'payment',
success_url: http://localhost:3000/payment-success?facture_id=${id},
cancel_url: http://localhost:3000/payment-cancel,
metadata: { facture_id: id.toString() },
}, {
stripeAccount: user.stripe_account_id,
});

#

I want to use Direct charge yes

#

When I use this :
payment_intent_data: {
on_behalf_of: user.stripe_account_id,
transfer_data: {
destination: user.stripe_account_id,
},
},

The payment succeeds but my account pays the charge

green scroll
#

payment_intent_data: {
on_behalf_of: user.stripe_account_id,
transfer_data: {
destination: user.stripe_account_id,
},
},
You shouldn't use this when making Direct charges.

#

Have your Connected account go through onboarding?

spiral sparrow
#

Yes now I know it's the wrong settings.
No that is the issue, I cannot make an onboarding since they are tests account

#

I don't have control over them, they are created when I connect through OAuth

green scroll
spiral sparrow
#

I tried earlier but the onboarding is asking for like 2FA, banking details etc

green scroll
#

You should be able to complete the onboarding in test mode.

spiral sparrow
#

let me check

#

req_J3Eu0vxD1YuRkr

green scroll
#

This is the destination charge.
I am asking about the call that produces the error.

#

I don't see that you're creating account links for onboarding for this account.

spiral sparrow
#

This maybe req_WXBubE9jcceIe1

#

Sorry i'm very new to Stripe

green scroll
#

No worries.

green scroll
spiral sparrow
#

The issue is that when I'm doing onboarding on a connected account, it starts by asking to activate 2FA, and then a long form with banking details etc... that seems a bit much a for a test account

green scroll
#

I know, but those parts are required for everything to work as expected in Test mode.
You should be able to click a button to fill out bank details with test values.

#

But 2FA is mandatory

spiral sparrow
#

There is a button like "Ignore this form since you have a test account" and it skips 2FA aswell. But then it tells me that business name is missing