#mahesh-connect
1 messages · Page 1 of 1 (latest)
hello @gusty bramble! you can create a customer on the connected account by including the Stripe-Account header and using your platform's secret key : https://stripe.com/docs/connect/authentication
thanks for the help. but just to confirm, we are on boarding a standard account using the platform key and we onboarded a standard account. Now we need to create a customer for onboarded account. For that we need to pass the platform stripe key in the header. The where we need to mention under which conencted account, the new customer being created? Could you please help me on this
using node as an example
const stripe = require('stripe')('{{PLATFORM_SECRET_KEY}}');
const customer = await stripe.customers.create(
{email: 'person@example.edu'},
{stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}'}
);
ok.. got it.. thanks for your help @lime pier
can i ask 1 more doubt, its for onboarding a stripe standard account. When we onboarding a standard stripe account, we are redirecting to stripe and account is creating at stripe's end. Now once the process completes, we receive the details in webhook. Is there any way to pass some session id / uuid to stripe while redirects, so that we can get the same thing in the webhook event, so that we can understand which user created the connect account.
Otherwise, it will be difficult for us to uderstand for which user the account is created in the stripe. Correct? If the user logged in email is different from which he created the stripe account
you can use metadata when creating the account : https://stripe.com/docs/api/accounts/create#create_account-metadata
Thanks for the help. But this is the scenario.
We onboarded a customer into our application. And the customer is already having a stripe account. Now we need to onboard them as connected account in our stripe account.
For that, we are redirecting them to the stripe site. At that time we are not embedding/ passing any data to stripe for that specific customer. Stripe is not returning any data related to the account creation while redirect back to our app. We get the result as webhook event. From the webhook event, how would we understands that the event is for that particular customer, if the registered email address is different than which he registered with our app. Thats where I am stucks at.
ah, you're using OAuth, there's no way to know this from the webhook event. I think what you can consider doing is using the state query parameter and link that to some internal uuid - https://stripe.com/docs/connect/oauth-reference#get-authorize-request