View Source Stripe.AccountSession (stripity_stripe v3.3.1)
An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
We recommend that you create an AccountSession each time you need to display an embedded component to your user. Do not save AccountSessions to your database as they expire relatively quickly, and cannot be used more than once.
Related guide: Connect embedded components
Summary
Types
Configuration for the account management embedded component.
Configuration for the account onboarding embedded component.
Configuration for the balances embedded component.
Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
Configuration for the disputes list embedded component.
Configuration for the documents embedded component.
The list of features enabled in the embedded component.
Configuration for the financial account embedded component.
Configuration for the financial account transactions embedded component.
Configuration for the instant payouts promotion embedded component.
Configuration for the issuing card embedded component.
Configuration for the issuing cards list embedded component.
Configuration for the notification banner embedded component.
Configuration for the payment details embedded component.
Configuration for the payment disputes embedded component.
Configuration for the payments embedded component.
Configuration for the payout details embedded component.
Configuration for the payouts list embedded component.
The account_session type.
Configuration for the tax registrations embedded component.
Configuration for the tax settings embedded component.
Functions
Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
Types
@type account_management() :: %{ optional(:enabled) => boolean(), optional(:features) => features() }
Configuration for the account management embedded component.
@type account_onboarding() :: %{ optional(:enabled) => boolean(), optional(:features) => features() }
Configuration for the account onboarding embedded component.
Configuration for the balances embedded component.
@type components() :: %{ optional(:account_management) => account_management(), optional(:account_onboarding) => account_onboarding(), optional(:balances) => balances(), optional(:disputes_list) => disputes_list(), optional(:documents) => documents(), optional(:financial_account) => financial_account(), optional(:financial_account_transactions) => financial_account_transactions(), optional(:instant_payouts_promotion) => instant_payouts_promotion(), optional(:issuing_card) => issuing_card(), optional(:issuing_cards_list) => issuing_cards_list(), optional(:notification_banner) => notification_banner(), optional(:payment_details) => payment_details(), optional(:payment_disputes) => payment_disputes(), optional(:payments) => payments(), optional(:payout_details) => payout_details(), optional(:payouts) => payouts(), optional(:payouts_list) => payouts_list(), optional(:tax_registrations) => tax_registrations(), optional(:tax_settings) => tax_settings() }
Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
Configuration for the disputes list embedded component.
Configuration for the documents embedded component.
@type features() :: %{ optional(:capture_payments) => boolean(), optional(:destination_on_behalf_of_charge_management) => boolean(), optional(:dispute_management) => boolean(), optional(:refund_management) => boolean() }
The list of features enabled in the embedded component.
@type financial_account() :: %{ optional(:enabled) => boolean(), optional(:features) => features() }
Configuration for the financial account embedded component.
@type financial_account_transactions() :: %{ optional(:enabled) => boolean(), optional(:features) => features() }
Configuration for the financial account transactions embedded component.
@type instant_payouts_promotion() :: %{ optional(:enabled) => boolean(), optional(:features) => features() }
Configuration for the instant payouts promotion embedded component.
Configuration for the issuing card embedded component.
@type issuing_cards_list() :: %{ optional(:enabled) => boolean(), optional(:features) => features() }
Configuration for the issuing cards list embedded component.
@type notification_banner() :: %{ optional(:enabled) => boolean(), optional(:features) => features() }
Configuration for the notification banner embedded component.
Configuration for the payment details embedded component.
Configuration for the payment disputes embedded component.
Configuration for the payments embedded component.
Configuration for the payout details embedded component.
Configuration for the payouts embedded component.
Configuration for the payouts list embedded component.
@type t() :: %Stripe.AccountSession{ account: binary(), client_secret: binary(), components: term(), expires_at: integer(), livemode: boolean(), object: binary() }
The account_session type.
accountThe ID of the account the AccountSession was created forclient_secretThe client secret of this AccountSession. Used on the client to set up secure access to the givenaccount.
The client secret can be used to provide access to account from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs to setup Connect embedded components and learn about how client_secret should be handled.
componentsexpires_atThe timestamp at which this AccountSession will expire.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.objectString representing the object's type. Objects of the same type share the same value.
Configuration for the tax registrations embedded component.
Configuration for the tax settings embedded component.
Functions
@spec create( params :: %{ optional(:account) => binary(), optional(:components) => components(), optional(:expand) => [binary()] }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
Details
- Method:
post - Path:
/v1/account_sessions