djstripe.models.account

Account

Bases: StripeModel

This is an object representing a Stripe account.

You can retrieve it to see properties on the account like its current e-mail address or if the account is enabled yet to make live charges.

Stripe documentation: https://stripe.com/docs/api/accounts?lang=python

branding_icon

property  branding_icon

property  branding_logo

business_profile

property  business_profile

Optional information related to the business.

business_type

property  business_type

The business type.

business_url

property  business_url: str

The business's publicly available website.

charges_enabled

property  charges_enabled

Whether the account can create live charges

company

property  company

Information about the company or business. This field is null unless business_type is set to company.

country

property  country

The country of the account

default_api_key

property  default_api_key: str

default_currency

property  default_currency

The currency this account has chosen to use as the default

details_submitted

property  details_submitted

Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.

email

property  email

The primary user's email address.

individual

property  individual

Information about the person represented by the account. This field is null unless business_type is set to individual.

payouts_enabled

property  payouts_enabled

Whether Stripe can send payouts to this account

product_description

property  product_description

Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes.

requirements

property  requirements

Information about the requirements for the account, including what information needs to be collected, and by when.

settings

property  settings

Account options for customizing how the account functions within Stripe.

stripe_class

attribute  stripe_class

tos_acceptance

property  tos_acceptance

Details on the acceptance of the Stripe Services Agreement

type

property  type

The Stripe account type.

api_reject

api_reject(self, api_key = None, stripe_account = None, **kwargs)

Call the stripe API's reject operation for Account model

:param api_key: The api key to use for this request. Defaults to djstripe_settings.STRIPE_SECRET_KEY. :type api_key: string :param stripe_account: The optional connected account for which this request is being made. :type stripe_account: string

get_default_account

get_default_account(cls, api_key = djstripe_settings.STRIPE_SECRET_KEY)

get_default_api_key

get_default_api_key(self, livemode: bool | None = None) -> str

get_or_retrieve_for_api_key

get_or_retrieve_for_api_key(cls, api_key: str)

get_stripe_dashboard_url

get_stripe_dashboard_url(self) -> str

Get the stripe dashboard url for this object.

AccountV2

Bases: StripeModel

An Account v2 object, from the Stripe Accounts v2 / Organizations API.

Unlike the v1 :class:Account, this object is served by Stripe's v2 Core API (/v2/core/accounts), which is service-based rather than resource-class based. It represents a company, individual or other entity, and can hold one or more configurations (customer, merchant, recipient).

Because the v2 API differs from v1 in several ways — it is reached through StripeClient(...).v2.core.accounts, retrieval uses include rather than expand, deletion is replaced by close, and created is an RFC 3339 string rather than a unix timestamp — the relevant api_* methods are overridden below. The base sync machinery (which operates on the JSON-coerced stripe_data dict) is otherwise reused unchanged.

Stripe documentation: https://docs.stripe.com/api/v2/core/accounts

DEFAULT_INCLUDE

attribute  DEFAULT_INCLUDE

applied_configurations

property  applied_configurations

The configurations that have been applied to the account.

closed

property  closed

Whether the account is closed.

configuration

property  configuration

The configurations (customer, merchant, recipient) on the account.

contact_email

property  contact_email

The default contact email address for the account.

contact_phone

property  contact_phone

The default contact phone number for the account.

dashboard

property  dashboard

The dashboard the account has access to (express, full or none).

defaults

property  defaults

Default values to apply to the account's configurations.

display_name

property  display_name

A descriptive name for the account, shown in the dashboard.

future_requirements

property  future_requirements

Requirements that will apply to the account in the future.

identity

property  identity

Information about the company or individual the account represents.

requirements

property  requirements

Information about what is needed to keep the account enabled.

stripe_class

attribute  stripe_class

api_close

api_close(self, api_key = None, **kwargs)

Close this account (the v2 equivalent of deleting it).

api_list

api_list(cls, api_key = djstripe_settings.STRIPE_SECRET_KEY, **kwargs)

api_retrieve

api_retrieve(self, api_key = None, stripe_account = None)