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

const client = new Ivy({
  apiKey: 'My API Key',
});

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

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

Authorizations

X-Ivy-Api-Key
string
header
required

API key for authentication

Body

application/json

The legal name of the Subaccount

mcc
string
required

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

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