#kamil1999_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/1316529035878076507
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
is there any option to add customers to seller account through api?
the best would be that customers appears in "customers" section on connected account after they pay
Hello, it is possible to create customers on your connected accounts, though depending on your connect payment flow that may or may not be helpful.
Do your connect user's have full dashboard access? Or just express access or no access at all?
They do not have access for dashboard
you mean to use something like this?
const customer = await stripe.customers.create(
{
email: session.customer_email,
name: session.customer_name,
},
{
stripeAccount: sellerAccountId, // This associates the customer with the seller’s account
}
);
Exactly
Gotcha, typically for those accounts we recommend doing charges where the payment intent and customer exist on your platform account. Is that what you are doing as well or are you creating charges on your connected accounts?
You mean if i take fee for every customer payment?
Not sure what you mean there. I am mostly trying to understand if you are using our destination charges flow where you create payments on your platform account and then automatically send funds to your connected account.
https://docs.stripe.com/connect/destination-charges
Or the direct charges flow where you create payment intents on the connected account with a stripe_account header and collect a fee when it is confirmed.
https://docs.stripe.com/connect/direct-charges
Basically, you want the Customer objects to exist on the same account(s) as the payment intents.
Gotcha, i use stripe checkout session and destination account param
Gotcha, then you will want to have the customers on your platform account.
One thing that will be helpful here is that you can pass customer_creation='always' when creating your checkout sessions for first time customers, that will tell Stripe to automatically create a new Customer object when the payment succeeds.
For returning customers, you can pass customer='cus_1234' which will assosciate the session and resulting payment with that existing customer
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Im not sure this one
For returning customers, you can pass customer='cus_1234' which will assosciate the session and resulting payment with that existing customer
When i send customer param for stripe checkout -> it will be connected with customer, not accunt, also customer is created after stripe checkout link for payment form
The case is that we have one customer that is owner of stripe account and owner will list his customers for which he generated stripe checkout url
When i send customer param for stripe checkout -> it will be connected with customer, not accunt, also customer is created after stripe checkout link for payment form
It will be connected to both. The customer and intent are on your account, but the resulting payment intent will have the destination config that you set.
That said, unfortunately it doesn't look like there is a good way to list customers by the connected accounts that they have made payments to like this. You would need to either store that association on your side or create metadata on the customer object that stores the ID(s) of accounts it has made payments to
i see, and then update account on webhook
i thnik now I understand
thank you for help
Exactly. And the last piece is that the Customer search API can list customers by their metadata. So that would be a good way to list customers that have paid a specific account https://docs.stripe.com/api/customers/search
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.