#joshuar_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/1243446200070569995
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
the customer (cus_QAB2RPkSoNJQYC) exists on the platform account, but you're trying to create a PaymentIntent (using the customer) on the connected account
did you intend to clone the platform's customer PaymentMethod to the connected account first? https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods
hmm no I have not tried this method before
cloning only clones the PaymentMethod. You need to create a new Customer on the connected account if you want to reuse the cloned PaymentMethod on the connected account
I see it says this is only suppported for card and bank accounts, but I need to support wallet payments (apple/google pay)
Apple and Google Pay are considered as card payments. You can give it a try
ah I see
but this looks like what I'm doing, as it described here by setting the stripe account in the request params?https://docs.stripe.com/connect/ua-enable-payment-guide?ui=payment-element&architecture-style=resources#create-payment-intent
oh I see, the initial creation of the payment method is left out of the code example
thanks, I will give this a try and see
to summarize though, for direct charges, the payment is created on the connected account. On that same note, all relevant objects need to exist on the connected account when you create the payment
that makes sense ๐
one more question then, since I'm actually trying to do this in the paymentIntent, i.e. before I have the payment method, how should I handle this? Not set the customer upfront, but do something on the webhook?
assuming that you want to save the PaymentMethod that you're creating to reuse, you can either :
- create the Customer on the connected account first (if required) and pass it in when creating the PaymentIntent. Or,
- create the Customer on the connected account (if required) after the payment (listen for the
payment_intent.succeededwebhook) and then attach the PaymentMethod.
how would I create a customer on the connected account?