---
title: "Create a Sub Account (deprecated)"
method: POST
path: "/sub_accounts"
tags: ["Sub Accounts"]
---

# Create a Sub Account (deprecated)

`POST /sub_accounts`

## Request

- Base URL: `https://api.justifi.ai/v1`
- URL: `https://api.justifi.ai/v1/sub_accounts`
- Auth: none declared. Required headers: `Authorization`
- TypeScript: <https://skmtc.dev/justifi/apis/justifi-api-documentation/docs/sub_accounts/post.ts> (a function with typed inputs; its response is checked against the schema)

**We no longer allow new platforms to use this API. To onboard a customer so they can process payments use [Hosted Onboarding](https://docs.justifi.tech/api-spec#tag/Hosted-Onboarding) or [Onboarding via API](https://docs.justifi.tech/api-spec#tag/Onboarding-via-API) instead.
During the onboarding process a sub account will automatically created for your customer.**

Create a JustiFi account for your customer, so they can process payments (once approved by JustiFi). The sub account will be created as part of your platform. If you use your test credentials, the sub account you create will have one account with the `account_type` of `test`. If you use your live credentials, the sub account you create will have two accounts -- one with the `account_type` of `test` and another with the `account_type` of `live`. This allows you to perform test operations on your real accounts by using their `test` account. When viewing the data payload for any sub account, you can reference the `related_accounts` attribute to get the `test_account_id` and `live_account_id` (if present) for that sub account.

## Headers

- `Authorization` string, required

## Request body

- object
  - `name` string, required: name for the sub account *note: the name must be unique in your platform*

## Response `201`

Sub account was created successfully

- object
  - `id` string, uuid: the object id, also found in the data object
  - `type` string: the object type, or array of objects
  - `data` object: the attributes for the object
    - `id` string, uuid: sub account id
    - `name` string: sub account name
    - `account_type` string: sub account type (live or test)
    - `status` 'created' | 'submitted' | 'information_needed' | 'rejected' | 'enabled' | 'disabled' | 'archived': sub account status
    - `currency` 'usd' | 'cad'
    - `platform_account_id` string, uuid: id of associated platform account
    - `platform_sub_account` boolean: true if this is the platform's own sub account, the one the platform uses to take payments as a business itself (one per mode, live and test); false for every other sub account
    - `payout_account_id` string, uuid: id of active payout bank account
    - `business_id` string, uuid: id of associated business
    - `application_fee_rates` unknown[]: list of associated application fee rates
      - unknown
    - `processing_ready` boolean: sub account ready for processing
    - `payout_ready` boolean: sub account ready for payouts
    - `related_accounts` object: when a live sub account is created, a related test account is automatically created; this provides both ids
      - `live_account_id` string, uuid: live sub account id (this will be nil if a sub account was created with test credentials)
      - `test_account_id` string, uuid: test sub account id
    - `payments_activated_on` string, date-time, nullable: date and time when the first successful payment was processed on this sub account
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `page_info` unknown

---

[API](https://skmtc.dev/justifi/apis/justifi-api-documentation.md) - [All operations](https://skmtc.dev/justifi/apis/justifi-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/justifi/apis/justifi-api-documentation/revisions/dd9f3fed7e46?raw)
