https://developer.authorize.net/api/reference/index.html
Track and charge fees to borrowers via the Borrower Portal. We will leverage Authorize.net as a partner for the charging of the credit and settlement of the money into our merchant account.
- Integration in with Auth.net should live in the Backend, Fronted, or Both ? Lean toward FE for keeping credit info out of backend.
- Do we store individual charge attempts?
- How do we handle refunds?
- How do we reconcile transactions?
- How do we want to interact with Authorize.net? (simple, pre-auth, customer profile)
- An Invoice should house N number of Fees
- Fees hold all of the information specific to the fee itself, while Invoice stores all of the borrower interaction data.
- Invoice has a state machine from initiated to Charged or Paid
- DO NOT STORE CREDIT CARDS
- As a borrower, I should pay invoices through the FE
- As a loan officer, I should be able to create invoices made of N fees.
- As an admin, I should be able to create new Fee types
- In backend, I should see a list of Fees and invoices per loan
- An Invoice could have many “Charge Attempts”
- As a borrower, I should see a list of past paid invoices in my completed tasks
- As a borrower, I should be able to mark the invoice “disputed”
- As a borrower I should be able to download the invoices
Invoice
- Has Many Fees.
- Has a state machine that watches the lifecycle of an invoice
- Has a due date/late date
- Can be cancelled
- Has a payee
Fee
- Single-Table Inheritance model where each fee is a submodel
- Fees get instantiated and stored relationally to the invoice.
- Uniqueness Constraints to prevent over charging or forgetting complimentary fees/processing.
- has_many line items, or times this fee was invoiced
Line Item
- Line Item represents an instance of a fee on an invoice.
- Line Item can exist multiple times on the same invoice.
- Line Item is editable, getting it's default values from the corresponding Fee
- belongs to a fee
- belongs to invoice
New Views
- Create an invoice form
- Loan Show list of invoices
- Single invoice (pdf?)
- Add fee to invoice
- Delete fee from invoice (guarded)
- Send invoice
Update Views
- Invoices added to Task list
- View Invoice
- charge credit card screen
- view past invoices