#wackness_api
1 messages ¡ Page 1 of 1 (latest)
đ 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.
And sorry I forgot, I cannot set a business name to the connected accounts, I don't have access to them
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
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
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?
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
You can create an onboarding link for Connected accounts in Test mode as well: https://docs.stripe.com/connect/standard-accounts
I tried earlier but the onboarding is asking for like 2FA, banking details etc
You should be able to complete the onboarding in test mode.
Could you please share the Request ID where you create the Checkout Session req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
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.
No worries.
Okay, you need to onboard your Connected account before you can create Checkout Sessions on it.
In what point do you face issues exactly?
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
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
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