Class StripeConnectApiClient
The receiving side: an account the platform can pay, and the onboarding that makes it payable.
public class StripeConnectApiClient : IPayeeAccountClient
- Inheritance
-
StripeConnectApiClient
- Implements
- Inherited Members
Remarks
A marketplace pays people it has not vetted itself. The provider collects the identity and bank details, decides whether the account may be paid out, and hosts the screens that ask — so none of that reaches the platform, which is the point of using one.
Constructors
StripeConnectApiClient(IStripeClient, IOptions<StripeApiClientConfig>, ILogger<StripeConnectApiClient>)
The receiving side: an account the platform can pay, and the onboarding that makes it payable.
public StripeConnectApiClient(IStripeClient client, IOptions<StripeApiClientConfig> config, ILogger<StripeConnectApiClient> logger)
Parameters
clientIStripeClientconfigIOptions<StripeApiClientConfig>loggerILogger<StripeConnectApiClient>
Remarks
A marketplace pays people it has not vetted itself. The provider collects the identity and bank details, decides whether the account may be paid out, and hosts the screens that ask — so none of that reaches the platform, which is the point of using one.
Methods
CreateAccountAsync(string, string, IDictionary<string, string>?, CancellationToken)
Creates an account able to receive transfers, and returns the provider's identifier for it.
public Task<IResult<string>> CreateAccountAsync(string countryCode, string email, IDictionary<string, string>? metadata = null, CancellationToken cancellationToken = default)
Parameters
countryCodestringISO 3166-1 alpha-2, the country the payee is paid in.
emailstringWhere the provider writes to the payee.
metadataIDictionary<string, string>Carried on the provider's object; the caller's own identifiers belong here.
cancellationTokenCancellationTokenCancels the call.
Returns
CreateOnboardingLinkAsync(string, string, string, CancellationToken)
A link to the provider's hosted onboarding. Single-use and short-lived by design, so it is created when the payee asks rather than stored.
public Task<IResult<string>> CreateOnboardingLinkAsync(string accountId, string refreshUrl, string returnUrl, CancellationToken cancellationToken = default)
Parameters
accountIdstringThe account being onboarded.
refreshUrlstringWhere the provider sends the payee when the link has expired.
returnUrlstringWhere it returns them when they are done.
cancellationTokenCancellationTokenCancels the call.
Returns
GetAccountAsync(string, CancellationToken)
What the provider currently says about the account.
public Task<IResult<PayeeAccountDTO>> GetAccountAsync(string accountId, CancellationToken cancellationToken = default)
Parameters
accountIdstringThe account to read.
cancellationTokenCancellationTokenCancels the call.