In previous blog I have demonstrated how we can create custom connected account. Now today I will show how we can create/add new customer in the connected account.
First, we need to add the stripe nugget package in your C# project.
You can use the below code to create customer in stripe. You can find your “Secret Key” under developer menu here. For connected account Id we can use the Id which we got in our previous blog.
StripeConfiguration.ApiKey = "Your Secret Key"; var CustomerOptions = new CustomerCreateOptions { Name = "Shailja Jariwala", Email = "shailjajariwala.vision@gmail.com", Description = "test customer", }; var requestOptions = new RequestOptions(); requestOptions.StripeAccount = "Your connect account id"; var customerservice = new CustomerService(); var cust = customerservice.Create(CustomerOptions, requestOptions);
cust will have the object of customer returned from stripe.
We can view the customer in the connected account