POST
/
v1
/
companies
/
{company_id}
/
accounts

Authorizations

Authorization
string
header
required

To authenticate against the API, use HTTP Basic Authentication with your customer ID as the username and API key as the password.

Path Parameters

company_id
string
required

Body

application/json
email
string
required
name
string
required
enable_card_collector
boolean

Generate a URL that can be used to attach payment method to account. This URL will come back in the response

metadata
object

Pass in anything you want here. You can use this to tie an account back to an internal ID or track other data

plan_id
string

Attach account to a plan. This will create all appropriate treasury balances for that plan on the account and start billing them for the plan immediately.

If the plan does have a charge, then the account must have payment information or the call will fail.

If you call with enable_card_collector then the plan won't be attached until the user fills out their payment information on the form.

plan_variable_amounts
object

If the plan supports variable billing where you can change the amount of a given balance which changes the amount billed, then you can use this object to specify what those amounts are.

Example:

"plan_variable_amounts": {
        "credits": 100,
        "seats": 5
    },
stripe_id
string

If a Stripe customer ID already exists for this account, pass it in here, otherwise we'll make one.

Response

200 - application/json
data
object

Accounts are the customers of Companies. They are what are actually generating events and being billed