Developer Center

Loan Transactions API

Last Updated: Oct 24, 2017 05:20PM CEST

URL

    /api/loans/{ID}/transactions
    /api/loans/transactions/search
    /api/loans/transactions/{ID}/templates/{templateId}

Description

Allows you to retrieve and post transactions for a loan account. Various transactions can be posted including:
  • Approving a Loan Account
  • Undo approving a Loan Account
  • Disbursing a Loan Account
  • Undo disbursing a Loan Account
  • Manually Applying Interest
  • Applying a Repayment
  • Undo applying a Repayment
  • Applying a Fee
  • Undo applying a Fee
  • Applying a Penalty
  • Undo applying a Penalty
  • Closing a Loan Account
  • Undo closing a Loan Account
  • Lock a Loan Account
  • Unlock a Loan Account
  • Undo applying a Payment Made

Methods

GET Transactions

Allows for retrieving loan transactions for a specific account.Transactions are returned in order sorted by most recent to oldest

Usage examples

//get the top 10 transactions for loan account KHGJ593
GET /api/loans/KHGJ593/transactions?offset=0&limit=10

// get a specific document for a loan transaction. The document will have the placeholder values replaced with transaction values 
GET /api/loans/KHGJ593/transactions/312b8a134444a69a0147487c90a90052​/templates/8a80864d57fabb2b0157fb3d469b0073

Samples responses

