Skip to main content

Wallet Service

The wallet service is our virtual accounting system. It is responsible for allocating receipts, queueing payment and working along side the hyperledger and it determines whether funds can be moved.

Party Tag workflows

When payments are approved the party tag will determine where the funds go.

  • Agency: Results in a wallet to wallet transfer from the payor to the Agency wallet. The agency can then payout all commission in one batch.
  • Tenant Deposit Account: The results in an EFT that goes directly to our Deposit Trust Account, it is automatically reconciled to the tenants deposit wallet.
  • Agency Deposit: Agency Deposits results in eft's directly to the Agency's business account.
  • PartyTag if beneficiary is EasyPay: Easypay payments can be made to munics or suppliers so we check if the beneficiary is an Easypay payment which results in an API call to our Easypay service and results in an outgoing EFT to our business account if successful. Easypay then debit order our business account every day for the previous days successful payments.
  • Remaining: All other party tags result in an EFT.

Additional Workflow

  • Receipt Received When money comes in the Wallet service is reponsible for determining if the reference is correct and then issues an Iroha command to either allocate to an individuals wallet or if no reference is match it goes into a Bad Reference wallet where Support staff deal with it.

Summary

The wallet service issues commands to Iroha before invoking any commands on the Wallet Entity. An Akka graph and Pubsub listener are responsible for checking the status of the transaction with Iroha, once it's confirmed with Iroha an event is emitted.

sequenceDiagram participant L as Listener participant E as Entity participant I as Iroha participant G as Graph/Pubsub participant R as Readside participant T as Topic note over L,T: A typical transaction process opt Submit the command L->>I: Submit Transaction/s L->>E: Submit Command end opt Update transaction G-->>+I: Pubsub I-->>-G: TransactionStatus G->>E: UpdateTransactionStatus E-->>R: Event Emitted E-->>T: Event Emitted end

All events follow this basic pattern. It is very much similar to most of our workflows only here we have introduced an Akka Graph to monitor transaction statuses.