#gustavonicot-Connect
1 messages · Page 1 of 1 (latest)
You can clone customer from the Platform to the Connected Account, alongside with cloning PaymentMethod as well
But before that, what do you want to achieve at the first place?
sorry, didn't see your text. we wanted to do a direct charge to a connected account and ensure that the stripes fees are charged to de connected account and not to the platform
are you there? is this enough information?
Hey, sorry I might be slow on getting back
What's your Connected Account type?
Express/Standard/Custom
standard
Okie, so Direct Charge is the correct way to way
is this chat private?
No, it's public
Sharing account id is fine, don't share sensitive info like key etcs
I underestand it
our specific problem is that when processing the first payment for a customer the steps are 1- create a customer. and then create a payment intent with that customer. 3-the payment intent is used by an app (flutter). this works when processing in behalf of the connected account
but not in a direct charge
if we do a direct charge, it give us an error that the user does not exist in the connected account (the user was created on the platform). the recommended approach is cloning the user from the platform to the connected but that has another problem.
Why wouldn't you create the Customer and create the PaymentIntent within your Connected Account at the first place?
(I am writing based on my understanding that I am not assuming is correct)
do not know how to
couldnt find it
tried but got an error
specially the customer creation
Just use the normal Customer creation API, with the Stripe Account header
for example in Ruby
cus = Stripe::Customer.create({
description: 'My First Test Customer (created for API docs)',
}, {
stripeAcocunt: 'acct_xxx'
})
stripe account is the connected account right?
yes
when processing the intent I got an error that the customer does not exist
When creating another PaymentIntent, you should also specify the stripeAccount
const paymentIntentPayload = {
amount: req.body.amount,
currency: 'usd',
customer: order_request_response.customer,
automatic_payment_methods: {
enabled: true,
},
// payment_method_types: ['card'],
metadata: {
order_id: req.body.order_id || null,
user_id,
employee_id
},
// // application_fee_amount: 50,
// transfer_data: {
// destination: 'acct_1GpgeiHuGTwjv40R'
// }
}
const settings = {
stripeAccount: stripeConfig.SELLER_ACCOUNT,
}
const paymentIntent = await stripe.paymentIntents.create(paymentIntentPayload, settings);
is this correct?
Okie, debug by actually checking the ID on your Dashboard
Login to your Dashboard, then your Connected Account Dashboard, then paste the Customer Id to the Search bar to see it it exists
thanks for the tips. I have been looking around but I cant find the created users anywere
Do you have the request id of Customer Created?
it should be in your Connected Account
or simply paste me the Customer Id
It's on your Connect Account acct_1JsxiNLff3YZzI2e
is it a test customer?
yes I am seeing it
are you seing the paymentIntenet creation attemps on the logs in your end?
I only see the Customer creation request on this Account
Let me check out Platform Account
acct_1JmA6yE05DrzsTpY, right?
this one failed
so it failed on creating ephemeral_keys, maybe before the PaymentIntent creation?
Was missing that. I think the issue is around the ephemeral key
to you have a piece of code for creating the ephemeral key on the connected account. Thanks for everything and the time by the way!
Just do it normally like you do, but append the {stripeAccount: "your_connected_account_id"} to the call!
like you already wrote your PaymentIntent creation call!
Thanks again! It finally completed. have a great night.