[
    {
        "encodedKey": "8a858f145f489bdb015f4d6f251e071f",
        "transactionId": 5415,
        "parentAccountKey": "8a858f145f489bdb015f49e40a221e1f",
        "type": "REPAYMENT",
        "comment": "",
        "creationDate": "2017-10-24T08:11:04+0000",
        "entryDate": "2017-09-12T00:00:00+0000",
        "amount": "5000",
        "principalPaid": "4841.19",
        "interestPaid": "158.81",
        "deferredInterestAmount": "0",
        "feesPaid": "0",
        "penaltyPaid": "0",
        "taxOnInterestPaid": "0",
        "taxOnFeesAmount": "0",
        "taxOnPenaltyAmount": "0",
        "deferredTaxOnInterestAmount": "0",
        "advancePosition": "0",
        "arrearsPosition": "-1643.13",
        "expectedPrincipalRedraw": "0",
        "balance": "5287.67",
        "redrawBalance": "0",
        "principalBalance": "5158.81",
        "details": {
            "encodedKey": "8a858f145f489bdb015f4d6f251e0720",
            "transactionChannelKey": "8a85895b50eb44220150eb4452a0000a",
            "internalTransfer": false,
            "transactionChannel": {
                "encodedKey": "8a85895b50eb44220150eb4452a0000a",
                "id": "cash",
                "name": "Cash",
                "creationDate": "2015-11-09T08:02:14+0000",
                "index": 0,
                "activated": true,
                "savingsConstraintsUsage": "UNCONSTRAINED_USAGE",
                "savingsConstraints": {
                    "encodedKey": "8a858f9c5ac133f9015ac1345f780061",
                    "filterConstraints": []
                },
                "usageRights": {
                    "encodedKey": "8a85895b50eb44220150eb4452a1000b",
                    "isAccessibleByAllUsers": true,
                    "roles": []
                }
            }
        },
        "userKey": "8a8589ac53a4303e0153a7c0fe094ffd",
        "loanPredefinedFeeAmounts": [],
        "productTypeKey": "8a858ee25b34d796015b38b926987bae",
        "customInformation": [
            {
                "encodedKey": "8a858f145f489bdb015f4d6f251e0721",
                "parentKey": "8a858f145f489bdb015f4d6f251e071f",
                "customFieldKey": "8a85898b548f54af01548f6a20fd1353",
                "customField": {
                    "encodedKey": "8a85898b548f54af01548f6a20fd1353",
                    "id": "IDENTIFIER_TRANSACTION_CHANNEL_I",
                    "creationDate": "2016-09-22T14:07:31+0000",
                    "lastModifiedDate": "2017-02-22T15:34:53+0000",
                    "name": "Identifier",
                    "type": "TRANSACTION_CHANNEL_INFO",
                    "dataType": "STRING",
                    "valueLength": "SHORT",
                    "isDefault": false,
                    "isRequired": false,
                    "description": "An unique user-defined identifier for each transaction. This field is optional, but if specified, it must be unique across all loan and deposit transactions",
                    "customFieldSet": {
                        "encodedKey": "8a85898b548f54af01548f6a20e01341",
                        "id": "Transaction_Details_Transactions",
                        "name": "Transaction Details",
                        "notes": "Captures default transaction custom fields",
                        "createdDate": "2016-05-08T08:09:38+0000",
                        "indexInList": 0,
                        "type": "TRANSACTION_CHANNEL_INFO",
                        "usage": "SINGLE"
                    },
                    "indexInList": 0,
                    "state": "NORMAL",
                    "customFieldSelectionOptions": [],
                    "viewRights": {
                        "encodedKey": "8a85898b548f54af01548f6a20fd1354",
                        "isAccessibleByAllUsers": true,
                        "roles": []
                    },
                    "editRights": {
                        "encodedKey": "8a85898b548f54af01548f6a21001358",
                        "isAccessibleByAllUsers": true,
                        "roles": []
                    },
                    "unique": false,
                    "values": [],
                    "amounts": {}
                },
                "value": "identity",
                "indexInList": -1,
                "customFieldID": "IDENTIFIER_TRANSACTION_CHANNEL_I",
                "customFieldSetGroupIndex": -1
            },
            {
                "encodedKey": "8a858f145f489bdb015f4d70a3cd07c2",
                "parentKey": "8a858f145f489bdb015f4d6f251e071f",
                "customFieldKey": "8a85898b548f54af01548f6a210e135c",
                "customField": {
                    "encodedKey": "8a85898b548f54af01548f6a210e135c",
                    "id": "BANK_NUMBER_TRANSACTION_CHANNEL_",
                    "creationDate": "2017-05-31T08:19:22+0000",
                    "lastModifiedDate": "2017-10-24T07:37:23+0000",
                    "name": "Bank #",
                    "type": "TRANSACTION_CHANNEL_INFO",
                    "dataType": "STRING",
                    "valueLength": "SHORT",
                    "isDefault": false,
                    "isRequired": false,
                    "description": "",
                    "customFieldSet": {
                        "encodedKey": "8a85898b548f54af01548f6a20e01341",
                        "id": "Transaction_Details_Transactions",
                        "name": "Transaction Details",
                        "notes": "Captures default transaction custom fields",
                        "createdDate": "2016-05-08T08:09:38+0000",
                        "indexInList": 0,
                        "type": "TRANSACTION_CHANNEL_INFO",
                        "usage": "SINGLE"
                    },
                    "indexInList": 1,
                    "state": "NORMAL",
                    "customFieldSelectionOptions": [],
                    "viewRights": {
                        "encodedKey": "8a85898b548f54af01548f6a210f135d",
                        "isAccessibleByAllUsers": true,
                        "roles": []
                    },
                    "editRights": {
                        "encodedKey": "8a85898b548f54af01548f6a210f135f",
                        "isAccessibleByAllUsers": true,
                        "roles": []
                    },
                    "unique": false,
                    "values": [],
                    "amounts": {}
                },
                "value": "bank nr",
                "indexInList": -1,
                "customFieldID": "BANK_NUMBER_TRANSACTION_CHANNEL_",
                "customFieldSetGroupIndex": -1
            },
            {
                "encodedKey": "8a858f145f489bdb015f4d70a3cd07c3",
                "parentKey": "8a858f145f489bdb015f4d6f251e071f",
                "customFieldKey": "8a858f145f489bdb015f49df74191ce3",
                "customField": {
                    "encodedKey": "8a858f145f489bdb015f49df74191ce3",
                    "id": "TTFC1",
                    "creationDate": "2017-10-23T15:36:23+0000",
                    "lastModifiedDate": "2017-10-23T15:36:59+0000",
                    "name": "TestTransactionCustomfield1",
                    "type": "TRANSACTION_CHANNEL_INFO",
                    "dataType": "STRING",
                    "valueLength": "SHORT",
                    "isDefault": false,
                    "isRequired": false,
                    "description": "",
                    "customFieldSet": {
                        "encodedKey": "8a858f145f489bdb015f49df74191ce2",
                        "id": "TETF",
                        "name": "Test Extra Transaction Fields",
                        "notes": "",
                        "createdDate": "2017-10-23T15:36:10+0000",
                        "indexInList": 1,
                        "type": "TRANSACTION_CHANNEL_INFO",
                        "usage": "SINGLE"
                    },
                    "indexInList": 7,
                    "state": "NORMAL",
                    "customFieldSelectionOptions": [],
                    "viewRights": {
                        "encodedKey": "8a858f145f489bdb015f49df74191ce4",
                        "isAccessibleByAllUsers": false,
                        "roles": []
                    },
                    "editRights": {
                        "encodedKey": "8a858f145f489bdb015f49e0b02c1d3a",
                        "isAccessibleByAllUsers": false,
                        "roles": []
                    },
                    "unique": false,
                    "values": [],
                    "amounts": {}
                },
                "value": "custom field one",
                "indexInList": -1,
                "customFieldID": "TTFC1",
                "customFieldSetGroupIndex": -1
            }
        ]
    },
    {
        "encodedKey": "8a858f145f489bdb015f4d6f251e071e",
        "transactionId": 5414,
        "parentAccountKey": "8a858f145f489bdb015f49e40a221e1f",
        "type": "INTEREST_APPLIED",
        "creationDate": "2017-10-24T08:11:04+0000",
        "entryDate": "2017-09-12T00:00:00+0000",
        "amount": "287.67",
        "principalPaid": "0",
        "interestPaid": "287.67",
        "deferredInterestAmount": "0",
        "feesPaid": "0",
        "penaltyPaid": "0",
        "taxOnInterestPaid": "0",
        "taxOnFeesAmount": "0",
        "taxOnPenaltyAmount": "0",
        "deferredTaxOnInterestAmount": "0",
        "advancePosition": "0",
        "arrearsPosition": "-6570",
        "expectedPrincipalRedraw": "0",
        "balance": "10287.67",
        "redrawBalance": "0",
        "principalBalance": "10000",
        "userKey": "8a8589ac53a4303e0153a7c0fe094ffd",
        "loanPredefinedFeeAmounts": [],
        "productTypeKey": "8a858ee25b34d796015b38b926987bae",
        "customInformation": []
    },
    {
        "encodedKey": "8a858f145f489bdb015f4d6f10470706",
        "transactionId": 5413,
        "parentAccountKey": "8a858f145f489bdb015f49e40a221e1f",
        "type": "DISBURSEMENT",
        "comment": "",
        "creationDate": "2017-10-24T08:10:50+0000",
        "entryDate": "2017-07-04T00:00:00+0000",
        "amount": "10000",
        "principalPaid": "10000",
        "interestPaid": "0",
        "deferredInterestAmount": "0",
        "feesPaid": "0",
        "penaltyPaid": "0",
        "taxOnInterestPaid": "0",
        "taxOnFeesAmount": "0",
        "taxOnPenaltyAmount": "0",
        "deferredTaxOnInterestAmount": "0",
        "advancePosition": "0",
        "arrearsPosition": "0",
        "expectedPrincipalRedraw": "0",
        "balance": "10000",
        "redrawBalance": "0",
        "principalBalance": "10000",
        "details": {
            "encodedKey": "8a858f145f489bdb015f4d6f10470707",
            "transactionChannelKey": "8a85895b50eb44220150eb4452a0000a",
            "internalTransfer": false,
            "transactionChannel": {
                "encodedKey": "8a85895b50eb44220150eb4452a0000a",
                "id": "cash",
                "name": "Cash",
                "creationDate": "2015-11-09T08:02:14+0000",
                "index": 0,
                "activated": true,
                "savingsConstraintsUsage": "UNCONSTRAINED_USAGE",
                "savingsConstraints": {
                    "encodedKey": "8a858f9c5ac133f9015ac1345f780061",
                    "filterConstraints": []
                },
                "usageRights": {
                    "encodedKey": "8a85895b50eb44220150eb4452a1000b",
                    "isAccessibleByAllUsers": true,
                    "roles": []
                }
            }
        },
        "userKey": "8a8589ac53a4303e0153a7c0fe094ffd",
        "loanPredefinedFeeAmounts": [],
        "productTypeKey": "8a858ee25b34d796015b38b926987bae",
        "customInformation": []
    }
]

