Skip to content

Refund-workflow

Initialize Refund

sequenceDiagram
    autonumber
    participant HydraWeb
    participant HydraApi
    participant PspApi
    participant PspRefundService
    participant PspDB
    participant PaymentService
    participant RebtelOrderService
    participant ServiceBus
    HydraWeb->>HydraApi: Refund userid/transactionid
    HydraApi->>PspApi: Refund userid/transactionid
    PspApi->>PspRefundService: RefundTransactionRequest
    alt fiserv tx
      PspRefundService->>PspDB: GetTransaction
    else processout tx
      PspRefundService->>PspDB: GetOrder
    end
    PspRefundService->>PspDB: Save Refund Entity
    alt fiserve tx
      PspRefundService->>PaymentService: Refund
    else processout tx
      PspRefundService->>RebtelOrderService: Refund
    end
    par fiserv tx
        PaymentService-) ServiceBus: PaymentRefundedEvent 
    and processout tx
        RebtelOrderService-) ServiceBus: PaymentRefundedRequestMinorityEvent
    end

Processing Refund

Refund is processed by third parties and they send events to Psp

sequenceDiagram
    autonumber
    participant PaymentService
    participant RebtelOrderService
    participant ServiceBus

    par fiserv tx
        PaymentService-) ServiceBus: PaymentRefundedEvent 
    and processout tx
        RebtelOrderService-) ServiceBus: PaymentRefundedRequestMinorityEvent
    end

Complete Refund [Not finished yet]

Complete Refund is triggerred by events

sequenceDiagram
    autonumber
    participant ServiceBus
    participant PspRefundService    

    par fiserv tx
        ServiceBus -) PspRefundService: PaymentRefundedEvent 
    and processout tx
        ServiceBus -) PspRefundService: PaymentRefundedRequestMinorityEvent
    end