pub struct Account {
Show 22 fields pub id: AccountId, pub business_profile: Option<BusinessProfile>, pub business_type: Option<AccountBusinessType>, pub capabilities: Option<AccountCapabilities>, pub charges_enabled: Option<bool>, pub company: Option<Company>, pub controller: Option<AccountUnificationAccountController>, pub country: Option<String>, pub created: Option<Timestamp>, pub default_currency: Option<Currency>, pub deleted: bool, pub details_submitted: Option<bool>, pub email: Option<String>, pub external_accounts: List<ExternalAccount>, pub future_requirements: Option<AccountFutureRequirements>, pub individual: Option<Person>, pub metadata: Metadata, pub payouts_enabled: Option<bool>, pub requirements: Option<AccountRequirements>, pub settings: Option<AccountSettings>, pub tos_acceptance: Option<TosAcceptance>, pub type_: Option<AccountType>,
}
Expand description

The resource representing a Stripe “Account”.

For more details see https://stripe.com/docs/api/accounts/object

Fields

id: AccountId

Unique identifier for the object.

business_profile: Option<BusinessProfile>

Business information about the account.

business_type: Option<AccountBusinessType>

The business type.

capabilities: Option<AccountCapabilities>charges_enabled: Option<bool>

Whether the account can create live charges.

company: Option<Company>controller: Option<AccountUnificationAccountController>country: Option<String>

The account’s country.

created: Option<Timestamp>

Time at which the account was connected.

Measured in seconds since the Unix epoch.

default_currency: Option<Currency>

Three-letter ISO currency code representing the default currency for the account.

This must be a currency that Stripe supports in the account’s country.

deleted: booldetails_submitted: Option<bool>

Whether account details have been submitted.

Standard accounts cannot receive payouts before this is true.

email: Option<String>

An email address associated with the account.

You can treat this as metadata: it is not used for authentication or messaging account holders.

external_accounts: List<ExternalAccount>

External accounts (bank accounts and debit cards) currently attached to this account.

future_requirements: Option<AccountFutureRequirements>individual: Option<Person>metadata: Metadata

Set of key-value pairs that you can attach to an object.

This can be useful for storing additional information about the object in a structured format.

payouts_enabled: Option<bool>

Whether Stripe can send payouts to this account.

requirements: Option<AccountRequirements>settings: Option<AccountSettings>

Options for customizing how the account functions within Stripe.

tos_acceptance: Option<TosAcceptance>type_: Option<AccountType>

The Stripe account type.

Can be standard, express, or custom.

Implementations

Returns a list of accounts connected to your platform via Connect.

If you’re not a platform, the list is empty.

With Connect, you can create Stripe accounts for your users. To do this, you’ll first need to register your platform.

Examples found in repository?
examples/connect.rs (lines 25-38)
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
async fn main() {
    let secret_key = std::env::var("STRIPE_SECRET_KEY").expect("Missing STRIPE_SECRET_KEY in env");
    let client = Client::new(secret_key);

    let account = Account::create(
        &client,
        CreateAccount {
            type_: Some(AccountType::Express),
            capabilities: Some(CreateAccountCapabilities {
                card_payments: Some(CreateAccountCapabilitiesCardPayments {
                    requested: Some(true),
                }),
                transfers: Some(CreateAccountCapabilitiesTransfers { requested: Some(true) }),
                ..Default::default()
            }),
            ..Default::default()
        },
    )
    .await
    .unwrap();

    let link = AccountLink::create(
        &client,
        CreateAccountLink {
            account: account.id.clone(),
            type_: AccountLinkType::AccountOnboarding,
            collect: None,
            expand: &[],
            refresh_url: Some("https://test.com/refresh"),
            return_url: Some("https://test.com/return"),
        },
    )
    .await
    .unwrap();

    println!("created a stripe connect link at {}", link.url);
}

Retrieves the details of an account.

Updates a connected account by setting the values of the parameters passed.

Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts. To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

With Connect, you can delete accounts you manage.

Accounts created using test-mode keys can be deleted at any time.

Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. If you want to delete your own account, use the account information tab in your account settings instead.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

The canonical id type for this object.

The id of the object.

The object’s type, typically represented in wire format as the object property.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more