POST Transactions

Allows for posting transaction to the loan account. Transactions may affect the balance (such as a repayment or disbursal) or just the state of the account (such as approving it).
type Type of the transaction. Required.
  • REPAYMENT - Make a repayment.
  • REPAYMENT_ADJUSTMENT - Reversing a transaction with the type REPAYMENT.
  • PAYMENT_MADE - Make a payment which will be stored at loan account level as a Redrawable balance.
  • PAYMENT_MADE_ADJUSTMENT - Reversing a transaction with the type PAYMENT_MADE.
  • DISBURSEMENT - Disburse the loan account.
  • DISBURSEMENT_ADJUSTMENT - Undo the last disbursement.
  • APPROVAL - Change the account state to approve.
  • UNDO_APPROVAL - Undo the account state from approved to pending approval.
  • FEE - Apply fee.
  • FEE_ADJUSTMENT - Reversing a transaction with the type FEE.
  • INTEREST_APPLIED - Manually apply interest.
  • INTEREST_APPLIED_ADJUSTMENT - Reversing a transaction with the type INTEREST_APPLIED.
  • INTEREST_RATE_CHANGED - Apply an interest rate change transaction.
  • WITHDRAW - Change the account state to withdrawn.
  • UNDO_WITHDRAWN - Undo the account state from WITHDRAWN
  • REJECT - Change the account state to rejected.
  • UNDO_REJECT - Undo the account state from REJECTED
  • LOCK - Change the account state to locked.
  • UNLOCK - Unlock the account.
  • PENDING_APPROVAL - Transitioning the state of the account to Pending Approval.
  • PENALTY_ADJUSTMENT - Reversing a transaction with the type PENALTY_APPLIED.
  • WRITE_OFF - Writing off the loan.
  • CLOSE - Close the loan account with all obligations met. Rquires the account to have 0 principal balance and to be Active(or In Arrears) state.
  • UNDO_CLOSE - Undo the account state from CLOSE (all obligations met)
amount The amount in the local currency of the transaction. Required for balance-changing transactions.
date The date of the transaction - used for backdating transactions. Can have the following date formats:
  • yyyy-MM-dd, date format, example: 2017-01-15
  • yyyy-MM-dd'T'HH:mm:ss UTC date time format, example: 2017-01-15T00:01:59
  • yyyy-MM-dd'T'HH:mm:ss'Z' specified with timezone, example: 2017-01-15T00:01:59+01:00
Please note that we do not support backdating WRITE_OFF transactions and the date is ignored when creating a WRITE_OFF transaction call.
repayment The repayment number to use (when applying a fee to a repayment, for example).
firstRepaymentDate Specifying the date of the first repayment for the loan account.
method The transaction channel id/key of method use for the transaction. If none provided the default one will be used
identifier Unique optional identifier. There can't be more than one transaction (loan or savings) posted with the same identifier.
rate The rate to set (It can be any rate: interest rate, penalty rate, interest spread, etc)
notes Optional notes to record for this transaction.
originalTransactionId The ID or encodedKey used for the original PENALTY_APPLIED transaction. Used when adjusting a penalty applied.
fees The fees that should be applied with the disbursement transaction.Optional - if not specified the required fees from the product will be applied.
Fees parameters:
encodedKey The encodedKey of the fee. Required.
amount The fee amount. Must be specified for flat fees that don' have the amount specified in product. Should not be specified for percentage fees or for fees that are having the amount defined in the product
repayment The repayment number to apply the fee on. Can be specified only for fixed loans. Should be less than the number of installments. If it's specified, allocate the fee on the specified repayment. Otherwise, allocate it on the first repayment

Parameters for Custom Fields

Available only for transactions which accepts channels: DISBURSEMENT and REPAYMENT. Provided fields must be available for the given channel and required validation is done based on field settings.
customFieldID The custom field Id. Required.
value The custom field Value. Required.

URL
//approve loan account using url-encoded call(id is used for account identification)
POST "type=APPROVAL" /api/loans/67/transactions/

//undo approve loan account using url-encoded call(id is used for account identification)
POST "type=UNDO_APPROVAL" /api/loans/67/transactions/

//change status to "pending approval"
POST "type=PENDING_APPROVAL" /api/loans/67/transactions/ ​

//disburse a loan account with a few notes backdated to 2012-10-04 and repaymetns starting in four days
POST "type=DISBURSEMENT&date=2012-10-04T11:03:31&firstRepaymentDate=2012-10-08&notes=using transactions" /api/loans/KHGJ593/transactions

//post a repayment of 10 to account KHGJ593
POST "type=REPAYMENT&amount=10" /api/loans/KHGJ593/transactions

//post a repayment of 10 to account KHGJ593 with timestamp specified
POST "type=REPAYMENT&amount=10&date=2012-10-04T11:03:31" /api/loans/KHGJ593/transactions

//post a repayment of 10 to account KHGJ593 with timestamp and timezone(UTC+1) specified
POST "type=REPAYMENT&amount=10&date=2012-10-04T11:03:31+0100" /api/loans/KHGJ593/transactions

//post a repayment of 10 to account KHGJ593 and recored it using transaction channel with given encoded key
POST "type=REPAYMENT&amount=10&method=40288a134744a69a014748589b7e0005" /api/loans/KHGJ593/transactions

//post a repayment of 5 to account KHGJ593 and recored it using transaction channel with CASH id
POST "type=REPAYMENT&amount=5&date=2011-09-12&method=CASH" /api/loans/KHGJ593/transactions

//apply fee (id is used for account identification)
POST "repayment=1&amount=10&notes=Hello" /api/loans/DUVI706/fees

//apply a fee of 20 to a dynamic account
POST  "type=FEE&amount=20" /api/loans/KHGJ593/transactions

