API – Creating AutoPays


This article explains how to use the API to create AutoPays. For more information about what AutoPays are, consider reading AutoPay Overview and Schedule a New AutoPay.

Creating an AutoPay completes three things: first, an AutoPay designates a payment processor—a company and/or method of processing a payment; second, a payment profile is created, which is a specific card or bank account; lastly, an AutoPay specifies when payments will be processed.

To create an Autopay for a loan, send a PUT request to the URL of the desired loan.

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

Remember to replace "987" with the Loan ID of your desired loan in the request URL.

The body will be formatted as follows.

  "Autopays": {
    "results": [
        "name": "Default monthly autopay",
        "type": "autopay.type.recurring",
        "paymentExtraTowards": "payment.extra.tx.principal",
        "amountType": "autopay.amountType.static",
        "amount": 250.00,
        "paymentTypeId": 1,
        "chargeServiceFee": "0",
        "processCurrent": 1,
        "retryDays": 0,
        "processTime": 22,
        "postPaymentUpdate": 1,
        "applyDate": "2016-09-18",
        "processDate": "2016-09-17",
        "methodType": "autopay.methodType.echeck",
        "recurringFrequency": "autopay.recurringFrequency.monthly",
        "recurringDateOption": "autopay.recurringDate.processDate",
        "daysInPeriod": "",
        "schedulingType": "autopay.schedulingType.calendarDay",
        "processDateCondition": "calendarDays",
        "payoffAdjustment": 1,
        "chargeOffRecovery": 0,
        "paymentMethodAuthType": "payment.echeckauth.PPD",
        "paymentMethodAccountType": "bankacct.type.checking",
        "processZeroOrNegativeBalance": 0,
        "lastDayOfMonthEnabled": 0,
        "primaryPaymentMethodId": 123,
        "recurringPeriods": 36,
        "baProcessor": "1",
        "processDateTime": "2016-09-17 22:00:00"

You can use metadata for the "PrimaryPaymentMethod" and the "PaymentType" instead. Using metadata in your payload would look similar to the following examples.

"PrimaryPaymentMethod": {
"__metadata": {
"uri": "/api/1/odata.svc/PaymentAccounts(id=73232)",
"type": "Entity.PaymentAccount"
"id": 73232,
"type": "paymentAccount.type.checking"

"PaymentType": {
"__metadata": {
"uri": "/api/1/odata.svc/CustomPaymentTypes(id=1)",
"type": ""Entity.CustomPaymentType"

Using metadata in your payload, like shown above, will cause the API to perform extra validations. This will slow the creation of the AutoPay. If you are creating many AutoPays at once, using metadata in your payloads may result in latency issues.

  • name – The name of the Autopay
  • type – The type of the Autopay (see API Autopay collections)
  • paymentExtraTowards – How the extra will be applied (see Payment Collections)
  • amountType – How the amount of the Autopay is calculated (see API Autopay collections)
  • amount – The amount of the Autopay; use this if the amountType is a flat fee
  • paymentTypeId – The ID of the payment type (found in the tenant settings)
  • chargeServiceFee – “1” to charge a service fee, “0” to waive the service fee
  • processCurrent – “1” to process the Autopay if the loan is current, “0” to not process the Autopay if the loan is current
  • retryDays – The number of days to retry processing failed Autopays (between 0 and 5)
  • processTime – The time (in hours from midnight) of the day to process the Autopay (0-23)
  • postPaymentUpdate – Whether or not to update the apply date once the payment is posted (eg. if it takes multiple attempts to process). Set to “1” for yes, “0” for no
  • applyDate – The date for the payment to be applied to the account (YYYY-MM-DD)
  • processDate – The date to process the payment (MM/DD/YYYY)
  • methodType – The payment method type (see API Autopay collections)
  • recurringFrequency – How frequently the Autopay recurs (see API Autopay collections)
  • recurringDateOption – This controls if the next scheduled autopay in the cycle will be rescheduled based on the apply date or the process date. (see API Autopay collections)
  • daysInPeriod – The days in the Autopay payment period
  • schedulingType – If processDateCondition is set to Banking Days, then this option controls when the process date should adjust to. The prior US banking day, or the next US banking day. (see API Autopay collections)
  • processDateCondition – This controls if the autopay should be processed on US Banking days only, or Calendar days. (see API Autopay collections)
  • payoffAdjustment – This controls if the autopay amount should be adjusted & by what rules if it equals or exceeds the payoff amount for the given apply date of the autopay.
  • chargeOffRecovery – This controls if the payment posted as a result of the autopay will be marked as recovery payment against a charge off, or instead as a payment applying on the loan account.
  • paymentMethodAuthType – If the autopay is pulling from a Bank account then this will be the Authorization Type that was provided to process this payment, such as PPD, CCD, TEL, WEB.  (see API Autopay collections)
  • paymentMethodAccountType – This indicates if the payment profile being used is a Checking or Savings account (see API Autopay collections)
  • processZeroOrNegativeBalance – This controls the action that should occur if the Principal balance on the loan of which the autopay is running has a balance of zero or negative.
  • lastDayOfMonthEnabled – Set to “1” for payments to process on the last day of the month
  • primaryPaymentMethodId – The ID of the customer's payment profile that will be used in this AutoPay
  • recurringPeriods – The number of recurring periods for the Autopay
  • baProcessor – This is the processor ID from LoanPro that refers to a Secure Payments payment processor. This property is used when the processor processes bank account payments
  • ccProcessor – This is the processor ID from LoanPro that refers to a Secure Payments payment processor. This property is used when the processor processes bank cards (i.e. credit and debit cards)
  • processDateTime – The date and time to process the payment in UTC timezone (YYYY-MM-DD HH:MM:SS)

How did we do?

Powered by HelpDocs (opens in a new tab)