API – Enhanced Loan Funding

LoanPro's latest release features this enhanced funding process. The old method still works, but will be phased out in future updates. For the old process, see Fund a Loan.

This article explains the enhanced loan funding process through the API. For more information regarding loan funding in general or the process in the UI, see Enhanced Funding.

Before you begin, you'll need both a loan ID. If you don't have one, see our article API – Finding Loan and Customer IDs. If you are funding to a customer, you'll need a customer ID. If you're funding to a source company you'll need a source company ID. If you are funding through a payment profile (e.g. bank card, bank account), you'll also need an ID for that.

Method and Payload

For each funding transaction, you'll send a POST request to this endpoint:

POST https://loanpro.simnang.com/api/public/api/1/odata.svc/LoanFundingTransactions?
If you are sending this request to a staging environment, make sure to include "staging-" in your endpoint: https://staging-loanpro.simnang.com/api/public/api/1/odata.svc/LoanFundingTransactions?

Whether you're funding the loan with a cash transaction, a payment profile, or a source company, the payload will be the same. Here's a sample:

{
"loanId": 2902,
"customerId": "528",
"sourceCompanyId": null,
"categoryId": 1,
"merchantProcessorGroupId": "1",
"merchantTxProcessorId": "",
"date": "2021-06-16",
"amount": 61,
"method": "loan.funding.method.credit",
"authorizationType": "",
"paymentAccountId": "189"
}

Here's what each field indicates:

  • loanId – The ID for the loan you are funding
  • customerId – The ID for the customer you are funding
  • sourceCompanyId – If you are funding the loan to a source company, this is that company's ID. If you fund the customer directly, set it as "null".
  • categoryId – The ID for the category type you selected for the transaction. For more info, see our article on Creating a New Funding Category.
  • merchantTxProcessorGroupId – The ID for the merchant processor group that will process the transaction.
  • merchantTxProcessorId – The ID for a specific processor that you'd like to use for the transaction, rather than selecting a merchant group. If there is a merchant processor group assigned at the loan level in LoanPro, this value will be ignored in favor of the setting on the loan. You can find the ID's of your merchant processors by navigating to Settings > Company > Merchant > Secure Payments inside of LMS.
  • date – The date the funding transaction will apply to the loan.
  • amount – The dollar amount of the funding transaction.
  • method – The payment method (cash, card, etc.).
  • authorizationType – How an ACH funding transaction was authorized. For non-ACH transactions, leave this field blank. Options are:
    • loan.funding.auth.ppd - Authorized through a personal signature
    • loan.funding.auth.ccd - Authorized through company signature
    • loan.funding.auth.tel - Authorized over the phone
    • loan.funding.auth.web - Authorized via the web
  • paymentAccountId – The ID for the customer's payment profile. This is the payment account in LMS, not the ID in Secure Payments. For cash drawer transactions, leave this field blank.

Sample Responses

A 200 response for this request contains information about the funding transaction you just completed, as well as all of the loan data. Here's a sample with just the funding info:

{
"d": {
"__metadata": {
"uri": "http://staging-loanpro.simnang.com/api/public/api/1/odata.svc/LoanFundingTransactions(id=103)",
"type": "Entity.LoanFundingTransaction"
},
"id": 103,
"loanId": 475,
"sourceCompanyId": 0,
"customerId": 529,
"categoryId": 1,
"cashDrawerId": 0,
"cashDrawerTxId": 0,
"cashDrawerTxStatus": null,
"cashDrawerTerminalId": null,
"paymentAccountId": 0,
"paymentProcessor": null,
"merchantTxId": 0,
"merchantTxStatus": null,
"merchantTxBatch": null,
"merchantTxProcessor": null,
"merchantTxProcessorId": 0,
"paymentId": 0,
"agentId": 1938,
"authorizationType": "",
"method": "loan.funding.method.cashdrawer",
"amount": 150,
"date": "/Date(1623801600)/",
"status": "loan.funding.status.none",
"created": null,
"reversalDate": null,
"reversalCode": null,
"reversalReason": null,
"reversalComment": null,
"active": 0,
"ipAddress": null,
"printCheckNumber": 0,
"printCheckSourceCompanyId": 0,
"Loan": { . . . }
}
}

Unabridged Response

The full 200 response contains all the objects nested in the "Loan" entity.

Full Response

Here's a sample of a full response:

