Search documentation of stripe_elixir

# StripeElixir.Services.AccountService (stripe_elixir v0.1.0)

Copy Markdown View Source

Account

This is an object representing a Stripe account. You can retrieve it to see properties on the account like its current requirements or if the account is enabled to make live charges or receive payouts.

For accounts where controller.requirement_collection is `application`, which includes Custom accounts, the properties below are always returned.

For accounts where controller.requirement_collection is `stripe`, which includes Standard and Express accounts, some properties are only returned until you create an Account Link or Account Session to start Connect Onboarding. Learn about the differences between accounts.

## Summary

### Functions

create(client, params \\ %{}, opts \\ [])

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

delete(client, account, params \\ %{}, opts \\ [])

Delete an account

list(client, params \\ %{}, opts \\ [])

List all connected accounts

reject(client, account, params \\ %{}, opts \\ [])

Reject an account

retrieve(client, params, opts)

Retrieve account

retrieve(client, account, params, opts)

Retrieve account

update(client, account, params \\ %{}, opts \\ [])

Update an account

## Functions

# create(client, params \\ %{}, opts \\ [])

    @spec create(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

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

If you’ve already collected information for your connected accounts, you can prefill that information when creating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding. You can prefill any information on the account.

# delete(client, account, params \\ %{}, opts \\ [])

    @spec delete(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Delete an account

With Connect, you can delete accounts you manage.

Test-mode accounts can be deleted at any time.

Live-mode accounts that have access to the standard dashboard and Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. All other Live-mode accounts, can be deleted when all balances are zero.

If you want to delete your own account, use the account information tab in your account settings instead.

# list(client, params \\ %{}, opts \\ [])

    @spec list(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

List all connected accounts

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

# reject(client, account, params \\ %{}, opts \\ [])

    @spec reject(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Reject an account

With Connect, you can reject accounts that you have flagged as suspicious.

Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.

# retrieve(client, params, opts)

    @spec retrieve(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Retrieve account

Retrieves the details of an account.

# retrieve(client, account, params, opts)

    @spec retrieve(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Retrieve account

Retrieves the details of an account.

# update(client, account, params \\ %{}, opts \\ [])

    @spec update(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Update an account

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged.

For accounts where controller.requirement_collection is `application`, which includes Custom accounts, you can update any information on the account.

For accounts where controller.requirement_collection is `stripe`, which includes Standard and Express accounts, you can update all information until you create an Account Link or Account Session to start Connect onboarding, after which some properties can no longer be updated.

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.