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
userIdfield 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.
- A subaccount is specified via the
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
| Name | Type | Description |
|---|---|---|
| apiKey* | string | Your Adesic API Key |
Request Body
| Name | Type | Description |
|---|---|---|
| subAccount* | object | Subaccount details. |
| subAccount.name* | string | User name including first and last name. |
| subAccount.email* | string | The user’s email address. |
Response
201: Created Success
{
"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
| Name | Type | Description |
|---|---|---|
| apiKey* | string | Your Adesic API Key |
Response
200: OK Success
[{
"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
| Name | Type | Description |
|---|---|---|
| accountId* | string | Account ID |
Headers
| Name | Type | Description |
|---|---|---|
| apiKey* | string | Your Adesic API Key |
Response
200: OK Success
{
"id": "usr-123456790",
"email": "test@account.com",
"name": "subAccountName",
"createdAt": "2023-12-10T00:46:14.786",
"updatedAt": "2023-12-10T00:46:14.783"
}Create Verification Link
POSThttps://api.adesic.com/v2/transactions/sub-accounts/{subAccountId}/verification-link
Generates a hosted verification link for the subaccount.
Headers
| Name | Type | Description |
|---|---|---|
| apiKey* | string | Your Adesic API Key |
Request Body
| Name | Type | Description |
|---|---|---|
| type | string | Optional 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
| Name | Type | Description |
|---|---|---|
| apiKey* | string | Your Adesic API Key |
Request Body
| Name | Type | Description |
|---|---|---|
| partnerFee* | number | Partner fee in basis points. |
Copy & Paste Code
POST Subaccounts
cURL
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-accountsGET Subaccounts
cURL
curl -H "api-key: YOUR_API_KEY" "https://api.adesic.com/v2/transactions/sub-accounts"Subaccounts Response Object
POST Subaccounts
Example URL: https://api.adesic.com/v2/transactions/sub-accounts
{
"newSubAccountId": "usr-123456790"
}Subaccounts Response Attributes
| Attribute Name | Data Type | Description |
|---|---|---|
| id | string | Unique user id. |
| string | User email address. | |
| name | string | User first and last name. |
| createdAt | string | The timestamp the user account was created. |
| updatedAt | string | The last timestamp the user account was updated at. |