{
"d": {
"__metadata": {
"uri": "http://staging-loanpro.simnang.com/api/public/api/1/odata.svc/LoanFundingTransactions(id=103)",
"type": "Entity.LoanFundingTransaction"
},
"id": 103,
"loanId": 475,
"sourceCompanyId": 0,
"customerId": 529,
"categoryId": 1,
"cashDrawerId": 0,
"cashDrawerTxId": 0,
"cashDrawerTxStatus": null,
"cashDrawerTerminalId": null,
"paymentAccountId": 0,
"paymentProcessor": null,
"merchantTxId": 0,
"merchantTxStatus": null,
"merchantTxBatch": null,
"merchantTxProcessor": null,
"merchantTxProcessorId": 0,
"paymentId": 0,
"agentId": 1938,
"authorizationType": "",
"method": "loan.funding.method.cashdrawer",
"amount": 150,
"date": "/Date(1623801600)/",
"status": "loan.funding.status.none",
"created": null,
"reversalDate": null,
"reversalCode": null,
"reversalReason": null,
"reversalComment": null,
"active": 0,
"ipAddress": null,
"printCheckNumber": 0,
"printCheckSourceCompanyId": 0,
"Loan": {
"__metadata": {
"uri": "http://staging-loanpro.simnang.com/api/public/api/1/odata.svc/Loans(id=475)",
"type": "Entity.Loan"
},
"id": 475,
"displayId": "HX53174",
"title": "HX53174",
"settingsId": 459,
"setupId": 478,
"insurancePolicyId": 0,
"collateralId": 0,
"linkedLoan": 0,
"modId": 0,
"modTotal": 0,
"humanActivityDate": "/Date(1623801600)/",
"created": "/Date(1581549416)/",
"lastMaintRun": "/Date(0)/",
"createdBy": 1819,
"active": 1,
"archived": 0,
"loanAlert": null,
"temporaryAccount": 0,
"deleted": 0,
"deletedAt": null,
"Insurance": {
"__deferred": {
"uri": "Loans(475)/Insurance"
}
},
"CustomFieldValues": {
"__deferred": {
"uri": "Loans(475)/CustomFieldValues"
}
},
"ChecklistItemValues": {
"__deferred": {
"uri": "Loans(475)/ChecklistItemValues"
}
},
"Documents": {
"__deferred": {
"uri": "Loans(475)/Documents"
}
},
"Collateral": {
"__deferred": {
"uri": "Loans(475)/Collateral"
}
},
"LoanSettings": {
"__metadata": {
"uri": "http://staging-loanpro.simnang.com/api/public/api/1/odata.svc/LoanSettings(id=459)",
"type": "Entity.LoanSettings"
},
"id": 459,
"loanId": 475,
"cardFeeAmount": 5,
"cardFeeType": "loan.cardfee.types.1",
"cardFeePercent": 5,
"agent": 0,
"loanStatusId": 2,
"loanSubStatusId": 13,
"sourceCompany": 0,
"paymentTypeDefault": 0,
"eBilling": 0,
"ECOACode": "loan.ecoacodes.1",
"coBuyerECOACode": "loan.ecoacodes.0",
"creditStatus": "loan.creditstatus.0",
"creditBureau": "loan.creditbureau.00",
"reportingType": "loan.reportingtype.I",
"secured": 1,
"autopayEnabled": 1,
"repoDate": "/Date(-62169984000)/",
"closedDate": "/Date(-62169984000)/",
"liquidationDate": "/Date(-62169984000)/",
"followUpDate": "/Date(-62169984000)/",
"isStoplightManuallySet": 0,
"merchantProcessorGroupId": 0,
"Loan": {
"__deferred": {
"uri": "LoanSettings(459)/Loan"
}
},
"LoanStatus": {
"__deferred": {
"uri": "LoanSettings(459)/LoanStatus"
}
},
"LoanSubStatus": {
"__deferred": {
"uri": "LoanSettings(459)/LoanSubStatus"
}
},
"CustomFieldValues": {
"__deferred": {
"uri": "LoanSettings(459)/CustomFieldValues"
}
},
"SrcCompany": {
"__deferred": {
"uri": "LoanSettings(459)/SrcCompany"
}
},
"MerchantProcessorGroup": {
"__deferred": {
"uri": "LoanSettings(459)/MerchantProcessorGroup"
}
}
},
"LoanSetup": {
"__deferred": {
"uri": "Loans(475)/LoanSetup"
}
},
"Notes": {
"__deferred": {
"uri": "Loans(475)/Notes"
}
},
"Promises": {
"__deferred": {
"uri": "Loans(475)/Promises"
}
},
"Bankruptcies": {
"__deferred": {
"uri": "Loans(475)/Bankruptcies"
}
},
"Charges": {
"__deferred": {
"uri": "Loans(475)/Charges"
}
},
"Payments": {
"__deferred": {
"uri": "Loans(475)/Payments"
}
},
"LoanFunding": {
"__deferred": {
"uri": "Loans(475)/LoanFunding"
}
},
"Advancements": {
"__deferred": {
"uri": "Loans(475)/Advancements"
}
},
"Credits": {
"__deferred": {
"uri": "Loans(475)/Credits"
}
},
"DueDateChanges": {
"__deferred": {
"uri": "Loans(475)/DueDateChanges"
}
},
"CurtailmentDates": {
"__deferred": {
"uri": "Loans(475)/CurtailmentDates"
}
},
"StatusArchive": {
"__deferred": {
"uri": "Loans(475)/StatusArchive"
}
},
"Transactions": {
"__deferred": {
"uri": "Loans(475)/Transactions"
}
},
"EscrowCalculatedTx": {
"__deferred": {
"uri": "Loans(475)/EscrowCalculatedTx"
}
},
"ScheduleRolls": {
"__deferred": {
"uri": "Loans(475)/ScheduleRolls"
}
},
"StopInterestDates": {
"__deferred": {
"uri": "Loans(475)/StopInterestDates"
}
},
"APDAdjustments": {
"__deferred": {
"uri": "Loans(475)/APDAdjustments"
}
},
"DPDAdjustments": {
"__deferred": {
"uri": "Loans(475)/DPDAdjustments"
}
},
"LoanModifications": {
"__deferred": {
"uri": "Loans(475)/LoanModifications"
}
},
"EscrowAdjustments": {
"__deferred": {
"uri": "Loans(475)/EscrowAdjustments"
}
},
"EscrowTransactions": {
"__deferred": {
"uri": "Loans(475)/EscrowTransactions"
}
},
"EscrowSubsetOptions": {
"__deferred": {
"uri": "Loans(475)/EscrowSubsetOptions"
}
},
"EscrowCalculators": {
"__deferred": {
"uri": "Loans(475)/EscrowCalculators"
}
},
"EstimatedDisbursements": {
"__deferred": {
"uri": "Loans(475)/EstimatedDisbursements"
}
},
"Loans": {
"__deferred": {
"uri": "Loans(475)/Loans"
}
},
"LinkedLoanValues": {
"__deferred": {
"uri": "Loans(475)/LinkedLoanValues"
}
},
"LoanChilds": {
"__deferred": {
"uri": "Loans(475)/LoanChilds"
}
},
"RecurrentCharges": {
"__deferred": {
"uri": "Loans(475)/RecurrentCharges"
}
},
"PayNearMeOrders": {
"__deferred": {
"uri": "Loans(475)/PayNearMeOrders"
}
},
"Customers": {
"__deferred": {
"uri": "Loans(475)/Customers"
}
},
"Portfolios": {
"__deferred": {
"uri": "Loans(475)/Portfolios"
}
},
"SubPortfolios": {
"__deferred": {
"uri": "Loans(475)/SubPortfolios"
}
},
"EscrowSubsets": {
"__deferred": {
"uri": "Loans(475)/EscrowSubsets"
}
},
"RuleAppliedLoanSettings": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedLoanSettings"
}
},
"RuleAppliedChargeOff": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedChargeOff"
}
},
"RuleAppliedAPDReset": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedAPDReset"
}
},
"RuleAppliedChecklists": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedChecklists"
}
},
"RuleAppliedChangeDueDates": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedChangeDueDates"
}
},
"RuleAppliedStopInterest": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedStopInterest"
}
},
"RuleAppliedAccountTools": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedAccountTools"
}
},
"RuleAppliedCustomerTools": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedCustomerTools"
}
},
"RuleAppliedAutopay": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedAutopay"
}
},
"RuleAppliedLoanSetup": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedLoanSetup"
}
},
"RuleAppliedBankruptcy": {
"__deferred": {
"uri": "Loans(475)/RuleAppliedBankruptcy"
}
},
"Autopays": {
"__deferred": {
"uri": "Loans(475)/Autopays"
}
},
"ActionResultNotes": {
"__deferred": {
"uri": "Loans(475)/ActionResultNotes"
}
},
"LoanFundingTransactions": {
"__deferred": {
"uri": "Loans(475)/LoanFundingTransactions"
}
}
},
"PrintCheckSourceCompany": {
"__deferred": {
"uri": "LoanFundingTransactions(103)/PrintCheckSourceCompany"
}
},
"SourceCompany": {
"__deferred": {
"uri": "LoanFundingTransactions(103)/SourceCompany"
}
},
"Customer": {
"__deferred": {
"uri": "LoanFundingTransactions(103)/Customer"
}
},
"FundingCategory": {
"__deferred": {
"uri": "LoanFundingTransactions(103)/FundingCategory"
}
},
"PaymentAccount": {
"__deferred": {
"uri": "LoanFundingTransactions(103)/PaymentAccount"
}
},
"Payment": {
"__deferred": {
"uri": "LoanFundingTransactions(103)/Payment"
}
}
}
}

409 Responses

You may get a 409 response if you are using a payment method that doen't have an associated processor in your specified merchant processor group. You may also get this response if you send similar funding transactions within a few minutes of each other.


How did we do?


Powered by HelpDocs (opens in a new tab)