#maarten_best-practices
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/1237766284049907733
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
If you want to re-use customer information then it has to be created on the platform account and then you can clone it to the connected account in order to use it with Direct charges
Similar to the flow outlined here: https://docs.stripe.com/payments/payment-methods/connect#cloning-payment-methods
Also, unless I'm missing something, the docs for Direct Charges (https://docs.stripe.com/connect/direct-charges?platform=android) seem to include incorrect Java code.
In the payment-sheet API call, the docs create a customer without using the RequestOptions, so it's on the platform account. The docs then create a PaymentIntent with the RequestOptions, so on the connected account. When I do this, I get an error about the customer not existing. Am I missing something here?
Ah okay, I missed that, thanks!
In the payment-sheet API call, the docs create a customer without using the RequestOptions, so it's on the platform account. The docs then create a PaymentIntent with the RequestOptions, so on the connected account. When I do this, I get an error about the customer not existing. Am I missing something here?
I think you're right about the snippet though.
Alright, thanks for confirming
Another question: For now, I'll skip implementing the cloning of payment methods so I can continue on other stuff.
What is the best practice then for generating Customers? Is it fine to just generate a new one every time I make a PaymentIntent, or do I need to save all the different Customers one of our users can have? Say if a users buys tickets at 20 different event locations, they will have 20 different customers linked to them as they need to be made on the connected accounts. Can I skip saving those customers and just generate a new one every time?
I believe that's totally upto your use-case.
I don't think there are best practices for this specifically.
The only catch here is that you won't be able to reuse the previously saved payment method if they buy from a different connected account
Can I skip saving those customers and just generate a new one every time?
You could, it would work. but you'd have too many duplicates.
So technicality wise, there's no blocker there
Yeah so if I don't clone payment methods, there's basically no added benefit of reusing customers right?
Except for not having a lot of duplicate customers