API – Split Payments

LoanPro provides the ability to split payments across linked loans, which provides for many useful tools.

This article assumes you have read API – Logging a Payment.

Preview Split

To preview a payment split, send a POST request to the url,

https://loanpro.simnang.com/api/public/api/1/Loans(199).Autopal.PredictPaymentApplication()

Predict Payment Application as follows:

{
  "data": {
    "Date": "2016-08-02",
    "Amount": 371.3,
    "PaymentTypeId": 1,
    "Extra": "payment.extra.tx.principal",
    "chargeFeeType": "loan.cardfee.types.1",
    "chargeFeeAmount": "5",
    "chargeFeePercentage": "5",
    "early": 0
  },
  "splitLoans": [
    {
      "id": 5,
      "displayId": "1004",
      "amount": "121.3"
    },
    {
      "id": 199,
      "displayId": "10016541-01",
      "amount": "250"
    }
  ],
  "splitFeeOptions": "loan.splitFee.option.1"
}

The above JSON object is described below.

  • data – This is the base payment data that will be posted
    • Date – The date to post it (YYYY-MM-DD)
    • Amount – The total payment amount
    • PaymentTypeId – ID of the payment type to use
    • Extra – How extra is applied. (Must match the Loan Setup Between Periods/Transactions value). See Payment Collections
    • chargeFeeType – The type of charge fee to charge
    • chargeFeeAmount – The amount to charge
    • chargeFeePercentage – The charge fee percentage
    • early – Whether or not the payment is early
  • splitLoans – This details information for splitting between loans
    • id – The ID of the loan to apply a portion of the payment to
    • displayId – The Display ID of the loan to apply a portion of the payment to
    • amount – Amount of the payment to apply to the loan
  • splitFeeOptions – This determines how to split the convenience fee. Possible values are:
    • loan.splitFee.option.0 – Charge the convenience fee on the base loan ONLY
    • loan.splitFee.option.1 – Charge the convenience fee from the base loan on EACH loan across which the payment is split
    • loan.splitFee.option.2 – Pull and charge the default convenience fee from EACH loan across which the payment is split
    • loan.splitFee.option.3 – Waive the fee for the base loan ONLY.
    • loan.splitFee.option.4 – Waivle the fee for the base loan and all loans over which the payment is split.

Applying Payment

When applying the payment, send a PUT request to one of the loans. For example, https://loanpro.simnang.com/api/public/api/1/odata.svc/Loans(3) or https://loanpro.simnang.com/api/public/api/1/odata.svc/Loans(4).

 
   "Payments": 
      "results": 
          
            "selectedProcessor":"",
            "paymentMethodId":1,
            "early":0,
            "echeckAuthType":"payment.echeckauth.WEB",
            "amount":"200",
            "date":"2017-11-15",
            "info":"11/15/2017 Cash",
            "paymentTypeId":1,
            "active":1,
            "resetPastDue":0,
            "payoffPayment":false,
            "quickPay":"",
            "CustomFieldValues": },
            "_saveProfile":0,
            "extra":"payment.extra.tx.principal",
            "cardFeeType":"loan.cardfee.types.1",
            "cardFeeAmount":"5",
            "cardFeePercent":"5",
            "__logOnly":true,
            "payoffFlag":0,
            "__splitPaymentInLoans":"[{\"id\":3,\"displayId\":\"44449818\",\"amount\":\"175\",\"splitFeeOptions\":\"loan.splitFee.option.0\"},
                                      {\"id\":4,\"displayId\":\"44449819\",\"amount\":\"25\",\"splitFeeOptions\":\"loan.splitFee.option.0\"}]",
            "__isSplited":true
         }
      ]
   }
}
  • Extra – How extra is applied. (Must match the Loan Setup Between Periods/Transactions value). See Payment Collections.
  • SplitPaymentInLoans – enter in the information for the two loans that the payment will be split across.

Related Articles

Leave A Comment?