#mike_06860
1 messages · Page 1 of 1 (latest)
With custom accounts you shouldn't do direct charges
That flow is meant for standard accounts
You should do destination charges: https://stripe.com/docs/connect/destination-charges
You can charge a custom account: https://stripe.com/docs/connect/account-debits#charging-a-connected-account
how can I generate a client secret so I can add the bank or debit card for payout on the custom account though?
I was trying to use the Stripe Elements component so I don't have to collect bank/card info in my app
I was using this code to try and generate a secret (note that accountId would be the connect account ID):
public async Task<string> InitiatePayment(string accountId)
{
var options = new SetupIntentCreateOptions()
{
AutomaticPaymentMethods = new SetupIntentAutomaticPaymentMethodsOptions() { Enabled = false },
PaymentMethodTypes = new List<string>() { "card", "us_bank_account" }
};
var svc = new SetupIntentService();
var intent = await svc.CreateAsync(options, new RequestOptions() { StripeAccount=accountId}).ConfigureAwait(false);
return intent.ClientSecret;
}
and this is the important part of the client-side code:
savePaymentMethod(): void {
const name = this.stripeTest.get('name').value;
const elements = this.paymentElement.elements;
this.stripeService
.confirmSetup({ elements, confirmParams: { return_url: `${environment.baseUrl}/` } })
.subscribe((result: any) => {
console.log(result);
});
}
got it, I need to use the "FlowDirection" outbound on the SetupIntentCreateOptions, then use the "collectBankAccountForSetup" method instead of the confirmSetup on the js side?
Yeah
Because you shouldn't use payment element
You need to collect details through financial connections
does the payout method get saved on the account, or do they have to it every time they request a payout?
If you follow the flow at the above link it'll be saved