# Database - AutoPay Main Table (loan_autopay_entity)

### Description

This table holds the core information for automatic payments (AutoPays).

#### Common Uses

This table is commonly used to find:

• AutoPay IDs
• AutoPay Status
• Historical AutoPay Information
 Column Data Type Column Info Value Notes Other id int(10) The id of the AutoPay. loan_id int(10) The id of the associated loan account. Loan IDs can be found in the loan_entity table. name varchar(255) This is the name the user assigned to the AutoPay. This name is not required to be unique. type char(100) This value is the type of the AutoPay, which defines how it will function. The options are single payment, multiple payments that occur on specified days, or recurring based on the loan payment frequency. The values come from one of LoanPro's collections. autopay.type.recurring – The AutoPay recurs at a regular interval.autopay.type.multiple - The AutoPay will run on dates specified by the user.autopay.type.recurringMatch – The AutoPay processes when a payment comes due on the account.autopay.type.single – The AutoPay occurs once. status char(100) This is the AutoPay status. The status indicates whether the AutoPay was processed, and the outcome of processing the AutoPay. autopay.status.cancelled – The AutoPay was cancelled by the user.autopay.status.completed - The AutoPay was processed and did not fail.autopay.status.failed– The AutoPay was processed, but failed.autopay.status.pending – The AutoPay has not yet been processed. apply_date date This is the date on which the payment will apply to the loan. Because of loan and AutoPay settings, this may not be the same day as the payment is processed. process_datetime datetime This is the date and time when the payment actually processes. If the payment originally fails and is reprocessed, based on the AutoPay settings, this may not be the originally-scheduled process date. original_process_datetime datetime This is the date and time when the payment was originally scheduled to process. If the payment fails, or processing time changes based on loan settings, this may not be the time the payment actually processes. The actual time can be found in the process_datetime field. original_apply_date date This is the original apply date entered by the user. Due to loan settings, or if the payment originally fails and is reprocessed, this may not be the actual date it applies to the loan. The actual apply date can be found in the apply_date field. amount_type char(100) The amount can be a static amount or one of the supported dynamic amounts. The value in this field shows the amount type. The values are static amount, due fees amount, next due payment amount, past due amount principal and interest past due amount. These values come from one of LoanPro's collections. autopay.amountType.feesDue– This will set the payment amount to equal the due fees.autopay.amountType.nextDueautopay.amountType.pastDueautopay.amountType.piPastDueautopay.amountType.static amount decimal(10,2) This is the amount the AutoPay will be for. payment_type_id int(11) This is the ID of the payment type. Payment types define the waterfall application of the payment and are user defined. Payment types can be found in the custom_payment_type_entity table. process_current tinyint(4) Users can choose whether to process the AutoPay if the loan account does not have a past due balance. This field shows the value for this setting. The past-due balance on the loan can be found in the loan_status_archive table. 1 - yes, 0 - no charge_service_fee tinyint(4) Users can choose whether to charge a service fee for the AutoPay. This field shows the value for this setting. Service fee settings can be found in the loan_settings_entity table, card_fee_type, card_fee_amount, and card_fee_percent fields. 1 - yes, 0 - no retry_days tinyint(4) If a payment fails, the user can choose to have LoanPro retry the payment each day, for up to 5 days. This field shows whether the payment will be retried. Note: If you process AutoPays manually (either in the UI or through the API endpoint) the retry will not work. 0 - No retry, 1 - 5 Retry days retry_count int(11) If a payment fails, the user can choose to have LoanPro retry the payment each day, for up to 5 days. This field shows how many retries have already occurred on the current autopay. Note: If you process AutoPays manually (either in the UI or through the API endpoint) the retry will not work. post_payment_update_apply_date tinyint(4) If a payment originally fails, but succeeds on a subsequent retry, this field shows whether the apply date should be updated to the day the payment actually succeeds. The actual apply date can be found in the apply_date field for completed AutoPays. 1 - yes, 0 - no recurring_frequency char(100) This is the frequency with which the AutoPay will recur. Frequencies are explained here. autopay.recurringFrequency.annually autopay.recurringFrequency.biWeeklyautopay.recurringFrequency.customThe AutoPay will recur on a user-defined frequency.The AutoPay will recur once every month.autopay.recurringFrequency.quarterlyThe AutoPay will recur once every quarter.autopay.recurringFrequency.semiannually – The AutoPay will recur twice every year.autopay.recurringFrequency.semiMonthly – The AutoPay will recur twice every month.autopay.recurringFrequency.semiMonthlyAlt – The AutoPay will recur twice every month, but the dates may be different than with the semi-monthly option.autopay.recurringFrequency.single – Only one payment will be processed.autopay.recurringFrequency.weekly – The AutoPay will recur once a week. recurring_periods int(11) This is the number of periods the AutoPay will occur. This is only applicable to AutoPays with a type of autopay.type.recurring. Otherwise, this field will show 1. recurring_date_option char(64) As soon as an AutoPay processes, the next payment for the AutoPay is scheduled. This is a selection where the user specifies whether future AutoPays should be scheduled on the apply date or the process date. autopay.recurringDate.applyDate – Future AutoPay payments will be scheduled on the apply date.autopay.recurringDate.processDate – Future AutoPay payments will be scheduled on the process date. scheduling_type char(64) The scheduling type shows whether the AutoPay should process on any calendar day, or on the previous  or next banking day. autopay.schedulingType.calendarDay – Payments will process on any calendar day.autopay.recurringDate.bankingDayPrior – Payments will only process on the banking day immediately prior to the payment date.autopay.schedulingType.bankingDayNext – If the payment falls on a non-banking day, process date should be adjusted to the next banking day last_dom_enabled tinyint(4) If this field is set to 1, the AutoPay will process on the last day of the month. This valuable when the AutoPay is originally scheduled on the last day of a month with less than 31 days. 1 - yes, 0 - no days_in_period char(100) This field is only relevant to payments that occur on a custom payment frequency. This shows the selected number of days between each payment. The options are 3, 4, 5, 6, 8, 9, 10, 12, 13, 15, 18, 20, 24, 26, 28, 30, 36, 40, 45, 52, 60, 72, 73, 90, 91, 120, 180, 182, 360, 364, 365. loan.daysinperiod.3loan.daysinperiod.4loan.daysinperiod.5loan.daysinperiod.6loan.daysinperiod.8loan.daysinperiod.9loan.daysinperiod.10loan.daysinperiod.12loan.daysinperiod.13loan.daysinperiod.15loan.daysinperiod.18loan.daysinperiod.20loan.daysinperiod.24loan.daysinperiod.26loan.daysinperiod.28loan.daysinperiod.30loan.daysinperiod.36loan.daysinperiod.40loan.daysinperiod.45loan.daysinperiod.52loan.daysinperiod.60loan.daysinperiod.72loan.daysinperiod.73loan.daysinperiod.90loan.daysinperiod.91loan.daysinperiod.120loan.daysinperiod.180loan.daysinperiod.182loan.daysinperiod.360loan.daysinperiod.364loan.daysinperiod.365 payment_extra_towards char(100) This setting shows how any amount paid by the AutoPay, above the amount due on the loan, will apply. There are different values based on the interest application of the loan. payment.extra.periods.next - Extra amount will apply to the next payment, then the next, etc.payment.extra.periods.principalonly - Extra amount will apply to principal, but not count towards the amount past due.payment.extra.tx.classic - Extra amount will apply towards the next payment, then towards principal.payment.extra.tx.principal - Extra amount will apply towards principal.payment.extra.tx.principalonly - Extra amount will apply towards principal only, but not count towards the amount past due. payment_fee decimal(6,2) This is the dollar amount of any convenience fee that will be charged when each of the AutoPay payments is processed. primary_payment_method_id int(11) This is the ID of the primary payment method that will be used to process the payments for this AutoPay. Payment methods can be found in the payment_account_entity table. secondary_payment_method_id int(11) This is the ID of the secondary payment method that will be used to process the payments for this AutoPay if the primary payment method fails. Payment methods can be found in the payment_account_entity table. If no secondary payment has been set, the value will be NULL. additional_payment_method_id int(11) This is the ID of a third payment method that will be used to process the payments for this AutoPay if the primary and secondary payment methods fail. Payment methods can be found in the payment_account_entity table. If no additional payment has been set, the value will be NULL. payment_method_auth_type char(100) This field is only relevant to AutoPays that will be processed using a bank account as the payment method. This value shows how the account holder authorized the payment. The options include web, telephone, personal signature, and company signature. payment.echeckauth.WEB - Payment was authorized through the web.payment.echeckauth.TEL - Payment was authorized over the phone.payment.echeckauth.CCD - Payment was authorized through a company signature.payment.echeckauth.PPD - Payment was authorized through a personal signature. payoff_adjustment tinyint(1) The user can select what to do if the payment amount is equal to, or exceeds the payoff amount. This field holds the value the indicates what will happen in that case. The options are to not process the payment, adjust the payment to equal the payoff amount, or process the payment for the scheduled amount. 0 - Do not process the payment.1 - Adjust the payment to equal the payoff.2 - Process the payment for the scheduled amount. process_zero_or_negative_balance tinyint(1) This value shows whether the payment should still process if the principal balance on the loan is less than or equal to 0. 1 - yes, 0 - no charge_off_recovery tinyint(1) charge off recovery 1 - yes, 0 - no mc_processor varchar(255) This field holds a JSON object that identifies the processor that will process this payment. The JSON object contains the processor ID, a key to indicate the processor type, the name of the processor, and a value indicating whether the processor is the default processor for its type. { "bankAccount":{ "id":"2", "key":"nacha", "name":"Primary Processor", "default":"1" }} cc_processor int(11) This is the ID of the associated credit/debit card processor. This will be 0 if the payment will not be processed through a credit/debit card. ba_processor int(11) This is the ID of the associated bank account processor. This will be 0 if the payment will not be processed through a bank account. deleted tinyint(4) This value shows whether the AutoPay is deleted. 1 - yes, 0 - no created timestamp Timestamp of when the AutoPay was created. lastUpdated datetime Timestamp of when the AutoPay was last updated. active tinyint(4) This value shows whether the AutoPay is active. 1 - yes, 0 - no queued tinyint(1) This value shows whether the AutoPay is queued to be processed. If the AutoPay is not queued, it will not process. 1 - yes, 0 - no last_payment_extra_towards varchar(100) This value shows the extra towards application of the previous payment. If there was no last payment, the value will be NULL. payment.extra.periods.next - Extra amount will apply to the next payment, then the next, etc.payment.extra.periods.principalonly - Extra amount will apply to principal, but not count towards the amount past due.payment.extra.tx.classic - Extra amount will apply towards the next payment, then towards principal.payment.extra.tx.principal - Extra amount will apply towards principal.payment.extra.tx.principalonly - Extra amount will apply towards principal only, but not count towards the amount past due.