---
# System prepended metadata

title: Activity Diagram Get Payment Method List Existing
tags: [Payment]

---

---
tags: Payment
---
# Activity Diagram Get Payment Method List Existing
```plantuml
@startuml
:Handler
__clientCode__ = basic(username:password)
__paymentToken__ = basic(username:)
__deviceId__ = ;
:Service PaymentMethodList;
:get __client__ by __clientCode__;
:get __paymentData__ and
__excludePaymentMethod__ 
by __paymentToken__;
:get __clientProvidersPaymentMethods__ by __client__.id;
if (__clientProvidersPaymentMethods__) then (empty)
    stop
else
:filter __clientProvidersPaymentMethods__ by isActive
-> __activeClientProvidersPaymentMethods__;
:get __providersPaymentMethods__ by
__activeClientProvidersPaymentMethods__.ProvidersPaymentMethodId -> ;
group remove duplication provider of __providersPaymentMethods__;
while (for __providersPaymentMethods__?)
  :map[__providersPaymentMethods__.PaymentMethodId] = __providersPaymentMethods__;
endwhile
end group
:get __providerIds__ and __paymentMethodIds__ from __providersPaymentMethods__;
:get __providerData__ by __providerIds__;
:get __paymentMethods__ by __paymentMethodIds__;
:get __instructions__ by __paymentMethodIds__;
:get rules from ruleEngine;

while (for __paymentMethods__)
    if (exclude) then
    else
    :providerName = providersPaymentMethods[paymentMethod.Id];
    :build method model;
    :exception for aladin_dd;
    :build metadata;
    :build instruction;
    :method.isEligible = evaluate(rules);
    endif
endwhile
:response all methods;
stop
@enduml
```