account

package
v79.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package account provides the /accounts APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(id string, params *stripe.AccountParams) (*stripe.Account, error)

With [Connect](https://stripe.com/connect), you can delete accounts you manage.

Test-mode accounts can be deleted at any time.

Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero.

If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.

func Get

func Get() (*stripe.Account, error)

Get retrieves the authenticating account.

func GetByID

func GetByID(id string, params *stripe.AccountParams) (*stripe.Account, error)

Retrieves the details of an account.

func New

func New(params *stripe.AccountParams) (*stripe.Account, error)

With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users. To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).

If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding. You can prefill any information on the account.

func Reject

func Reject(id string, params *stripe.AccountRejectParams) (*stripe.Account, error)

With [Connect](https://stripe.com/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.

func Update

func Update(id string, params *stripe.AccountParams) (*stripe.Account, error)

Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are left unchanged.

For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts, you can update any information on the account.

For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is stripe, which includes Standard and Express accounts, you can update all information until you create an [Account Link or <a href="/api/account_sessions">Account Session](https://stripe.com/api/account_links) to start Connect onboarding, after which some properties can no longer be updated.

To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /accounts APIs.

func (Client) Del

func (c Client) Del(id string, params *stripe.AccountParams) (*stripe.Account, error)

With [Connect](https://stripe.com/connect), you can delete accounts you manage.

Test-mode accounts can be deleted at any time.

Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero.

If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.

func (Client) Get

func (c Client) Get() (*stripe.Account, error)

Get retrieves the authenticating account.

func (Client) GetByID

func (c Client) GetByID(id string, params *stripe.AccountParams) (*stripe.Account, error)

Retrieves the details of an account.

func (Client) List

func (c Client) List(listParams *stripe.AccountListParams) *Iter

Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.

func (Client) New

func (c Client) New(params *stripe.AccountParams) (*stripe.Account, error)

With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users. To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).

If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding. You can prefill any information on the account.

func (Client) Reject

func (c Client) Reject(id string, params *stripe.AccountRejectParams) (*stripe.Account, error)

With [Connect](https://stripe.com/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.

func (Client) Update

func (c Client) Update(id string, params *stripe.AccountParams) (*stripe.Account, error)

Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are left unchanged.

For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts, you can update any information on the account.

For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is stripe, which includes Standard and Express accounts, you can update all information until you create an [Account Link or <a href="/api/account_sessions">Account Session](https://stripe.com/api/account_links) to start Connect onboarding, after which some properties can no longer be updated.

To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for accounts.

func List

func List(params *stripe.AccountListParams) *Iter

Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.

func (*Iter) Account

func (i *Iter) Account() *stripe.Account

Account returns the account which the iterator is currently pointing to.

func (*Iter) AccountList

func (i *Iter) AccountList() *stripe.AccountList

AccountList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL