Skip to Content
APIsSubaccounts

Subaccounts

Subaccount API allows you to manage and retrieve information about subaccounts associated with a master account.

The endpoint is in Beta. Request access by emailing: support@adesic.com

Subaccounts are a way to create and manage user accounts under a master account. They can be interacted with using the master account’s API key.

  • Subaccount:
    • A subaccount is specified via the userId field in the request body or request query, serving as another part of the apiKey.
    • The master account can interact with subaccount payment methods and transactions.
    • The master account cannot interact with subaccounts of a subaccount.
    • Each subaccount can only have one master account.

Post Subaccount

POSThttps://api.adesic.com/v2/transactions/sub-accounts

Returns a 201 status code upon successful query. Then returns the successful account created.

Headers

NameTypeDescription
apiKey*stringYour Adesic API Key

Request Body

NameTypeDescription
subAccount*objectSubaccount details.
subAccount.name*stringUser name including first and last name.
subAccount.email*stringThe user’s email address.

Response

{ "newSubAccountId": "usr-123456790" }

Get Subaccounts

GEThttps://api.adesic.com/v2/transactions/sub-accounts

Returns an array of all the accounts for an associated apiKey.

Headers

NameTypeDescription
apiKey*stringYour Adesic API Key

Response

[{ "id": "usr-123456790", "email": "test@account.com", "name": "subAccountName", "createdAt": "2023-12-10T00:46:14.786", "updatedAt": "2023-12-10T00:46:14.783" },{ "id": "usr-123457800", "email": "zeekdonuts@gmail.com", "name": "Zeek Zubert", "createdAt": "2023-12-10T02:18:32.022", "updatedAt": "2023-12-10T02:18:32.018" }]

Get Subaccount by ID

GEThttps://api.adesic.com/v2/transactions/sub-accounts/{accountId}

Returns an object for the accountId for an associated apiKey.

Query Parameters

NameTypeDescription
accountId*stringAccount ID

Headers

NameTypeDescription
apiKey*stringYour Adesic API Key

Response

{ "id": "usr-123456790", "email": "test@account.com", "name": "subAccountName", "createdAt": "2023-12-10T00:46:14.786", "updatedAt": "2023-12-10T00:46:14.783" }

POSThttps://api.adesic.com/v2/transactions/sub-accounts/{subAccountId}/verification-link

Generates a hosted verification link for the subaccount.

Headers

NameTypeDescription
apiKey*stringYour Adesic API Key

Request Body

NameTypeDescription
typestringOptional verification flow type.

Update Partner Fee

POSThttps://api.adesic.com/v2/transactions/sub-accounts/{subAccountId}/partner-fee

Updates the partner fee basis-point value for the subaccount.

Headers

NameTypeDescription
apiKey*stringYour Adesic API Key

Request Body

NameTypeDescription
partnerFee*numberPartner fee in basis points.

Copy & Paste Code

POST Subaccounts

post_subaccount.sh
curl -X POST \ -H "Content-Type: application/json" \ -H "api-key: your-api-key" \ -d '{ "subAccount": { "name": "Zeek Zubert", "email": "zeekdonuts@gmail.com" } }' \ https://api.adesic.com/v2/transactions/sub-accounts

GET Subaccounts

get_subaccounts.sh
curl -H "api-key: YOUR_API_KEY" "https://api.adesic.com/v2/transactions/sub-accounts"

Subaccounts Response Object

Example URL: https://api.adesic.com/v2/transactions/sub-accounts 

{ "newSubAccountId": "usr-123456790" }

Subaccounts Response Attributes

Attribute NameData TypeDescription
idstringUnique user id.
emailstringUser email address.
namestringUser first and last name.
createdAtstringThe timestamp the user account was created.
updatedAtstringThe last timestamp the user account was updated at.

© Adesic LLC. All Rights Reserved