This canvas describes the Payment-hub service, which is part of the Flexifin application.

Name:

Payment-hub service

Description:

This service is responsible for transaction processing of loans with one or more disbursements, variable and/or linked interest rates, fees through the consuming and/or emitting of events mapped to the transactions. It tracks loan components, portions, arrears, waterfall payment allocation and responds to retroactive events through immutable state and transaction event types. The Service is responsible for emitting events related to the loan that will be used by subsidiary microservices responsible for the querying of the debtor loan account and the financial ledger.

REST API:

Incoming Events

Workflow

Invoked By

Source Service

disburse_ftl.bpmn

LoanCreatedEvent

FTL

do_incoming_debit_transfer.bpmn

DebitOrderPaymentMadeEvent

flexifin-banking-command

do_incoming_transfer.bpmn

TransferReceivedEvent

flexifin-banking-command

do_transfer.bpmn

TransferMadeEvent

flexifin-rcp-command

receive_daily_settlement.bpmn

POST - /api/v1/settlements/daily

receive_debit_pull.bpmn

POST - /api/v1/payments, POST - /api/v1/payments/debits

FINTEQ

receive_payment.bpmn

POST - /api/v1/payments/credits/batches, POST - /api/v1/payments/credits

FINTEQ

PUT - /api/v1/mandates/{shopperAccountNumber}/capture, /api/v1/mandates/{shopperAccountNumber}/payNow

PEACH

/api/v1/mandates/pullInstalment, DeferredPaymentPurchaseCreatedEvent

flexifin-banking-command

receive_purchase_made.bpmn

POST - /api/v1/payments/purchase

reserve_payment.bpmn

POST - /api/v1/payments/reserve

send_debit_order_payment.bpmn

DebitOrderPaymentRequestedEvent

flexifin-banking-command

send_payment.bpmn

PaymentMadeEvent (banking),PaymentMadeEvent (RCP)

flexifin-banking-command, flexifin-rcp-command

send-acs-payment-instruction.bpmn

PaymentReceivedInstructionReceived(ACS_CARD rail)

flexifin-payment-hub

MandateUpdateRequestedEvent

flexifin-deferred-payment

ReverseDebitOrderPaymentRequestedEvent

flexifin-deferred-payment

Event Canvas

StateEvent

FullRefundCompletedEvent

ReserveInstructionReceivedEvent

ReserveInstructionSentEvent

MandateCollectionStartedEvent

AdjustmentRequestedEvent

flexifin-deferred-payment

MandateFailedEvent

PreReAuthorisedEvent

SuccessfulReAuthorizedEvent

DeclinedReAuthorizedEvent

SuccessfulReAuthorisedReattemptedEvent

DeclinedReAuthorisedReattemptedEvent

PreInstalmentCollectedEvent

SuccessfulInstalmentCollectedEvent

DeclinedInstalmentCollectedEvent

InstalmentCollectionFailedEvent

ReAuthorisationFailedEvent

MandateCompletedEvent

flexifin-deferred-payment

PartialRefundCompletedEvent

FullRefundCompletedEvent

OutstandingBalanceCapturedEvent

MakePaymentRequestedEvent

StateChangedUnclearedEffects

flexifin-payment-hub

TransactionalEvent

DebitPushExternalInstructionSentEvent

DebitPullInstructionReceivedEvent

DebitPullInstructionSentEvent

flexifin-banking-command

DebitPushInstructionReceivedEvent

DisbursementMadeInstructionSentEvent

flexifin-ftl-api

PaymentMadeExternalInstructionSentEvent

DebitPushInstructionReceivedEvent

DebitPushInternalInstructionSentEvent

PaymentMadeInstructionReceivedEvent

PaymentMadeInternalInstructionSentEvent

flexifin-banking-command

PaymentReceivedInstructionReceivedEvent

PaymentReceivedInstructionSentEvent

flexifin-ftl-api, flexifin-banking-command

PurchaseInstructionReceivedEvent

PurchaseInstructionSentEvent

rcp-command, banking-command

SettlementInstructionReceivedEvent

SettlementInstructionSentEvent

flexifin-banking-command

TransferMadeInstructionReceivedEvent

TransferMadeInstructionSentEvent

flexifin-banking-command

ExceptionEvent

DebitPullExceptionSentEvent

ReserveInstructionExceptionSentEvent

PaymentMadeInternalInstructionExceptionSentEvent

PaymentReceivedExceptionSentEvent

External Calls

Adapter / API

Target Service

ReceivePurchaseMade, SendPayment, ReceivedPayment, DisburseFTL, ReceiveDebitPull - Workflow, RetrievePaymentAccountAdapter

GET - /banking-query/api/v1/accounts/{accountNumber}, flexifin-banking-query

SendPayment, ReceivedPayment, DisburseFTL - Workflow, RetrieveLoanAccountAdapter

GET - /ftl-api/api/v1/loans/{accountNumber}, flexifin-ftl-api

ReservePayment, ReceiveDebitPull, SendPayment, ReceivedPayment, DisburseFTL - Workflow, RetrieveRCPAccountAdapter

GET - /rcp-query/api/v1/accounts/{accountNumber}, flexifin-rcp-query