//apply a fee of 20 to due on repayment #5 for a fixed account
POST  "type=FEE&amount=20&repayment=5" /api/loans/THGJ595/transactions

//close loan account using url-encoded call (id is used for account identification)
POST "type=WITHDRAW" /api/loans/67/transactions

//close loan account(all obligations met) using url-encoded call (id is used for account identification)
POST "type=CLOSE" /api/loans/67/transactions

//close loan account using url-encoded call (id is used for account identification)
POST "type=REJECT" /api/loans/67/transactions

//apply interest on 2011-09-01 (date parameter required, id is used for account identification)
POST "type=INTEREST_APPLIED&date=2011-09-01&notes=Some notes" /api/loans/KHGJ593/transactions

//Reverse the INTEREST_APPLIED transaction with the id 6 for the loan account with the id 10
POST "type=INTEREST_APPLIED_ADJUSTMENT&notes=reason&originalTransactionId=6" /api/loans/10/transactions/

//lock loan account using url-encoded call (id is used for account identification)
POST "type=LOCK" /api/loans/67/transactions

//unlock loan account using url-encoded call (id is used for account identification)
POST "type=UNLOCK" /api/loans/67/transactions

//undo close (all obligations met) loan account using url-encoded call (id is used for account identification)
POST "type=UNDO_CLOSE" /api/loans/67/transactions

//undo withdrawn loan account using url-encoded call (id is used for account identification)
POST "type=UNDO_WITHDRAWN" /api/loans/67/transactions

//undo reject loan account using url-encoded call (id is used for account identification)
POST "type=UNDO_REJECT" /api/loans/67/transactions

JSON

//approve loan account using JSON call(encodedKey is used for account identification)
POST '{ "type": "APPROVAL"}' /api/loans/40288a1341273dad01412add591b039f/transactions/

//change status to "pending approval"
POST '{ "type": "PENDING_APPROVAL" }'

// write off a loan account
POST '{"type": "WRITE_OFF", "notes": "Account written off"}' /api/loans/HGBUI93/transactions

// close a loan account
POST '{"type": "CLOSE", "notes": "Account closed using API call"}' /api/loans/HGBUI93/transactions

// approve loan account using the JSON call (encodedKey is used for account identification)
POST '{ "type": "UNDO_APPROVAL"}' /api/loans/40288a1341273dad01412add591b039f/transactions/ 

//disburse a loan account with a few notes backdated to 2012-10-04 and repaymetns starting in four days
POST '{
    "type": "DISBURSEMENT",
    "date": "2012-10-04T11:03:31",
    "firstRepaymentDate": "2012-10-08",
    "notes": "using transactions"
}' /api/loans/40288a1341273dad01412add591b039f/transactions/ 

//disburse a loan account with specified fees
POST '{
   "type":"DISBURSEMENT",
   "date":"2015-05-05",
   "firstRepaymentDate":"2015-05-05",
   "method":"cash",
   "fees":[
      {
         "encodedKey":"8a80816752715c34015278bd4792084b"
      },
      {
         "encodedKey":"8a808167529f477a0152a1d3fe390336",
         "amount":"11"
      },
      {
         "encodedKey":"8a80816752a2e3d10152a2e8498c0017"
      }
   ],
   "notes":"notes"
}' /api/loans/40288a1341273dad01412add591b039f/transactions/


//post a repayment of 10 to account KHGJ593
POST '{
    "type": "REPAYMENT",
    "amount": "10"
}' /api/loans/KHGJ593/transactions

//post a repayment of 10 to account KHGJ593 and recored it using transaction channel with given encoded key
POST '{
    "type": "REPAYMENT",
    "amount": "10",
    "method": "40288a134744a69a014748589b7e0005"
}' /api/loans/KHGJ593/transactions

//post a backdated repayment of 10 to account KHGJ593 and record it using transaction channel with RECEIPT id
POST '{
    "type": "REPAYMENT",
    "amount": "10",
    "date": "2011-09-12",
    "method": "RECEIPT",
    "customInformation": [
      {
          "value":"recepit number",
          "customFieldID":"RECEPIT_NUMBER_TRANSACTION_CHANN"
       },
       {
          "value":"unique identifier for recepit",
          "customFieldID":"IDENTIFIER_TRANSACTION_CHANNEL_I"
       }

    ]
}' /api/loans/KHGJ593/transactions

//post a repayment of 5 to account KHGJ593 and recored it using transaction channel with CASH id
POST '{
    "type": "REPAYMENT",
    "amount": "5",
    "date": "2011-09-12",
    "method": "CASH"
}' /api/loans/KHGJ593/transactions

//apply a fee (id is used for account identification)
POST '{
    "repayment": "10",
    "amount": "1",
    "notes": "Late fees"
}' /api/loans/DUVI706/fees

//apply an arbitrary fee of 20 to a dynamic account
POST  '{
    "type": "FEE",
    "amount": "20"
}' /api/loans/KHGJ593/transactions

//apply an arbitrary fee of 20 to due on repayment #5 for a fixed account
POST  '{
    "type": "FEE",
    "amount": "20",
    "repayment": "5"
}' /api/loans/THGJ595/transactions

//apply a predefined fee on repayment #5 for loan account with id KHGJ593
POST '{  
   "type":"FEE",
   "fees":[  
      {  
         "encodedKey":"ff808081533b9be301533ba7aa5d0378"
      }
   ],
   "repayment": "5",
   "notes":"test"
}' /api/loans/KHGJ593/transactions

//apply a custom predefined fee on repayment #5 for loan account with id KHGJ593
POST '{  
   "type":"FEE",
   "fees":[  
      {  
         "encodedKey":"ff808081533b9be301533ba7aa5d0378",
         "amount":"10"
      }
   ],
   "repayment": "5",
   "notes":"test"
}' /api/loans/KHGJ593/transactions

//close loan account by withdrawal (id is used for account identification)
POST '{"type": "WITHDRAW"}' /api/loans/67/transactions/

//close loan account by rejection (id is used for account identification)
POST '{"type":"REJECT"}' /api/loans/67/transactions/

