Create Sub-Account
Use POST method to create a new Sub-Account. To create a new Sub-Account, inquire a source (template) Sub-Account data packet via GET method and pass it with the POST method.
Endpoint:
POST
Sandbox:
https://sandbox.4levers.com/managementapi/api/accounts/{accountId}/subaccounts
Production: https://managementapi.4levers.com/api/accounts/{accountId}/subaccounts
The value indicated in the URL is a target Platform Account identifier {accountId} you are creating a new Sub-Account for.
New Sub-Account parameters values you pass in the request body.
Change parameters values you wish to override. Other (unchanged) values will be copied to a new Sub-Account as is.
New Sub-Accounts are being assigned with an identifier, following the last existing Sub-Account identifier of the relevant account (e.g. for account 220.1 will be created a new Sub-Account 220.2)
Example
You pass a 220 Platform Account identifier as a target Platform Account identifier in your API request URL.
In your request body you pass the accountId = 911 and the subAccountId = 1 as a source Platform Account and Sub-Account.
The System will automatically create a Sub-Account for target Platform Account 220 with configurations inherited from Platform Account 911.1
You can override the source Sub-Account configurations by changing the appropriate parameters values in the request body.
IMPORTANT:
All changes will take effect and the new sub account will be active after 4 hours.
Request Parameters
NOTE:
Optional fields can be manually removed from the request in case you want to skip them. Enter valid parameters values in case you want to pass them in the request.
| Name | Type | Required | Description |
| accountId | integer | ✓ | Platform Account identifier. |
| subAccountId | integer | optional | Source Sub-Account identifier. |
| merchantId | string | optional | Merchant identifier (MID). |
| externalId | string | optional | Merchant external identifier. |
| mcc | string | optional | Merchant Category Code (MCC). |
| applicationId | integer | optional | Underwriting application identifier. Required if the related Service Provider has “Require Underwriting” = Yes and “Can override” is not checked. Optional if if the related Service Provider has “Require Underwriting” = Yes and “Can override” is checked. |
| accountName | string | ✓ | Max250 Platform Account Name. |
| billing | object | optional | Sub-Account billing settings. Only for Fees, that have feeSource=Sub-Account. |
| payouts | object | optional | Sub-Account payouts settings. |
| processing | object | ✓ | Sub-Account processing settings. |
| serviceProviderId | integer | ✓ | Service Provider identifier. Serves as SkinID for user authorization purposes. |
| subAccountName | string | ✓ | Sub-Account name. varchar(50) |
| sumUpCutOffHour | integer | optional | Auto cut-off value. In case empty, values are inherited from the parent system entity |
| payoutCutOffHour | integer | optional | Payout cut-off value. In case empty and payout and/or scheduled fees included, values are inherited from the parent system entity. |
| merchantStatement | object | optional | Merchant statement settings. |
| isTemplate | boolean | optional | Defines a template account
NOTE:
This value cannot be changed with the Update Sub-Account method (make sure to set this with the correct value) |
Response Parameters
| Name | Type | Description |
| account | integer | New Platform Account identifier. |
| subAccount | integer | New Sub-Account identifier. |
| apiKey | string | API key. Required parameter for Tokenization API. |
| merchantIdFound | array | Array with the id (PlatdormId.Sub-AccountId) of existing Sub-Accounts with the same MID. |
Response Codes
| Response Code | Description |
|---|---|
| 201 | Created — Sub-Account has been created successfully. |
| 400 | Bad Request — Your request is invalid. |
| 401 | Unauthorized — Authorization failed. |
| 403 | Forbidden — Access denied. |
| 404 | Not Found — Wrong URL. |
| 415 | Unsupported Media Type — Wrong request format. |
| 500 | Internal Server Error — We had a problem with our server. Try again later. |
| 503 | Service Unavailable — We’re temporarily offline for maintenance. Please try again later. |
{
"accountId": 0,
"subAccountId": 0,
"merchantId": "string",
"externalId": "string",
"mcc": "string",
"applicationId": 0,
"accountName": "string",
"billing": {
"interchangeFeesRegions": [
0
],
"interchangeFeesReversalEnabled": [
"Void"
],
"interchangeFeesOverride": {
"source": "SubAccount",
"target": "Platform",
"sourceSubAccountId": 0,
"targetSubAccountId": 0,
"sourceAgentId": 0,
"targetAgentId": 0
},
"interchangeFeeSeason": {
"dateFrom": "2021-04-07T04:44:58.6666666",
"dateTo": "2021-04-12T04:44:58.6666666",
"offSeasonMonth": [
0
]
},
"scheduledFees": [
{
"id": 0,
"amount": 0,
"dayNumber": 0,
"endDate": "2021-04-12T04:44:58.6666666",
"expiration": "UntilDate",
"interval": "Daily",
"intervalCount": 0,
"monthNumber": 0,
"name": "string",
"occurrencesQuantity": 0,
"override": {
"source": "SubAccount",
"target": "Platform",
"sourceSubAccountId": 0,
"targetSubAccountId": 0,
"sourceAgentId": 0,
"targetAgentId": 0
},
"feeSeason": {
"dateFrom": "2021-04-07T04:44:58.6666666",
"dateTo": "2021-04-12T04:44:58.6666666",
"offSeasonMonth": [
0
]
}
}
],
"slidingScaleFees": [
{
"feePriorityLevel": 0,
"id": 0,
"name": "string",
"ranges": [
{
"amount": 0,
"maxCount": 0,
"minCount": 0,
"percentage": 0
}
],
"reversalEnabled": [
"Void"
],
"feeSeason": {
"dateFrom": "2021-04-07T04:44:58.6666666",
"dateTo": "2021-04-12T04:44:58.6666666",
"offSeasonMonth": [
0
]
},
"override": {
"source": "SubAccount",
"target": "Platform",
"sourceSubAccountId": 0,
"targetSubAccountId": 0,
"sourceAgentId": 0,
"targetAgentId": 0
},
"buyrate": {
"amount": 0,
"percentage": 0,
"source": "SubAccount",
"target": "Platform",
"sourceSubAccountId": 0,
"targetSubAccountId": 0,
"sourceAgentId": 0,
"targetAgentId": 0,
"buyrateGapPayer":"Agent",
"buyrateGapPayerAgentId":0,
"buyrateGapPayerSubAccountId": 0
},
"split": [
{
"priorityLevel": 0,
"percentage": 0,
"source": "SubAccount",
"target": "Platform",
"sourceSubAccountId": 0,
"targetSubAccountId": 0,
"sourceAgentId": 0,
"targetAgentId": 0
}
]
}
],
"transactionFees": [
{
"feePriorityLevel": 0,
"amount": 0,
"typeId": 0,
"name": "string",
"percentage": 0,
"buyrate": {
"amount": 0,
"percentage": 0,
"source": "SubAccount",
"target": "Platform",
"sourceSubAccountId": 0,
"targetSubAccountId": 0,
"sourceAgentId": 0,
"targetAgentId": 0,
"buyrateGapPayer":"Agent",
"buyrateGapPayerAgentId":0,
"buyrateGapPayerSubAccountId": 0
},
"split": [
{
"priorityLevel": 0,
"percentage": 0,
"source": "SubAccount",
"target": "Platform",
"sourceSubAccountId": 0,
"targetSubAccountId": 0,
"sourceAgentId": 0,
"targetAgentId": 0
}
],
"reversalEnabled": [
"Void"
],
"feeSeason": {
"dateFrom": "2021-04-07T04:44:58.6666666",
"dateTo": "2021-04-12T04:44:58.6666666",
"offSeasonMonth": [
0
]
},
"override": {
"source": "SubAccount",
"target": "Platform",
"sourceSubAccountId": 0,
"targetSubAccountId": 0,
"sourceAgentId": 0,
"targetAgentId": 0
}
}
],
"slidingScaleCounterReset": {
"timeInterval": "Weekly",
"numberOfIntervals": 0
}
},
"payouts": {
"manualPayout": true,
"negativePayout": true,
"payouts": [
{
"payoutMethodAch": {
"accountNumber": "string",
"accountType": "None",
"entityType": "Personal",
"nameOnAccount": "string",
"routingNumber": "string"
},
"calculation": {
"fixedAmount": 0,
"intervalCount": 0,
"intervalGap": 0,
"payoutType": "Fixed",
"percentageAmount": 0
},
"name": "string",
"scheduler": {
"id": 0,
"isSchedulerDisabled": false,
"dayNumber": 0,
"endDate": "2021-04-12T04:44:58.6666666",
"expiration": "UntilDate",
"interval": "Daily",
"intervalCount": 0,
"monthNumber": 0,
"occurrencesQuantity": 0
},
"twoStepApproval": true
}
],
"processor": {
"id": 0,
"parameters": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"processor": "NoAcquirer"
},
"cardOnFileProcessorConfiguration": {
"id": 0,
"parameters": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"processor": "NoAcquirer"
},
"payoutMethodCreditCard": {
"creditCardNumber": "string",
"creditCardNameOnCard": "string",
"creditCardExpirationDate": "string",
"creditCardCVV": "string"
},
"skipBalanceCheck": true
},
"processing": {
"ach": {
"processors": {
"id": 0,
"parameters": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"processor": "NoAcquirer"
}
},
"creditCards": {
"autoCapture": true,
"giftCardsEnabled": true,
"creditCardTypes": [
"Visa"
],
"threeDSecure": true,
"processors": {
"id": 0,
"parameters": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"processor": "NoAcquirer"
},
"tokenization": [
"External"
]
},
"currency": "USD",
"fraudPreventionEnabled": true,
"recurringBilling": {
"autoRenewalEnabled": true,
"recurringEngineEnabled": true,
"subscriptionsEnabled": true
},
"transactionMode": "Processing"
},
"serviceProviderId": 0,
"subAccountName": "string",
"payoutCutOffHour": 0,
"sumUpCutOffHour": 0,
"merchantStatement": {
"merchantNumber": "string",
"merchantName": "string",
"merchantDBA": "string",
"autoDeliveryContactEmail": "string"
},
}
Response
{
"account":101,
"subAccount":84,
"apiKey":"ac319cffc217497684eff81736a3786d",
"merchantIdFound": [
"101.1",
"101.2"
]
}