API - Parent-Child Create AutoPay

General

Creating an AutoPay on a parent loan requires additions to the typical AutoPay Payload. To create an AutoPay, use the request:

PUT https://loanpro.simnang.com/api/public/api/1/odata.svc/Loans(id)

Make sure to change id to the ID of the parent loan. The payload should look something like this:

{
"Autopays":{
"results":[
{
"name":"Single AutoPay",
"type":"autopay.type.single",
"paymentExtraTowards":"payment.extra.tx.classic",
"amountType":"autopay.amountType.static",
"amount":"749.95",
"paymentType":1,
"chargeServiceFee":"0",
"processCurrent":1,
"retryDays":0,
"processTime":0,
"postPaymentUpdate":0,
"applyDate":"2019-12-20",
"processDate":"12/20/2019",
"methodType":"autopay.methodType.debit",
"recurringFrequency":"autopay.recurringFrequency.monthly",
"recurringDateOption":"autopay.recurringDate.processDate",
"schedulingType":"autopay.schedulingType.calendarDay",
"processDateCondition":"calendarDays",
"payoffAdjustment":1,
"chargeOffRecovery":0,
"processZeroOrNegativeBalance":0,
"recurringPeriods":12,
"lastDayOfMonthEnabled":0,
"PrimaryPaymentMethod":{
"__metadata":{
"uri":"http://loanpro.simnang.com/api/public/api/1/odata.svc/PaymentAccounts(id=12)",
"type":"Entity.PaymentAccount"
},
"id":12,
"type":"paymentAccount.type.credit"
},
"mcProcessor":"{\"creditCard\":{\"id\":\"10\",\"key\":\"anet\",\"name\":\"Test Default Processor\",
\"default\":\"1\"}, \"bankAccount\":{\"id\":\"11\",\"key\":\"speedchex\",\"name\":\"Test Bank Account Processor\",\"default\":\"1\"}}",
"ccProcessor":"10",
"baProcessor":"11",
"processDateTime":"2019-12-20 07:00:00",
"PaymentType":{
"__metadata":{
"type":"Entity.CustomPaymentType",
"uri":"/api/1/odata.svc/CustomPaymentTypes(id=1)"
}
},
"TransactionChilds":{
"results":[
{
"loanChildId":3,
"childEntityId":"",
"entityId":"",
"entityType":"Entity.Autopay",
"amount":"250.03"
},
{
"loanChildId":1,
"childEntityId":"",
"entityId":"",
"entityType":"Entity.Autopay",
"amount":"249.96"
},
{
"loanChildId":2,
"childEntityId":"",
"entityId":"",
"entityType":"Entity.Autopay",
"amount":"249.96"
}
]
}
}
]
}
}

The difference between a standard AutoPay and an AutoPay on a parent loan is that the payload contains the TransactionChilds object. This allows you to allocate each portion of the AutoPay amount correctly to each child loan. The amounts should add up to the total amount of the AutoPay.

  • loanChildId - This is the ID of the child loan.
  • entityType - This should equal Entity.Autopay.
  • amount - This is the amount of the AutoPay that will be applied to the child loan.


How did we do?


Powered by HelpDocs (opens in a new tab)