//apply interest on 2011-09-01 (date parameter required, id is used for account identification)
POST '{
    "type": "INTEREST_APPLIED",
    "date": "2011-09-01",
    "notes": "Interest on account"
}' /api/loans/KHGJ593/transactions

//lock loan account (id is used for account identification)
POST '{"type":"LOCK"}' /api/loans/67/transactions/

//unlock loan account using url-encoded call (id is used for account identification)
POST '{"type":"UNLOCK"}' /api/loans/67/transactions/

// activate a loan with a predefined fee (amount or percentage)
POST '{
    "type": "DISBURSEMENT",
    "date": "2015-05-06",
    "firstRepaymentDate": "2015-06-07",
    "notes": "some notes",
    "fees": [
        {
        "encodedKey": "8a38b7f64d2685a3014d283817ab05b9"
        }
    ]
}' /api/loans/99/transactions

// activate a loan with a manual fee (amount or percentage)
POST '{
    "type": "DISBURSEMENT",
    "date": "2015-05-06",
    "firstRepaymentDate": "2015-06-07",
    "notes": "some notes",
    "fees": [
        {
        "encodedKey": "8a38b7f64d2685a3014d283817ab05b9",
        "amount": "45.50"
        }
    ]
}' /api/loans/YT97L1/transactions

// add a repayment transaction with custom fields for the loan account with id YT97L1
POST '{
   "type":"REPAYMENT",
   "amount":"200",
   "method":"cash",
   "customInformation": [
        {
            "value":"3333se",
            "customFieldID":"transaction_cf"
        }
    ]
}' /api/loans/YT97L1/transactions

// undo a repayment transaction for the loan account with id YT97L1
POST '{
    "type":"REPAYMENT_ADJUSTMENT",
    "originalTransactionId": "9",
    "notes": "cancel incorrect repayment"
}' /api/loans/YT97L1/transactions

// undo a payment made transaction for the loan account with id YT97L1
POST '{
    "type":"PAYMENT_MADE_ADJUSTMENT",
    "originalTransactionId": "9",
    "notes": "cancel incorrect payment made"
}' /api/loans/YT97L1/transactions


// undo a penalty applied transaction for the loan account with id YT97L1
POST '{
    "type":"PENALTY_ADJUSTMENT",
    "originalTransactionId": "7",
    "notes": "cancel penalty application"
}' /api/loans/YT97L1/transactions

// undo a fee applied transaction for the loan account with id YT97L1
POST '{
    "type":"FEE_ADJUSTMENT",
    "originalTransactionId": "7",
    "notes": "cancel penalty application"
}' /api/loans/YT97L1/transactions

// undo close (all obligations met) loan account using the JSON call (encodedKey is used for account identification)
POST '{ "type": "UNDO_CLOSE"}' /api/loans/40288a1341273dad01412add591b039f/transactions/ 

// undo withdrawn loan account using the JSON call (encodedKey is used for account identification)
POST '{ "type": "UNDO_WITHDRAWN"}' /api/loans/40288a1341273dad01412add591b039f/transactions/ 

// undo reject loan account using the JSON call (encodedKey is used for account identification)
POST '{ "type": "UNDO_REJECT"}' /api/loans/40288a1341273dad01412add591b039f/transactions/ 

// apply an interest rate changed transaction for the active revolving credit loan account with id YT97L1
POST '{
   "type":"INTEREST_RATE_CHANGED",
   "date" : "2016-08-27",
   "rate": "10",
   "notes" : "notes via API"
}' /api/loans/YT97L1/transactions

Note

For transfer only these parameters are considered: toLoanAccount, toSavingsAccount, amount,notes.

Samples responses:

