- 03 May 2023
- 4 Minutes To Read
- Print
- DarkLight
- PDF
Deposit Products Configuration
- Updated On 03 May 2023
- 4 Minutes To Read
- Print
- DarkLight
- PDF
A deposit product allows customization of deposit accounts. Configuration as Code enables batch configuration via API using YAML. API Operations for deposit products support two operations. Requests require authentication and headers. Additional headers for asynchronous PUT requests include X Mambu Async and X Mambu Callback. Successful asynchronous requests return a status code of 202 Accepted. GET and PUT configurations require base 64 encoded username and password. depositproducts.yaml file path is needed for configuration. Input requirements include basic fields, availability settings, new account settings, currency settings, internal controls settings, interest settings, and fee settings. Fix validation errors if 200 OK status code is not received after a PUT request.
A deposit product allows you to set up the parameters for a type of deposit that you wish to regularly offer. Deposit products are flexible and highly-customizable templates for creating individual deposit accounts. For more information, see Setting Up New Deposit Products.
With Configuration as Code (CasC), you may batch configure your deposit products configuration via the API using YAML. For general information on CasC, see Configuration as Code Overview.
API Operations
CasC for deposit products supports two operations.
Action | Endpoint | Description |
---|---|---|
GET | /configuration/depositproducts.yaml | Get current deposit products configuration. |
PUT | /configuration/depositproducts.yaml | Write a new deposit products configuration to Mambu. |
If you PUT
a configuration to Mambu, any deposit product(s) not included in the new YAML configuration will be deleted if they have never been used.
If the deposit product(s) have been or are being used, then they will be deactivated.
Requests
For general information on CasC requests such as authentication and required headers, see Configuration as Code Overview.
The following section shows sample requests using curl and basic authentication. For all examples, replace TENANT_NAME
with your actual tenant name.
Additional headers
You may send synchronous or asynchronous PUT
requests.
If you have more than 100 deposit products, we recommend you make your request asynchronous.
To use the endpoint asynchronously, you must provide two additional headers:
X-Mambu-Async
with a value oftrue
.X-Mambu-Callback
with the callback URL.
The expected status code in case of a successful asynchronous request is 202 Accepted
. When the update configuration operation is completed, a message will be posted to the provided URL with information about whether the updated request completed successfully or not.
GET configuration
curl -X GET 'https://TENANT_NAME.mambu.com/api/configuration/depositproducts.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Authorization: Basic {auth}'
{auth} is the base-64-encoded value of username:password
. For more information, see Authentication in our API reference.
PUT configuration
curl -X PUT 'https://TENANT_NAME.mambu.com/api/configuration/depositproducts.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Content-Type: application/yaml' \
-H 'Authorization: Basic {auth}' \
--data-binary @depositproducts.yaml
{auth} is the base-64-encoded value of username:password
. For more information, see Authentication in our API reference.
@depositproducts.yaml
represents the absolute path of the file on your device.
(Use “--data-raw” if you want to specify the YAML body inline).
Configuration example
---
depositProducts:
- id: "product1"
name: "A product with only the minimum fields defined"
type: "FIXED_DEPOSIT"
category: "UNCATEGORIZED"
state: "ACTIVE"
description: "A saving product with a <b>fixed deposit</b> where clients can put\
\ a certain amount in and lock it to collect interest until maturity 2-5 months\
\ later"
newAccountSettings:
idGeneratorType: "RANDOM_PATTERN"
idPattern: "@@@@###"
availabilitySettings:
forGroups: true
forIndividuals: true
branchSettings:
allBranches: true
branches:
currencySettings:
currencies:
- "USD"
interestSettings:
daysInYear: "E30_360"
paidIntoAccount: true
- id: "DSP"
name: "Product example with all fields defined"
type: "CURRENT_ACCOUNT"
category: "UNCATEGORIZED"
state: "INACTIVE"
description: "Commonly used savings product"
newAccountSettings:
idGeneratorType: "INCREMENTAL_NUMBER"
idPattern: "2"
availabilitySettings:
forGroups: false
forIndividuals: false
branchSettings:
allBranches: true
branches: [ ]
currencySettings:
currencies:
- "EUR"
- "RON"
- "CNY"
maturitySettings:
maturityPeriodInterval:
defaultValue: 5
minValue: 3
maxValue: 7
maturityPeriodUnit: "WEEKS"
taxSettings:
withholdingTaxEnabled: false
creditArrangementSettings:
requirement: "OPTIONAL"
internalControlsSettings:
dormancyPeriodDays: 10
recommendedDepositAmount: 100
maxWithdrawalAmount: 120
openingBalance:
minValue: 10
maxValue: 30
defaultValue: 20
allowOffset: true
feeSettings:
allowArbitraryFees: false
fees:
- id: "feeForNewProduct"
name: "Deposit Made"
active: true
amount: 120.9
amountCalculationMethod: "FLAT"
trigger: "MANUAL"
accountingRules: [ ]
interestSettings:
daysInYear: "ACTUAL_365_FIXED"
calculationBalance: "END_OF_DAY"
paidIntoAccount: true
collectInterestWhenLocked: true
maximumBalance: 10003
interestRateSettings:
interestRateSource: "FIXED_INTEREST_RATE"
interestRateTerms: "TIERED"
interestRateTiers:
- endingBalance: 500
interestRate: 10
- endingBalance: 900
interestRate: 5
accrueInterestAfterMaturity: true
overdraftInterestSettings:
allowOverdraft: true
allowTechnicalOverdraft: true
maxOverdraftLimit: 100
daysInYear: "ACTUAL_365_FIXED"
calculationBalance: "END_OF_DAY"
interestRateSettings:
allowNegativeInterestRate: false
interestRateSource: "FIXED_INTEREST_RATE"
interestRateTerms: "TIERED"
interestRateTiers:
- endingBalance: 500
interestRate: 10
- endingBalance: 900
interestRate: 5
accountingSettings:
accountingRules:
- glAccountCode: "11001"
financialResource: "DEPOSIT_REFERENCE"
- glAccountCode: "10002"
financialResource: "SAVINGS_CONTROL"
- glAccountCode: "11003"
financialResource: "INTEREST_EXPENSE"
- glAccountCode: "10004"
financialResource: "FEE_INCOME"
accountingMethod: "ACCRUAL"
interestAccruedAccountingMethod: "END_OF_MONTH"
Input requirements
The below input requirements are in addition to any existing validations or input requirements for deposit products. The same deposit product requirements apply whether a deposit product is made via the UI, API v2, or through CasC.
Basic fields
Name | Description | Required |
---|---|---|
id | Must not be empty, must be unique and have a maximum length of 32 characters. | ✔ |
name | Must not be blank and must be between 1 and 256 characters. | ✔ |
state | Must not be null. | ✔ |
type | Must not be null and must be an existing value. | ✔ |
Availability settings
Name | Description | Required |
---|---|---|
availabilitySettings | Must not be blank. | ✔ |
forGroups | Must not be null. | ✔ |
forIndividual | Must not be null. | ✔ |
branchSettings | Must not be blank. | ✔ |
branchSettings.allBranches | Must not be null. | ✔ |
branchSettings.branches | If defined, must contain existing IDs for branches. | ✘ |
New account settings
Name | Description | Required |
---|---|---|
newAccountSettings | Must not be blank. | ✔ |
idGeneratorType | Must not be null. Must be either RANDOM_PATTERN or INCREMENTAL_NUMBER . | ✔ |
idPattern | Must not be blank. If the idGeneratorType is INCREMENTAL_NUMBER , then it must be a positive number. | ✔ |
Currency settings
Name | Description | Required |
---|---|---|
currencySettings | Must not be blank. | ✔ |
currencies | Must not be empty. All the currencies must already be defined. | ✔ |
Internal controls settings
Name | Description | Required |
---|---|---|
internalControlsSettings | Not mandatory. | ✘ |
dormancyPeriodDays | If defined, it must be between 0 and 1999999973982208. | ✘ |
maxWithdrawalAmount | If defined, it must be between 0 and 1999999973982208. | ✘ |
recommendedDepositAmount | If defined, it must be between 0 and 1999999973982208. | ✘ |
Interest settings
Name | Description | Required |
---|---|---|
interestSettings | Not mandatory. | ✘ |
interestRateSource | Must be an existing interest rate ID. | ✔ |
Fee settings
Name | Description | Required |
---|---|---|
feeSettings | Not mandatory. | ✘ |
id | Must not be blank. | ✔ |
Replies
If you do not receive a 200 OK
status code then fix any validation errors and make another PUT
request until you receive a 200 OK
status code.
If you PUT
a valid YAML configuration to the API and you do not receive a 200 OK
status code within 60 seconds, you may receive a 504 Gateway Timeout
status code. We expect all responses to be below 60 seconds.
If you encounter this issue, please contact us through Mambu Support so we can investigate it.