Skip to main content
POST
/
api
/
service
/
subaccount
/
create
JavaScript
import Ivy from '@getivy/node-sdk';

const client = new Ivy({
  apiKey: process.env['IVY_API_KEY'], // This is the default and can be omitted
});

const subaccount = await client.subaccounts.create({ legalName: 'legalName', mcc: '7321' });

console.log(subaccount.id);
{
  "id": "<string>",
  "legalName": "<string>",
  "status": "active",
  "mcc": "<string>",
  "ownerId": "<unknown>",
  "createdAt": "<unknown>",
  "updatedAt": "<unknown>",
  "websiteUrl": "<string>"
}

Authorizations

X-Ivy-Api-Key
string
header
required

API key for authentication

Body

application/json

The legal name of the Subaccount

Maximum string length: 30
mcc
string
required

The merchant category code of the Subaccount. See here for more information.

Required string length: 4
websiteUrl
string

The website url of the Subaccount

Response

200 - application/json

Returns a new Subaccount

id
string
required
status
enum<string>
required
Available options:
active,
inactive
mcc
string
required
ownerId
any
required
createdAt
any
required
updatedAt
any
required
websiteUrl
string