A 201 code is returned along with created transaction. The transaction id is also stored in the Location header.
{
    "encodedKey": "8a858efb5f487eb5015f4d508fee6b88",
    "transactionId": 5417,
    "parentAccountKey": "8a858f145f489bdb015f49e40a221e1f",
    "type": "REPAYMENT",
    "creationDate": "2017-10-24T08:20:54+0000",
    "entryDate": "2017-10-24T08:20:53+0000",
    "amount": "200",
    "principalPaid": "128.65",
    "interestPaid": "71.35",
    "deferredInterestAmount": "0",
    "feesPaid": "0",
    "penaltyPaid": "0",
    "taxOnInterestPaid": "0",
    "taxOnFeesAmount": "0",
    "taxOnPenaltyAmount": "0",
    "deferredTaxOnInterestAmount": "0",
    "advancePosition": "0",
    "arrearsPosition": "-5147.03",
    "expectedPrincipalRedraw": "0",
    "balance": "5147.03",
    "redrawBalance": "0",
    "principalBalance": "5030.16",
    "details": {
        "encodedKey": "8a858efb5f487eb5015f4d785abe00c9",
        "transactionChannelKey": "8a85895b50eb44220150eb4452a0000a",
        "internalTransfer": false,
        "transactionChannel": {
            "encodedKey": "8a85895b50eb44220150eb4452a0000a",
            "id": "cash",
            "name": "Cash",
            "creationDate": "2015-11-09T08:02:14+0000",
            "index": 0,
            "activated": true,
            "savingsConstraintsUsage": "UNCONSTRAINED_USAGE",
            "savingsConstraints": {
                "encodedKey": "8a858f9c5ac133f9015ac1345f780061",
                "filterConstraints": []
            },
            "usageRights": {
                "encodedKey": "8a85895b50eb44220150eb4452a1000b",
                "isAccessibleByAllUsers": true,
                "roles": []
            }
        }
    },
    "userKey": "8a85895b50eb44220150eb442cdb0004",
    "loanPredefinedFeeAmounts": [],
    "productTypeKey": "8a858ee25b34d796015b38b926987bae"
}
Sample response after loan activation with fees
{
   "encodedKey":"8a38b7f64d2685a3014d2856efdb0766",
   "transactionId":2657,
   "parentAccountKey":"8a38b7f64d2685a3014d2839f62705d1",
   "type":"DISBURSEMENT",
   "comment":"some notes",
   "creationDate":"2015-05-06T08:28:15+0000",
   "entryDate":"2015-05-06T00:00:00+0000",
   "amount":"980",
   "principalPaid":"1127",
   "interestPaid":"0",
   "deferredInterestAmount":"0",
   "feesPaid":"147",
   "penaltyPaid":"0",
   "taxOnInterestPaid":"0",
   "taxOnFeesAmount":"0",
   "taxOnPenaltyAmount":"0",
   "deferredTaxOnInterestAmount":"0",
   "balance":"1127",
   "details":{
      "encodedKey":"8a38b7f64d2685a3014d2856efdc0767",
      "transactionChannel":{
         "encodedKey":"8a8080ba4c8f39f6014c8f3a246d000a",
         "channelFields":[

         ],
         "id":"cash",
         "name":"Cash",
         "creationDate":"2015-04-06T14:54:54+0000",
         "index":0,
         "activated":true
      },
      "internalTransfer":false
   },
   "userKey":"8a8080ba4c8f39f6014c8f3a028a0004",
   "branchKey":"8a38b7f64c8f33e3014c8f4300ee0008",
   "centreKey":"8a38b7f64c8f33e3014c8f430126000a",
   "loanPredefinedFeeAmounts":[
      {
         "encodedKey":"8a38b7f64d2685a3014d2856f06d0774",
         "amount":"7",
         "taxAmount":"0",
         "fee":{
            "encodedKey":"8a38b7f64d2685a3014d283817ab05b9",
            "name":"Required With Amount 1",
            "amount":"7",
            "amountCalculationMethod":"FLAT",
            "trigger":"DISBURSEMENT",
            "feeApplication":"REQUIRED",
            "active":true,
            "creationDate":"2015-05-06T08:26:49+0000",
            "amortizationProfile":"NONE",
            "feeProductRules":[

            ]
         },
         "amortizedAmounts":[

         ]
      },
      {
         "encodedKey":"8a38b7f64d2685a3014d2856f0700775",
         "amount":"13",
         "taxAmount":"0",
         "fee":{
            "encodedKey":"8a38b7f64d2685a3014d283817ac05ba",
            "name":"Required without Amount 1",
            "amountCalculationMethod":"FLAT",
            "trigger":"DISBURSEMENT",
            "feeApplication":"REQUIRED",
            "active":true,
            "creationDate":"2015-05-06T08:26:49+0000",
            "amortizationProfile":"NONE",
            "feeProductRules":[

            ]
         },
         "amortizedAmounts":[

         ]
      },
      {
         "encodedKey":"8a38b7f64d2685a3014d2856f0730776",
         "amount":"110",
         "taxAmount":"0",
         "fee":{
            "encodedKey":"8a38b7f64d2685a3014d283817ae05bb",
            "name":"Optional With Amount 1",
            "percentageAmount":"11",
            "amountCalculationMethod":"LOAN_AMOUNT_PERCENTAGE",
            "trigger":"CAPITALIZED_DISBURSEMENT",
            "feeApplication":"OPTIONAL",
            "active":true,
            "creationDate":"2015-05-06T08:26:49+0000",
            "amortizationProfile":"NONE",
            "feeProductRules":[

            ]
         },
         "amortizedAmounts":[

         ]
      },
      {
         "encodedKey":"8a38b7f64d2685a3014d2999f0760777",
         "amount":"17",
         "taxAmount":"0",
         "fee":{
            "encodedKey":"8a38b7f64d2685a3014d283817d005bc",
            "name":"Optional Without Amount 2",
            "amountCalculationMethod":"FLAT",
            "trigger":"CAPITALISED_DISBURSEMENT",
            "feeApplication":"OPTIONAL",
            "active":true,
            "creationDate":"2015-05-06T08:26:49+0000",
            "amortizationProfile":"NONE",
            "feeProductRules":[

            ]
         },
         "amortizedAmounts":[

         ]
      }
   ],
   "productTypeKey":"8a38b7f64d2685a3014d283817a405b7"
}

PATCH Loan Transaction Custom Field Values

Custom field values for a loan transaction can be added/edited using PATCH method. The new custom field value is validated based on the custom field type defined in the Custom Field.

Parameters for PATCH custom fields method for loan transaction

value New value for the custom field. Required.

Usage Example

// Update the custom field value to "10" based on the loan id(abc123), transaction id(100) and on the custom field id(members)
PATCH '{ "value": "10" }' /api/loans/abc123/transactions/100/custominformation/members

// Update the custom field value to "2012-10-10" based on the loan key(40288a134887e7e9014887f0eb720003), transaction key(8a27a878491d417601491d48203100d8) and on the custom field key(8a27a878491d417601491d48203100d9)
PATCH '{ "value": "2012-10-10" }' /api/loans/40288a134887e7e9014887f0eb720003/transactions/8a27a878491d417601491d48203100d8/custominformation/8a27a878491d417601491d48203100d9

// Update(add / edit) multiple grouped and / or standard fields from different groups for the loan transaction with the id 100 from the account with the id abc123.For a grouped custom field, if customFieldSetGroupIndex is present, value is updated, if is missing, a new group is created. 
PATCH '{
  "customInformation": [
    {
      "customFieldID" : "IBAN",
      "value" : "DE123456789121243546783"
    },
    {
      "customFieldID" : "BIC",
      "value" : "1234566441",
      "customFieldSetGroupIndex" : "0"
    },
    {
      "customFieldID" : "BANK_ACCOUNT_TYPE",
      "value" : "Current Account",
      "customFieldSetGroupIndex" : "1"
    }
  ]
}' /api/loans/abc123/transactions/100/custominformation

Response

A 200 Response is returned if the loan transaction custom field value was successfully created/updated.

GET Loan Transaction Custom Field Values

Allows retrieving a custom field value for a given loan transaction directly by the ID/key of the transaction and the ID/key of the custom field.

Usage Example

//get the custom field value of the custom field with the ID "family_members" for the loan transaction having ID "abc123" posted on the loan account "account11"
GET /api/loans/account11/transactions/abc123/custominformation/family_members
//get the custom field value of the custom field with the encoded key "8a8080a254a98efe0154a99ad9d301be" for the loan transaction having key "8a8080a254a98efe0154a99ad8c400f6" posted on the loan account "8a8080a254a98efe0154a99ad9d301be"
GET /api/loans/8a8080a254a98efe0154a99ad9d301be/transactions/8a8080a254a98efe0154a99ad8c400f6/custominformation/8a8080a254a98efe0154a99ad86f00ef

