API – Processing a Payment
Processing a payment is integral to your lending operation, so LoanPro lets you do it either in the UI or though the API. Processing payments can be done completed via the API by sending a PUT request to the loan on which you wish to process the payment.
This article is very similar to API – Logging a Payment (payments that will only be logged in LoanPro, but no funds will be transferred from the borrower). Please refer to that article if you are only logging a payment. This article also won’t cover payments that are split or duplicated across linked loans. It also assumes you already have an existing loan. If not, see Creating a Loan with the API.
Lastly, you can try this request yourself on our ReadMe site:
To process a payment on a loan, you will need to send a PUT request to the URL of the desired loan. For example, to process a payment on the loan with the id 515, the URL would be:
Below is a sample request for processing a payment
"info": "05/26/2017 Credit/Debit Card",
Id of selected processor. (Determined by tenant settings Settings > Company > Merchant > SecurePayments. Choose the type of processor (Debit/Credit Card, Bank Account/ACH (USA), or Bank Account/EFT (Canada)), then find the ID next to the processor name.)
The ID of the payment method to use for the payment. (Determined by tenant settings Settings > Loan > Payments > Methods. Find the ID on the left hand side of the payment method being used. For more information on payment methods see the article Add a New Payment Method.)
Assigns the Early Payment setting (0=No, 1=Yes). For more information see the Early Payment section of the article on how to Log a Payment.
The echeck authorization type for echeck payments. (See Payment Collections.)
The amount of the payment.
The date the payment will be applied on (format YYYY-MM-DD).
Human readable information describing the payment.
The ID of the Payment Type (waterfall application of the payment). Determined by tenant settings Settings > Loan > Payment > Types. Find the ID on the left hand side of the payment type being used.
Should be a 1
Whether or not the payment should reset the amount past due (0 = no, 1 = yes)
Whether or not it is a payoff payment (True or False)
Any custom field values for the payment. Make sure you include the customFieldId and the customFieldValue, which can be found by navigating to Settings > Loan > Custom Fields > Custom. This is an optional object. If you don't want to include a custom field, simply remove the object. (See API – Custom Fields.)
Set this to “1” if specifying a new payment process you want to save. Zero is do not save.
How extra is applied. (Must match the Loan Setup Between Periods/Transactions value). See Payment Collections for detailed information and available options.
This is a stringified-JSON object with the ID, key, name, and default field of the payment processor. (Determined by tenant settings Settings > Company > Merchant > SecurePayments. Choose the type of processor (Debit/Credit Card, Bank Account/ACH (USA), or Bank Account/EFT (Canada)), then find the ID next to the processor name. The Key is the type of processor being used and is "anet" for credit/debit cards, "nacha" for bank accounts processed through NACHA, and "echeck" for bank accounts processed through an ACH processor. The Name is the processor being used and is found in the same location as the ID. The Default corresponds to the default payment processor assigned under the company settings. Assign a value of "1" if you are using the default processor, and "0" if you are using any processor that is not the default.)
Determined by customer's payment profile inside of a loan Loan > Customer > Payment Profiles. Find the ID on the left hand side of the payment profile being used.
The type of the card fee to apply. See Payment Collections for detailed information.
The flat amount of the card fee
The percentage of the card fee
Flag for payoff payments. (0 = no, 1 = yes)
Other Available Fields
There are many other fields available, most of which are automatically set by the system. This section will cover them. Fields that are automatically set do not need to be sent by an application using the API, rather, they are evaluated on the server and sent back to give more information about a payment.
The ID of the payment (automatically set)
The display ID of the payment (how it will be identified in the system; automatically set)
Whether or not it is prior to the tenant cutoff date (automatically set)
The amount past due before the payment (automatically set)
The days past due before the payment (automatically set)
The payoff before the payment (automatically set)
The principal balance before the payment (automatically set)
To be set for any changes to payments; describes the changes made to the payment
The status of the payment (default: “None”)
The date (as an int) to sort it by (automatically set)
Whether or not this is a charge-off recovery payment (0 or 1); set to 1 to make a charge-off recovery payment
Any custom field values for the payment. See API – Custom Fields
A tie breaker for the ordering (automatically set)
Whether or not it shouldn’t be editable (default is “false”)
When this request is sent, the server will attempt to process the payment. If it succeeds, then the payment will be logged, otherwise an error will appear in the System Notes.