Creates a new sub-account linked to your master account.
The v3 Accounts API provides richer sub-account management with explicit identity and
configuration options. It supersedes the v2 /v2/accounts endpoint.
Key changes from v2:
emailis now required on create- Sub-account identity (country + entity type) is now required on create
configurationreplacesconfigurationswith a new shape- Webhook recipient values changed:
MASTER→MASTER_ACCOUNT,SUB→SUB_ACCOUNT - Response includes
identityandconfigurationobjects instead of top-levellegal_name/country_of_incorporation
The API key used for the request determines which master account the sub-account is linked to — you do not need to pass a business ID or environment mode explicitly.
Use an API key with Account Write permission to perform this request.
Country of incorporation
By default, identity.country_of_incorporation must match your master account's
country of operation. Cross-country sub-accounts are only allowed if explicitly
enabled for your account — contact your account manager to enable this.
Entity types by country
Available identity.entity_type values depend on identity.country_of_incorporation:
| Country | Available entity types |
|---|---|
| ID | CORPORATION, SOLE_PROPRIETORSHIP, PARTNERSHIP, NON_PROFIT, INDIVIDUAL, COOPERATIVE |
| PH | CORPORATION, SOLE_PROPRIETORSHIP, PARTNERSHIP, INDIVIDUAL, ONE_PERSON_CORPORATION |
| VN | CORPORATION, SOLE_PROPRIETORSHIP, PARTNERSHIP, LIMITED_LIABILITY_COMPANY |
| TH | CORPORATION, PARTNERSHIP, NON_PROFIT, INDIVIDUAL |
| MY | CORPORATION, SOLE_PROPRIETORSHIP, PARTNERSHIP, NON_PROFIT |
| SG | CORPORATION, PARTNERSHIP |
| HK | CORPORATION, PARTNERSHIP |
| MX | CORPORATION, SOLE_PROPRIETORSHIP, PARTNERSHIP, NON_PROFIT |
Any other country of incorporation follows the SG entity type list.
Test mode restrictions
When using a Test API key, the following constraints apply:
| Field | Restriction |
|---|---|
identity.entity_type |
Must be CORPORATION |
identity.country_of_incorporation |
Must match your master account's country |
configuration.users.send_email_invite |
Must be false or omitted |
configuration.webhooks.recipient |
Must be MASTER_ACCOUNT or omitted |
Sub-accounts created in Test mode are provisioned immediately with status LIVE,
and their identity and configuration are returned with default values. They are
only available in Test mode and will never go live.
{
"name": "Acme Corp",
"email": "owner@acme.com",
"identity": {
"country_of_incorporation": "SG",
"entity_type": "CORPORATION"
},
"configuration": {
"users": {
"send_email_invite": true
},
"webhooks": {
"recipient": "MASTER_ACCOUNT"
}
}
}The entire configuration block is optional for every entity type.
When omitted, no email invite is sent (send_email_invite: false) and
webhooks default to MASTER_ACCOUNT.
{
"name": "Toko Berkah",
"email": "owner@tokoberkah.co.id",
"identity": {
"country_of_incorporation": "ID",
"entity_type": "INDIVIDUAL"
}
}With a Test API key, entity_type must be CORPORATION, the country
must match your master account's country, and configuration must be
omitted or use the default values.
{
"name": "Acme Corp (Test)",
"email": "owner@acme.com",
"identity": {
"country_of_incorporation": "SG",
"entity_type": "CORPORATION"
}
}Sub-account display name
Email address for the sub-account owner. This becomes the sub-account's
default email address, and is the first email to receive the invitation
(when configuration.users.send_email_invite is true) to access the
dashboard and continue filling in the sub-account's KYC information.
The legal identity of the sub-account's business.
country_of_incorporation is an ISO 3166-1 alpha-2 country code. It must match
your master account's country of operation unless cross-country sub-accounts are
explicitly enabled for your account.
The available entity_type values depend on country_of_incorporation — see the
per-country variants below. Any country not listed follows the Singapore (SG)
entity type list.
Optional behaviour configuration for the sub-account
If true, sends an email invitation to email on account creation so the
owner can access the sub-account dashboard and continue filling in the
sub-account's KYC information. Available for every entity type.
Only applies in Live mode.
Where webhooks for the sub-account's transactions are delivered:
MASTER_ACCOUNT— webhooks are sent to the URLs configured in the master account's settings (default)SUB_ACCOUNT— webhooks are sent to the URLs configured in the sub-account's own settings
Sub-account created successfully. Returns a Sub-Account V3 object.
{
"id": "5cafeb170a2b18519b1b8761",
"name": "Acme Corp",
"email": "owner@acme.com",
"status": "REGISTERED",
"identity": {
"country_of_incorporation": "SG",
"entity_type": "CORPORATION"
},
"configuration": {
"users": {
"send_email_invite": true
},
"webhooks": {
"recipient": "MASTER_ACCOUNT"
}
},
"created_at": "2026-07-07T10:00:00Z",
"updated_at": "2026-07-07T10:00:00Z"
}{
"id": "5cafeb170a2b18519b1b8762",
"name": "Toko Berkah",
"email": "owner@tokoberkah.co.id",
"status": "REGISTERED",
"identity": {
"country_of_incorporation": "ID",
"entity_type": "INDIVIDUAL"
},
"configuration": {
"users": {
"send_email_invite": false
},
"webhooks": {
"recipient": "MASTER_ACCOUNT"
}
},
"created_at": "2026-07-07T10:00:00Z",
"updated_at": "2026-07-07T10:00:00Z"
}Test mode sub-accounts are provisioned immediately with status LIVE,
and identity and configuration are returned with default values.
{
"id": "5cafeb170a2b18519b1b8763",
"name": "Acme Corp (Test)",
"email": "owner@acme.com",
"status": "LIVE",
"identity": {
"country_of_incorporation": "SG",
"entity_type": "CORPORATION"
},
"configuration": {
"users": {
"send_email_invite": false
},
"webhooks": {
"recipient": "MASTER_ACCOUNT"
}
},
"created_at": "2026-07-07T10:00:00Z",
"updated_at": "2026-07-07T10:00:00Z"
}A Sub-Account V3 object
ID of the sub-account. Use this in the for-user-id header to create
transactions on behalf of the sub-account.
Sub-account display name
Email address of the sub-account owner
Status of the sub-account. Sub-accounts created in Test mode always report LIVE.
The legal identity of the sub-account's business.
country_of_incorporation is an ISO 3166-1 alpha-2 country code. It must match
your master account's country of operation unless cross-country sub-accounts are
explicitly enabled for your account.
The available entity_type values depend on country_of_incorporation — see the
per-country variants below. Any country not listed follows the Singapore (SG)
entity type list.
Optional behaviour configuration for the sub-account
If true, sends an email invitation to email on account creation so the
owner can access the sub-account dashboard and continue filling in the
sub-account's KYC information. Available for every entity type.
Only applies in Live mode.
Where webhooks for the sub-account's transactions are delivered:
MASTER_ACCOUNT— webhooks are sent to the URLs configured in the master account's settings (default)SUB_ACCOUNT— webhooks are sent to the URLs configured in the sub-account's own settings
Timestamp of when the sub-account was created
Timestamp of when the sub-account was last updated
Invalid request.
| Error code | Description |
|---|---|
API_VALIDATION_ERROR |
Inputs are failing validation — a required field is missing or malformed |
INVALID_DATA_PROVIDED |
A field value is invalid — unsupported entity type for the given country, cross-country sub-account not allowed, or Test mode restriction violated |
MAXIMUM_ACCOUNT_REACHED |
You have reached the Test mode sub-account limit (500). This limit does not apply in Live mode. |
{
"error_code": "INVALID_DATA_PROVIDED",
"message": "Invalid 'identity.entity_type' provided. Check allowed entity types for the provided country."
}{
"error_code": "INVALID_DATA_PROVIDED",
"message": "Invalid 'identity.entity_type' provided. Only CORPORATION is supported in TEST mode."
}{
"error_code": "MAXIMUM_ACCOUNT_REACHED",
"message": "You may only create 500 Accounts in TEST mode. Contact help@xendit.co if you need a higher limit"
}Unauthorized.
| Error code | Description |
|---|---|
INVALID_CREDENTIALS |
The API key is missing/invalid, or the account it belongs to is not enabled for xenPlatform |
{
"error_code": "INVALID_CREDENTIALS",
"message": "Your credentials are not valid to make this request"
}Forbidden.
| Error code | Description |
|---|---|
DISALLOWED_OPERATION |
Operation not permitted for your account |
{
"error_code": "DISALLOWED_OPERATION",
"message": "You are not authorized to create accounts"
}Not found.
| Error code | Description |
|---|---|
BUSINESS_NOT_FOUND_ERROR |
Master account not found |
{
"error_code": "BUSINESS_NOT_FOUND_ERROR",
"message": "Business not found"
}