#maarten_best-practices

1 messages ¡ Page 1 of 1 (latest)

split joltBOT
#

👋 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.

tall mason
#

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

inland girder
#

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?

inland girder
tall mason
#

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.

inland girder
#

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?

tall mason
#

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

inland girder
#

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

tall mason
#

correct

#

And also in the case where the customers are buying from the same connected account again in the future

inland girder
#

Yeah okay

#

Okay I think I know what to do, thanks for the help!

#

I think I'll save the customers to the users anyway, as it might be nicer for the connected accounts to see an overview of the purchases of a customer instead of having a new customer for every ticket bought