---
# System prepended metadata

title: Untitled
tags: [' Sequence Diagram', ogloba]

---

---
tags: ogloba, Sequence Diagram
---
 

## WSRG - Redeem
```mermaid
sequenceDiagram

participant Client
participant OGLOBA
participant ORION

Client ->> OGLOBA: Client request to redeem a card
OGLOBA ->> ORION: Call Orion GET_VOUCHER_BY_NUMBER API to check the card is used or not
alt Staus 110 
    ORION ->> OGLOBA: Card is usable
    OGLOBA ->> OGLOBA: Ogloba redeem SP
    OGLOBA ->> Client:　return result
else Status 120
    ORION ->> OGLOBA: Card is not usable
    OGLOBA ->> Client: return error
end
```

## WSRG - Confirm
```mermaid
sequenceDiagram

participant Client
participant OGLOBA
participant ORION

Client ->> OGLOBA: Client request to confirm the txn
OGLOBA ->> ORION: Call Orion USE_VOUCHER API to check the card is used or not
alt ErrorCode 0 
    ORION ->> OGLOBA: Update the status of a voucher to "used" successfully 
    OGLOBA ->> OGLOBA: Ogloba confirm SP
    OGLOBA ->> Client:　return result
else ErrorCode 100
    ORION ->> OGLOBA: Voucher doesn't exists
    OGLOBA ->> Client: return error
else ErrorCode 200
    ORION ->> OGLOBA: Voucher is already used
    OGLOBA ->> Client: return error
else ErrorCode 999
    ORION ->> OGLOBA: For any other error
    OGLOBA ->> Client: return error
end

```