Today we will learn how we can create a direct charge in stripe connected account. We will use the CustomerId and CardId which you can get using the customer details and card token.
For more details please refer the blogs below:
https://www.thecodehubs.com/create-customer-in-stripe-connected-account-in-c
https://www.thecodehubs.com/create-card-for-customer-in-stripe-using-c
Now, to create the direct charge use the below code.
var charge = new ChargeCreateOptions { Amount = 1038, Currency = 'usd', Source = 'Card Id', Customer = 'Customer Id', Description = 'Unique Id' }; var requestOptions = new RequestOptions(); requestOptions.StripeAccount = 'Connected Account Id'; var ChargeServiceObj = new ChargeService(); var ChargeRes = ChargeServiceObj.Create(charge, requestOptions);
We will receive the charge Id after executing the above code. We can check the charge under the payments in the respective connected account.