Response

//response for a single custom field
[
  {
    "encodedKey": "8a8080a254a98efe0154a99ad9d301be",
    "parentKey": "8a8080a254a98efe0154a99ad8c400f6",
    "customFieldKey": "8a8080a254a98efe0154a99ad86f00ef",
    "customField": {
      "encodedKey": "8a8080a254a98efe0154a99ad86f00ef",
      "id": "Position_Clients",
      "creationDate": "2016-05-18T14:39:13+0000",
      "lastModifiedDate": "2016-05-18T14:40:19+0000",
      "name": "Position",
      "type": "TRANSACTION_CHANNEL_INFO",
      "dataType": "STRING",
      "valueLength": "SHORT",
      "isDefault": false,
      "isRequired": false,
      "description": "",
      "customFieldSet": {
        "encodedKey": "8a8080a254a98efe0154a99ad84200ee",
        "name": "Custom Fields",
        "createdDate": "2016-05-13T10:12:58+0000",
        "indexInList": 0,
        "type": "TRANSACTION_CHANNEL_INFO",
        "usage": "SINGLE"
      },
      "indexInList": 3,
      "state": "NORMAL",
      "customFieldSelectionOptions": [],
      "viewRights": {
        "encodedKey": "8a8080a254a98efe0154a99ad87200f0",
        "isAccessibleByAllUsers": false,
        "roles": []
      },
      "editRights": {
        "encodedKey": "8a8080a254a98efe0154a99ad87300f1",
        "isAccessibleByAllUsers": false,
        "roles": []
      },
      "unique": false,
      "values": [],
      "amounts": {}
    },
    "value": "Promotions manager",
    "indexInList": 0,
    "customFieldID": "Position_Clients",
    "customFieldSetGroupIndex": -1
  }
]
//response for a grouped custom field
[
  {
    "encodedKey": "8a8080a254c4397d0154c450f88d0034",
    "parentKey": "8a8080a254a98efe0154a99ad8c800fa",
    "customFieldKey": "8a8080a254c4397d0154c45093f4002a",
    "customField": {
      "encodedKey": "8a8080a254c4397d0154c45093f4002a",
      "id": "ccc1",
      "creationDate": "2016-05-18T14:41:36+0000",
      "lastModifiedDate": "2016-05-18T14:41:36+0000",
      "name": "cccc1",
      "type": "TRANSACTION_CHANNEL_INFO",
      "dataType": "STRING",
      "valueLength": "SHORT",
      "isDefault": false,
      "isRequired": false,
      "description": "",
      "customFieldSet": {
        "encodedKey": "8a8080a254c4397d0154c450633e0029",
        "name": "groupedcfs",
        "notes": "",
        "createdDate": "2016-05-18T14:41:23+0000",
        "indexInList": 2,
        "type": "TRANSACTION_CHANNEL_INFO",
        "usage": "GROUPED"
      },
      "indexInList": 14,
      "state": "NORMAL",
      "customFieldSelectionOptions": [],
      "viewRights": {
        "encodedKey": "8a8080a254c4397d0154c45093f4002b",
        "isAccessibleByAllUsers": false,
        "roles": []
      },
      "editRights": {
        "encodedKey": "8a8080a254c4397d0154c45093f4002c",
        "isAccessibleByAllUsers": false,
        "roles": []
      },
      "unique": false,
      "values": [],
      "amounts": {}
    },
    "value": "111",
    "indexInList": 0,
    "customFieldID": "ccc1",
    "customFieldSetGroupIndex": 0
  },
  {
    "encodedKey": "8a8080a254c4397d0154c4545f410037",
    "parentKey": "8a8080a254a98efe0154a99ad8c800fa",
    "customFieldKey": "8a8080a254c4397d0154c45093f4002a",
    "customField": {
      "encodedKey": "8a8080a254c4397d0154c45093f4002a",
      "id": "ccc1",
      "creationDate": "2016-05-18T14:41:36+0000",
      "lastModifiedDate": "2016-05-18T14:41:36+0000",
      "name": "cccc1",
      "type": "TRANSACTION_CHANNEL_INFO",
      "dataType": "STRING",
      "valueLength": "SHORT",
      "isDefault": false,
      "isRequired": false,
      "description": "",
      "customFieldSet": {
        "encodedKey": "8a8080a254c4397d0154c450633e0029",
        "name": "groupedcfs",
        "notes": "",
        "createdDate": "2016-05-18T14:41:23+0000",
        "indexInList": 2,
        "type": "TRANSACTION_CHANNEL_INFO",
        "usage": "GROUPED"
      },
      "indexInList": 14,
      "state": "NORMAL",
      "customFieldSelectionOptions": [],
      "viewRights": {
        "encodedKey": "8a8080a254c4397d0154c45093f4002b",
        "isAccessibleByAllUsers": false,
        "roles": []
      },
      "editRights": {
        "encodedKey": "8a8080a254c4397d0154c45093f4002c",
        "isAccessibleByAllUsers": false,
        "roles": []
      },
      "unique": false,
      "values": [],
      "amounts": {}
    },
    "value": "222",
    "indexInList": 2,
    "customFieldID": "ccc1",
    "customFieldSetGroupIndex": 1
  },
  {
    "encodedKey": "8a8080a254c4397d0154c4545f410039",
    "parentKey": "8a8080a254a98efe0154a99ad8c800fa",
    "customFieldKey": "8a8080a254c4397d0154c45093f4002a",
    "customField": {
      "encodedKey": "8a8080a254c4397d0154c45093f4002a",
      "id": "ccc1",
      "creationDate": "2016-05-18T14:41:36+0000",
      "lastModifiedDate": "2016-05-18T14:41:36+0000",
      "name": "cccc1",
      "type": "TRANSACTION_CHANNEL_INFO",
      "dataType": "STRING",
      "valueLength": "SHORT",
      "isDefault": false,
      "isRequired": false,
      "description": "",
      "customFieldSet": {
        "encodedKey": "8a8080a254c4397d0154c450633e0029",
        "name": "groupedcfs",
        "notes": "",
        "createdDate": "2016-05-18T14:41:23+0000",
        "indexInList": 2,
        "type": "TRANSACTION_CHANNEL_INFO",
        "usage": "GROUPED"
      },
      "indexInList": 14,
      "state": "NORMAL",
      "customFieldSelectionOptions": [],
      "viewRights": {
        "encodedKey": "8a8080a254c4397d0154c45093f4002b",
        "isAccessibleByAllUsers": false,
        "roles": []
      },
      "editRights": {
        "encodedKey": "8a8080a254c4397d0154c45093f4002c",
        "isAccessibleByAllUsers": false,
        "roles": []
      },
      "unique": false,
      "values": [],
      "amounts": {}
    },
    "value": "333",
    "indexInList": 4,
    "customFieldID": "ccc1",
    "customFieldSetGroupIndex": 2
  }
]

