v1

latestOpenAPI 3.0.02026-07-1491520.4 KB
Subaccount Management

Create subaccount

Create a subaccount for a given primary account.

post/{api_key}/subaccounts

Path parameters

api_keystring required

ID of the primary account

Request body

namestring required
secretstring
use_primary_account_balanceboolean

Example request

{
  "name": "Subaccount department A",
  "secret": "Password123"
}

Response

Subaccount response

secretstring

API secret of the subaccount.

api_keystring

Unique subaccount ID.

balancenumber

Balance of the subAccount. Value is null if balance is shared with primary account.

created_atstring

Subaccount creation date and time.

credit_limitnumber

Credit limit of the subAccount. Value is null if balance is shared with primary account.

namestring

Name of the subaccount.

primary_account_api_keystring

Unique primary account ID.

suspendedboolean

Subaccount suspension status.

use_primary_account_balanceboolean

Flag showing if balance is shared with primary account.

Example response

{
  "secret": "Password123",
  "api_key": "bbe6222f",
  "balance": 100.25,
  "created_at": "2018-03-02T16:34:49Z",
  "credit_limit": -100.25,
  "name": "Subaccount department A",
  "primary_account_api_key": "acc6111f",
  "use_primary_account_balance": true
}