#nicolas farolfi
1 messages · Page 1 of 1 (latest)
On which Stripe account are you creating the Setup Intent/saving the card?
With the platform
If you're doing direct charges, the Customer and Payment Method objects must existed on the connected account. You'll need to clone the PM from the platform: https://stripe.com/docs/payments/payment-methods/connect
ok thank you, I will go deeper in the doc to try a clone of the PM each time a payment is made between a user and a new CONNECT account (considering there are multiple CONNECT account on the platform)
Yep, that's generally how it'd work if you're a marketplace platform or similar. You'd have a 'main' customer/payment method pairing on the platform that can be cloned to the relevant connected accounts if they transact with that merchant
Thanks, it more clear for me now.
So now I clone the Customer paymentMethod each time before processing the PaymentIntent I can just pass the cloned PaymentMethod_ID as a parameter in the request below ?
const paymentIntent = await stripe.paymentIntents.create({
amount: 1000,
currency: 'eur',
automatic_payment_methods: {enabled: true},
application_fee_amount: 123,
}, {
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});
Yep, should be able to use the payment_method and customer parameters, passing the cloned objects
Perfect thank you !