@startuml
participant "Client\n" as Client
participant "MW\n " as MW
participant "EIP UI\n" as EIP_UI
participant "EIP\n " as EIP
participant "DEEP\n " as DEEP

title Customer pays off loan early
Client -> MW:  Request for customer payoff the remaining balance on the loan by making a balance payment

alt Customer pays off the entire balance using a trade in
    Client -> MW:  Request for Customer payoff the remaining balance on the loan by trading in a device
end
    alt Customer pays off the entire balance using a mail in rebate
    Client -> MW:  Request for Customer payoff the remaining balance on the loan by applying a mail in rebate 
end
MW ->EIP: EIP receives  InstallmentAccountPayment request from MW
alt Cash apps team can use the EIP UI to make a payment
    EIP_UI -> EIP: Cash Apps enters remaining balance on the loan when making payment    
end 	
EIP -> MW:  Trigger AAL event for SMS and memo
    EIP -> DEEP: EIP publishes EIP Event (Payment-Regular-Payoff)/DEEP Event (LegacyLoanPayoff) [[http://flows.corporate.t-mobile.com/all-swaggers/swagger/ce.dd.bd.eip/LegacyUpdateLoanEvent_v1.2.json/ LegacyUpdateLoanEvent]]
@enduml
