- 03 May 2023
- 5 Minutes To Read
- Print
- DarkLight
- PDF
Transaction Channels Configuration
- Updated On 03 May 2023
- 5 Minutes To Read
- Print
- DarkLight
- PDF
A transaction channel is a form of payment such as cash, POS device, receipt, check, bank and so on.
Mambu ships with one predefined transaction channel — cash — but you can add other transaction channels as needed for your organization. For more information, see Transaction Channels.
With Configuration as Code (CasC), you may batch configure your transaction channels configuration via the API using YAML. For general information on CasC, see Configuration as Code Overview.
API Operations
CasC for transaction channels supports two operations.
Action | Endpoint | Description |
---|---|---|
GET | /configuration/transactionchannels.yaml | Get current transaction channels configuration. |
PUT | /configuration/transactionchannels.yaml | Write a new transaction channels configuration to Mambu. |
If you PUT
a configuration to Mambu, any current configuration settings not included in the new YAML configuration will be deleted. Unless they cannot be deleted in which case you will receive a warning. PATCH
requests are not currently supported.
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.
GET configuration
curl -X GET 'https://TENANT_NAME.mambu.com/api/configuration/transactionchannels.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/transactionchannels.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Content-Type: application/yaml' \
-H 'Authorization: Basic {auth}' \
--data-binary @transactionchannels.yaml
{auth} is the base-64-encoded value of username:password
. For more information, see Authentication in our API reference.
“@transactionchannels.yaml” represents the absolute path of the file on your device.
(Use “--data-raw” if you want to specify the YAML body inline).
Configuration body example
---
defaultTransactionChannel:
id: "cash"
name: "Cash"
state: "ACTIVE"
loansConstraints:
usage: "UNCONSTRAINED_USAGE"
constraints: []
savingsConstraints:
usage: "UNCONSTRAINED_USAGE"
constraints: []
usageRights:
roles: []
allUsers: true
transactionChannels:
- id: "63547"
name: "Visa Card"
state: "ACTIVE"
loansConstraints:
usage: "LIMITED_USAGE"
constraints:
- criteria: "PRODUCT"
filterElement: "EMPTY"
values: []
matchFilter: "ALL"
savingsConstraints:
usage: "UNCONSTRAINED_USAGE"
constraints: []
glAccountCode: "66734"
usageRights:
roles:
- "35436"
allUsers: false
- id: "837489"
name: "Master card "
state: "ACTIVE"
loansConstraints:
usage: "LIMITED_USAGE"
constraints:
- criteria: "PRODUCT"
filterElement: "EMPTY"
values: []
matchFilter: "ALL"
savingsConstraints:
usage: "UNCONSTRAINED_USAGE"
constraints: []
glAccountCode: "68982"
usageRights:
roles:
- "43643"
allUsers: false
- id: "83203"
name: "BACS"
state: "ACTIVE"
loansConstraints:
usage: "LIMITED_USAGE"
constraints:
- criteria: "AMOUNT"
filterElement: "LESS_THAN"
values:
- "9999.99"
matchFilter: "ALL"
savingsConstraints:
usage: "LIMITED_USAGE"
constraints:
- criteria: "AMOUNT"
filterElement: "LESS_THAN"
values:
- "9999.99"
matchFilter: "ALL"
glAccountCode: "54323"
usageRights:
roles:
- "1064356630"
allUsers: false
- id: "82352"
name: "CHAPS"
state: "ACTIVE"
loansConstraints:
usage: "LIMITED_USAGE"
constraints:
- criteria: "AMOUNT"
filterElement: "MORE_THAN"
values:
- "10000.00"
matchFilter: "ALL"
savingsConstraints:
usage: "LIMITED_USAGE"
constraints:
- criteria: "AMOUNT"
filterElement: "MORE_THAN"
values:
- "10000.00"
matchFilter: "ALL"
glAccountCode: "63213"
usageRights:
roles:
- "1108047100"
allUsers: false
Attributes
Transaction channel configuration attributes
Name | Type | Description | Required |
---|---|---|---|
defaultTransactionChannel | Transaction Channel Configuration | The default transaction channel. | ✔ |
transactionChannels | Transaction Channel Configuration | List of all transaction channels. | ✘ |
Transaction channel attributes
Name | Type | Description | Required |
---|---|---|---|
id | String | User-defined ID, unique in the configuration. | ✔ |
name | String | Name of the transaction channel. | ✔ |
state | String | State of the transaction channel. The options are ACTIVE and INACTIVE . | ✔ |
loanConstraints | List | A list of loan constraints for the transaction channel. | ✘ |
loanConstraints. usage | String | States the limited or unconstrained usage of the transaction channel. The options are UNCONSTRAINED_USAGE and LIMITED_USAGE . | ✔ |
loanConstraints. constraints | Constraint Configuration | The loan constraints for the transaction channel. | Required if usage is LIMITED_USAGE , otherwise must be empty. |
loanConstraints. matchFilter | String | The match filter of the constraints. The options are ANY or ALL . | Required if usage is LIMITED_USAGE , otherwise must be empty. |
savingsConstraints | List | A list of savings constraints for the transaction channel. | ✘ |
savingsConstraints. usage | String | States the limited or unconstrained usage of the transaction channel. The options are UNCONSTRAINED_USAGE and LIMITED_USAGE . | ✔ |
savingsConstraints. constraints | Constraint Configuration | The saving constraints for the transaction channel. | Required if usage is LIMITED_USAGE , otherwise must be empty. |
savingsConstraints. matchFilter | String | The match filter of the constraints. The options are ANY or ALL . | Required if usage is LIMITED_USAGE , otherwise must be empty. |
glAccountCode | String | The code of the GLAccount of the transaction channel. | ✘ |
usageRights | AccessRights | Response representation of access rights configuration. | ✔ |
usageRights.roles | [String] | Lists the IDs in ascending order of the roles that have view/edit rights for this configuration when it's not accessible by all users. | Required if allUsers is false . |
usageRights.allUsers | Boolean | Indicates whether the configuration can be viewed or edited by all users if true or by the roles indicated by the roles attribute if false. | ✔ |
Loan and savings constraint attributes
Name | Type | Description | Required |
---|---|---|---|
criteria | String | Specifies the criteria based on which the constraint will be applied. The options are AMOUNT , TYPE , and PRODUCT . | ✔ |
filterElement | String | Specifies the operator of the constraint. The options are EQUALS , EMPTY , NOT_EMPTY , MORE_THAN , LESS_THAN , BETWEEN , and IN . | ✔ |
values | [String] | The values of the constraint. Depending on the type of constraint the list will contain a variable number of values. | Required for EQUALS , MORE_THAN , LESS_THAN , and BETWEEN filter elements. Not required for EMPTY and NOT_EMPTY filter elements. |
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.
Validations
With all use cases, a validation of the uploaded file will be done, ensuring the following:
- Syntax is correct as per YAML standards and the template for holidays.
- Minimum requirements indicates the line with the syntax error.
- Content is correct.
Configuration settings may be specified in any order.
Transaction channel attribute validations
Name | Validation |
---|---|
id | The ID must not exceed a length of 32 characters and must not be duplicate. The default transaction channel ID cannot be changed. |
name | Maximum 256 characters in length. |
glAccountCode | The GL Account with the specified code must exist. |
Access rights validations
Name | Validation |
---|---|
roles | The IDs specified in this list must not be blank or duplicate and must belong to an existing user role. |
Constraint attribute validations
Name | Validation |
---|---|
filterElement |
|
values |
|
Warnings
In case a transaction channel cannot be deleted, it will be deactivated and the following warning will be returned: TransactionChannel [tr2] could not be deleted: The transaction channel cannot be deleted since it is used in a transaction.