DELETE Loan Transaction Custom Field Values

Specific custom field values for a loan transaction can be deleted based on loan account id, transaction id and custom field id.

Usage Example

// DELETE the custom field value based on the loan id(abc123), transaction id (100) and on the custom field id(members)
DELETE /api/loans/abc123/transactions/100/custominformation/members

// DELETE the custom field value based on the loan key(40288a134887e7e9014887f0eb720003), transaction key(8a27a878491d417601491d48203100d8) and on the custom field key(8a27a878491d417601491d48203100d9)
DELETE /api/loans/40288a134887e7e9014887f0eb720003/transactions/8a27a878491d417601491d48203100d8/custominformation/8a27a878491d417601491d48203100d9

Response

A 200 Response is returned if the loan transaction custom field value was successfully deleted.

POST Search

Allows to retrieve transactions using dynamic custom filters.

Parameters

Parameter Value
filterConstraints A JSON array of constraints.
filterSelection The field on which the constraint will be applied. Available transaction filter selections can be found bellow.
filterElement The constraint operator. Available filter elements can be found bellow.
value The constraint value. Required for filter elements with one or two values.
secondValue The constraint second value. Required for filter elements with two values.
dataItemType The entity where the field on which to apply the constraint is located. If the field is located in the same entity with the entity being searched, this field is optional.

Available transaction filter values

Filter Selection Parameter Data Type
PARENT_ACCOUNT_KEY KEY
PRODUCT_TYPE_KEY KEY
USER_KEY KEY
BRANCH_KEY KEY
CENTRE_KEY KEY
PARENT_ACCOUNT_HOLDER_KEY KEY
CURRENCY_CODE KEY
PRODUCT_ID STRING
WAS_REVERSED BOOLEAN
TYPE_IS_REVERSAL BOOLEAN
INTERNAL_TRANSFER BOOLEAN
TRANSACTION_CHANNEL_KEY KEY
ENCODED_KEY KEY
TRANSACTION_ID LONG
TILL_ID STRING
ENTRY_DATE DATE
TRANSACTION_DATE DATE_UTC
EVENT ENUM
AMOUNT MONEY
ADVANCE_POSITION MONEY
ARREARS_POSITION MONEY
EXPECTED_PRINCIPAL_REDRAW MONEY
ORIGINAL_AMOUNT MONEY
ORIGINAL_AMOUNT_CURRENCY_CODE STRING
BALANCE MONEY
TOTAL_BALANCE MONEY
PRINCIPAL_BALANCE MONEY
REDRAW_BALANCE MONEY
PRINCIPAL_PAID MONEY
INTEREST_PAID MONEY
DEFERRED_INTEREST MONEY
FEES_PAID MONEY
FEE_KEY KEY
FEE_TYPE ENUM
PENALTY_PAID MONEY
BRANCH STRING
CENTRE STRING
PARENT_ACCOUNT STRING
PARENT_ACCOUNT_ID STRING
PARENT_ACCOUNT_HOLDER STRING
PARENT_ACCOUNT_HOLDER_ID STRING
TAX_RATE BIG_DECIMAL
TAX_AMOUNT MONEY
INTEREST_RATE BIG_DECIMAL
PRINCIPAL_PAYMENT_FLAT_AMOUNT MONEY
PRINCIPAL_PAYMENT_PERCENTAGE BIG_DECIMAL

Available filter elements

Filter Element Number Of affected values Available for
EQUALS ONE_VALUE BIG_DECIMAL,BOOLEAN,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY
MORE_THAN ONE_VALUE BIG_DECIMAL,NUMBER,MONEY
LESS_THAN ONE_VALUE BIG_DECIMAL,NUMBER,MONEY
BETWEEN TWO_VALUES BIG_DECIMAL,NUMBER,MONEY,DATE,DATE_UTC
ON ONE_VALUE DATE,DATE_UTC
AFTER ONE_VALUE DATE,DATE_UTC
BEFORE ONE_VALUE DATE,DATE_UTC
STARTS_WITH ONE_VALUE STRING
IN LIST ENUM,KEY
TODAY NO_VALUE DATE,DATE_UTC
THIS_WEEK NO_VALUE DATE,DATE_UTC
THIS_MONTH NO_VALUE DATE,DATE_UTC
THIS_YEAR NO_VALUE DATE,DATE_UTC
LAST_DAYS ONE_VALUE DATE,DATE_UTC
EMPTY NO_VALUE BIG_DECIMAL,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY,DATE,DATE_UTC
NOT_EMPTY NO_VALUE BIG_DECIMAL,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY,DATE,DATE_UTC

Usage examples

// get all the repayment transactions that were posted between "2000-01-01" and "2002-01-01"
POST {
    "filterConstraints":[
        {
        "filterSelection":"ENTRY_DATE",
        "filterElement":"BETWEEN",
        "value":"2000-01-01",
        "secondValue":"2002-01-01"
    },
        {
        "filterSelection":"EVENT",
        "filterElement":"EQUALS",
        "value":"REPAYMENT"
    }
    ]
} /api/loans/transactions/search

Response

The transactions that match the search will be returned
support@mambu.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete