Stripe.Account (stripity_stripe v2.17.3) View Source
Work with Stripe Connect account objects.
You can:
- Retrieve your own account
- Retrieve an account with a specified
id
This module does not yet support managed accounts.
Stripe API reference: https://stripe.com/docs/api/accounts
Link to this section Summary
Functions
Create an account.
Create a login link.
Delete an account.
List all connected accounts.
Reject an account.
Retrieve your own account without options.
Retrieve your own account with options.
Retrieve an account with a specified id
.
Update an account.
Link to this section Types
Specs
alternatives() :: %{ alternative_fields_due: Stripe.List.t(String.t()) | nil, original_fields_due: Stripe.List.t(String.t()) | nil }
Specs
business_profile() :: %{ mcc: String.t() | nil, name: String.t() | nil, product_description: String.t() | nil, support_address: %{ city: String.t() | nil, country: String.t() | nil, line1: String.t() | nil, line2: String.t() | nil, postal_code: String.t() | nil, state: String.t() | nil }, support_email: String.t() | nil, support_phone: String.t() | nil, support_url: String.t() | nil, url: String.t() | nil }
Specs
Specs
company() :: %{ address: Stripe.Types.address(), address_kana: Stripe.Types.japan_address() | nil, address_kanji: Stripe.Types.japan_address() | nil, directors_provided: boolean() | nil, name: String.t() | nil, name_kana: String.t() | nil, name_kanji: String.t() | nil, owners_provided: boolean() | nil, phone: String.t() | nil, tax_id_provided: boolean() | nil, tax_id_registar: String.t(), vat_id_provided: boolean() | nil }
Specs
Specs
error() :: %{code: String.t()}
Specs
future_requirements() :: %{ alternatives: [alternatives()] | nil, current_deadline: Stripe.timestamp() | nil, currently_due: Stripe.List.t(String.t()) | nil, disabled_reason: String.t() | nil, errors: Stripe.List.t(error()) | nil, eventually_due: Stripe.List.t(String.t()) | nil, past_due: Stripe.List.t(String.t()) | nil, pending_verification: Stripe.List.t(String.t()) | nil }
Specs
individual() :: %{ additional_owners: [individual_additional_owner()] | nil, address: Stripe.Types.address(), address_kana: Stripe.Types.japan_address() | nil, address_kanji: Stripe.Types.japan_address() | nil, business_name: String.t() | nil, business_name_kana: String.t() | nil, business_name_kanji: String.t() | nil, business_tax_id_provided: boolean(), business_vat_id_provided: boolean(), dob: Stripe.Types.dob(), first_name: String.t() | nil, first_name_kana: String.t() | nil, first_name_kanji: String.t() | nil, gender: String.t() | nil, last_name: String.t() | nil, last_name_kana: String.t() | nil, last_name_kanji: String.t() | nil, maiden_name: String.t() | nil, personal_address: Stripe.Types.address(), personal_address_kana: Stripe.Types.japan_address() | nil, personal_address_kanji: Stripe.Types.japan_address() | nil, personal_id_number_provided: boolean(), phone_number: String.t() | nil, ssn_last_4_provided: String.t(), tax_id_registar: String.t(), type: String.t() | nil, verification: individual_verification() }
Specs
individual_additional_owner() :: %{ address: Stripe.Types.address(), dob: Stripe.Types.dob(), first_name: String.t() | nil, last_name: String.t() | nil, maiden_name: String.t() | nil, verification: individual_verification() }
Specs
individual_verification() :: %{ details: String.t() | nil, details_code: String.t() | nil, document: Stripe.id() | Stripe.FileUpload.t() | nil, status: String.t() }
Specs
requirements() :: %{ current_deadline: Stripe.timestamp() | nil, currently_due: Stripe.List.t(String.t()) | nil, disabled_reason: String.t() | nil, eventually_due: Stripe.List.t(String.t()) | nil, past_due: Stripe.List.t(String.t()) | nil }
Specs
Specs
t() :: %Stripe.Account{ business_profile: business_profile() | nil, business_type: String.t() | nil, capabilities: capabilities() | nil, charges_enabled: boolean(), company: company() | nil, controller: map(), country: String.t(), created: Stripe.timestamp() | nil, default_currency: String.t(), deleted: boolean() | nil, details_submitted: boolean(), email: String.t() | nil, external_accounts: Stripe.List.t(Stripe.BankAccount.t() | Stripe.Card.t()), future_requirements: future_requirements() | nil, id: Stripe.id(), individual: individual() | nil, metadata: Stripe.Types.metadata(), object: String.t(), payouts_enabled: boolean() | nil, requirements: requirements() | nil, settings: settings() | nil, tos_acceptance: tos_acceptance() | nil, type: String.t() }
Specs
tos_acceptance() :: %{ date: Stripe.timestamp() | nil, ip: String.t() | nil, user_agent: String.t() | nil }
Specs
verification() :: %{ disabled_reason: String.t() | nil, due_by: Stripe.timestamp() | nil, fields_needed: [String.t()] }
Link to this section Functions
Specs
create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ :type => String.t(), optional(:country) => String.t(), optional(:account_token) => String.t(), optional(:business_profile) => business_profile(), optional(:business_type) => String.t(), optional(:company) => company(), optional(:email) => String.t(), optional(:external_account) => String.t(), optional(:individual) => individual(), optional(:metadata) => Stripe.Types.metadata(), optional(:requested_capabilities) => capabilities(), optional(:settings) => settings(), optional(:tos_acceptance) => tos_acceptance() }
Create an account.
Specs
create_login_link(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{optional(:redirect_url) => String.t()}
Create a login link.
Specs
delete(Stripe.id() | t(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Delete an account.
Specs
list(params, Stripe.options()) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()} when params: %{ optional(:ending_before) => t() | Stripe.id(), optional(:limit) => 1..100, optional(:starting_after) => t() | Stripe.id() }
List all connected accounts.
Specs
reject(Stripe.id() | t(), String.t(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Reject an account.
Takes the id
and reason
.
Specs
retrieve() :: {:ok, t()} | {:error, Stripe.Error.t()}
Retrieve your own account without options.
Specs
retrieve(list()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Retrieve your own account with options.
Specs
retrieve(binary(), list()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Retrieve an account with a specified id
.
Specs
update(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ optional(:account_token) => String.t(), optional(:business_profile) => business_profile(), optional(:business_type) => String.t(), optional(:company) => company(), optional(:default_currency) => String.t(), optional(:email) => String.t(), optional(:external_accounts) => String.t(), optional(:individual) => individual(), optional(:metadata) => Stripe.Types.metadata(), optional(:requested_capabilities) => capabilities(), optional(:settings) => settings(), optional(:tos_acceptance) => tos_acceptance() }
Update an account.
Takes the id
and a map of changes.