#Gerarda Cautillo-connect
1 messages · Page 1 of 1 (latest)
yes that won't work, as the error says
you can't use a pm_xxx created on the platform account on a connected account in a call to create a customer like that
you have to clone it first
- create PM on the frontend using the platform
- attach to a Customer on the platform account
- clone that Customer's PaymentMethod to the connected account
- attach the cloned PaymentMethod to a new Customer on the connected account
in order to clone a payment method I have to attached a customer, so basically I create a customer first
yeah but you're creating it on the connected account there, which won't work as mentioned above
you need to get rid of requestOptionsCustomer1 in that snippet
when i create a payment intent i have this error: No such PaymentMethod: 'pm_1JbidmErWLFb1tAhlx7tOi3b'; code: resource_missing; request-id: req_3Dc3TNbI5G7TIf
yes because you're creating the PaymentIntent on the platform account in that code
you need to pass requestOptions1 to PaymentIntent.create there if you're trying to process the payment on the connected account with the cloned PM
ok I createad a first payment intent! Thank you!!!
Regarding the second payment intent I have to clone the same payment method right=
is the second on this same connected account or a different one?
in a different one
then you'd have to clone a PM from the platform to that other account, yep, repeating the process
ok perfect, thank you so much! I created two payment intent for the two connected accounts
why cannot i to see these payment into a dashboard?
did you confirm the PaymentIntents to process the payment?
just creating the PaymentIntents doesn't process a charge, you have to confirm them (which in practise means sending them back to the frontend to confirmCardPayment though in test mode you could cheat a little by adding setConfirm(true) to the params).
ok, on frontend I called stripe.confirmCardPayment(clientSecret from backend) but I receive this error No such payment_intent: 'pi_3Jbk6wCz5n0FQ62603N0PjDa'
I read that for the function confirmCardPayment only the client secret is required
you need to pass stripeAccount on the frontend because the PaymentIntent is on the connected account
var stripePlatform = Stripe(data.publicKey);
var stripeConnectedAccount = Stripe(data.publicKey, {stripeAccount: "acct_1JClrVCz5n0FQ626"});
...
stripePlatform.createPaymentMethod(...)
...
// send PaymentMethod to the backend and clone it and create a PaymentIntent on the connected account
stripeConnectedAccount.confirmCardPayment(client_secret)
in that example you see how I create two different instances of the Stripe() global and use the one that was initialised with the stripeAccount option for the PaymentIntent confirmation
happy to help!
the last question 🙂 i created in july a connected accounts in stripe dashboard but now there are little changes and I cannot create anymore more connected account
what kind of problem/changes are you running into exactly?
I have two platform account. for one I can see the voice "connect" in the menu and if I click I can see the connected accounts and I can create other connected accounts
ok, and you can't in the other?
for the other one I cannot see the voice "Connect"
what happens if you visit https://dashboard.stripe.com/test/connect/accounts/overview directly ?
Also there's a "More" menu with a dropdown, so maybe Connect is in there.
ooh i can see