Table of Contents

Class StripeConnectApiClient

Namespace
NuvTools.Payment.Stripe.ApiClient.Services
Assembly
NuvTools.Payment.Stripe.ApiClient.dll

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

client IStripeClient
config IOptions<StripeApiClientConfig>
logger ILogger<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

countryCode string

ISO 3166-1 alpha-2, the country the payee is paid in.

email string

Where the provider writes to the payee.

metadata IDictionary<string, string>

Carried on the provider's object; the caller's own identifiers belong here.

cancellationToken CancellationToken

Cancels the call.

Returns

Task<IResult<string>>

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

accountId string

The account being onboarded.

refreshUrl string

Where the provider sends the payee when the link has expired.

returnUrl string

Where it returns them when they are done.

cancellationToken CancellationToken

Cancels the call.

Returns

Task<IResult<string>>

GetAccountAsync(string, CancellationToken)

What the provider currently says about the account.

public Task<IResult<PayeeAccountDTO>> GetAccountAsync(string accountId, CancellationToken cancellationToken = default)

Parameters

accountId string

The account to read.

cancellationToken CancellationToken

Cancels the call.

Returns

Task<IResult<PayeeAccountDTO>>