---
# System prepended metadata

title: Portmone case

---

# Portmone case

## Business goals
- To get money from clients who want to pay mobiles and home service fees

## Vision
Create single payment point for clients for home services and mobile payments (integration with external API which gathers all end payment targets and hides complexity of working with home service companies and mobile operators)

## Capabilities
- Charge phone number
- Get home service payments from clients and send them to portmone API expecting portmone to finish transactions to home service providers

## Milestones
1. Phone number
    1.1 Portmone initegration
    1.2 Mobile client - charge phone number
    1.3 Digital bank (on cloud) api for mobile
    1.4 Digital bank (on premis) core bank integrartion
    1.5 Clearing\Reconsilation proccess
2. Utilities fee payment
    1.1 Sync dictionaries
    1.2 Extend portmone integration
    1.3 Client transactions rollback

## Edge cases
- Invalid Payment on Portmone side (ad hoc) (PK)
- Invalid Payment on Portmone\`s recipient side (PK)(delayed)
- Portmone is down (availibility/timeout) (MT)
- Digital on Premise is down (availibility/timeout)
- Digital on Cloud is down (availibility/timeout)
- Portmone sends wrong amount of money (OP)
- Portmone bills wrong amount of money
- Transaction Data lost


## Actors
- Client
- DigitalBank on Cloud
- DigitalBank on Premise
- Portmone
- PA = Payment Acceptor (Kievstar, Vodafone)


```
## Glossary
- **Payment** - intension to put money on mobile account
- **Transaction** - funds transfer
```

## Happy path
![](https://i.imgur.com/ZXJfheN.jpg)


## DFD 
![Data Flow Diagram](https://i.imgur.com/PGComsX.png)

## Edge cases:
Portmone unavailable
![](https://i.imgur.com/Lw21PeH.png)
----------------
Digital premise unavailable
![](https://i.imgur.com/26M2cPt.png)
-------------------
Invalid Payment on Portmone
![](https://i.imgur.com/knsIN8v.png)
---

Money rollback using Support
![](https://i.imgur.com/Kv2ie3Q.jpg)


## Invalid Payment on Portmone
![](https://i.imgur.com/knsIN8v.png)

## [Draft] Payments states check 
![](https://i.imgur.com/u1ChmRw.png)

## [Draft] ERD: Digital on Cloud
![](https://i.imgur.com/QIrkc8N.png)


---


# Feedback to Stan\`s team solution
- Почему Digital onPrem должен знать про Cloud?
- Clearing процесс на SD не очень понятен.
- Не до конца понятно как будет работать масштабирование on cloud?
- Хорошо, что позаботились о *fee*
- Не ясно назначение Event Hub
- Почему Kafka не часть CoreBank-а, а не что-то между?



---



# Feedback to Ilya\`s team solution
- Много артефактов - хорошо
- Оформление в hackmd - хорошо
- SD Happy path. Блокировать деньги перед запросом к Portmone - overkill
- Не учтена оплата коммуналки.
- UX слабый
- DFD моглы бы быть проще.
- SD Pormnone unavailable. Не понятно, что пользователь отравил запрос и не ждет.
- Разнородность в терминах.
- Не учтено fee