Database Architecture

Visualisasi skema inti untuk QRIS transaction processing, merchant hierarchy, dan settlement tracking.

Cara Baca Halaman

1. KPI untuk konteks trafik dan merchant aktif.
2. ERD untuk relasi antartabel inti QRIS.
3. Detail Tabel untuk melihat semua kolom per tabel inti.

Total 24h

5

Success Rate

80.00%

Active Merchants

1

Outbox Pending/Failed

0

merchants

1

stores

2

terminals

2

qris_transactions

5

callback_logs

4

settlements

2

transaction_status_histories

4

transaction_query_logs

2

merchant_notification_outboxes

3

refunds

1

ERD Tables (Generated from Database)

Synced with migrations

Relationship Diagram

erDiagram
    QRIS_TRANSACTIONS ||--o{ CALLBACK_LOGS : "transaction_id"
    QRIS_TRANSACTIONS ||--|| MERCHANT_NOTIFICATION_OUTBOXES : "transaction_id"
    MERCHANTS ||--o{ QRIS_TRANSACTIONS : "merchant_id"
    STORES ||--o{ QRIS_TRANSACTIONS : "store_id"
    TERMINALS ||--o{ QRIS_TRANSACTIONS : "terminal_id"
    USERS ||--o{ QRIS_TRANSACTIONS : "user_id"
    QRIS_TRANSACTIONS ||--o{ REFUNDS : "transaction_id"
    QRIS_TRANSACTIONS ||--|| SETTLEMENTS : "transaction_id"
    MERCHANTS ||--o{ STORES : "merchant_id"
    STORES ||--o{ TERMINALS : "store_id"
    QRIS_TRANSACTIONS ||--o{ TRANSACTION_QUERY_LOGS : "transaction_id"
    QRIS_TRANSACTIONS ||--o{ TRANSACTION_STATUS_HISTORIES : "transaction_id"
merchants
Lihat semua kolom (8)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • merchant_id : varchar(255) (FK) [NOT NULL]
  • merchant_name : varchar(255) [NOT NULL]
  • email : varchar(255)
  • phone : varchar(255)
  • address : text
  • created_at : timestamp
  • updated_at : timestamp
stores
Lihat semua kolom (7)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • merchant_id : bigint(20) unsigned (FK) [NOT NULL]
  • store_id : varchar(255) (FK) [NOT NULL]
  • store_name : varchar(255) [NOT NULL]
  • address : text
  • created_at : timestamp
  • updated_at : timestamp
terminals
Lihat semua kolom (6)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • store_id : bigint(20) unsigned (FK) [NOT NULL]
  • terminal_id : varchar(255) (FK) [NOT NULL]
  • terminal_type : varchar(255)
  • created_at : timestamp
  • updated_at : timestamp
qris_transactions
Lihat semua kolom (22)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • merchant_id : bigint(20) unsigned (FK) [NOT NULL]
  • store_id : bigint(20) unsigned (FK)
  • terminal_id : bigint(20) unsigned (FK)
  • user_id : bigint(20) unsigned (FK)
  • partner_reference_no : varchar(255) [NOT NULL]
  • manjo_reference_no : varchar(255)
  • external_id : varchar(255) (FK) [NOT NULL]
  • transaction_no : varchar(255) [NOT NULL]
  • amount : decimal(15,2) [NOT NULL]
  • currency : varchar(3) [NOT NULL]
  • status : enum('PENDING','SUCCESS','FAILED','EXPIRED','REJECTED') [NOT NULL]
  • qris_data : longtext
  • paid_at : datetime
  • expired_at : datetime
  • query_attempt_count : int(10) unsigned [NOT NULL]
  • last_queried_at : datetime
  • next_query_at : datetime
  • last_error_code : varchar(16)
  • last_error_message : varchar(255)
  • created_at : timestamp
  • updated_at : timestamp
callback_logs
Lihat semua kolom (14)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • transaction_id : bigint(20) unsigned (FK) [NOT NULL]
  • callback_type : varchar(255)
  • raw_payload : longtext [NOT NULL]
  • response_code : varchar(16)
  • response_message : varchar(255)
  • signature_valid : tinyint(1) [NOT NULL]
  • is_duplicate : tinyint(1) [NOT NULL]
  • process_status : varchar(255) [NOT NULL]
  • retry_count : int(10) unsigned [NOT NULL]
  • received_at : timestamp
  • processed_at : timestamp
  • created_at : timestamp
  • updated_at : timestamp
settlements
Lihat semua kolom (9)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • transaction_id : bigint(20) unsigned (FK) [NOT NULL]
  • settlement_ref : varchar(255)
  • settle_amount : decimal(15,2) [NOT NULL]
  • fee_amount : decimal(15,2) [NOT NULL]
  • settlement_date : datetime
  • settlement_status : enum('PENDING','SETTLED','FAILED') [NOT NULL]
  • created_at : timestamp
  • updated_at : timestamp
transaction_status_histories
Lihat semua kolom (10)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • transaction_id : bigint(20) unsigned (FK) [NOT NULL]
  • old_status : varchar(32)
  • new_status : varchar(32) [NOT NULL]
  • source : varchar(255)
  • reason_code : varchar(16)
  • reason_message : varchar(255)
  • changed_at : timestamp
  • created_at : timestamp
  • updated_at : timestamp
transaction_query_logs
Lihat semua kolom (9)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • transaction_id : bigint(20) unsigned (FK) [NOT NULL]
  • attempt_no : int(10) unsigned [NOT NULL]
  • query_result_code : varchar(16)
  • query_result_message : varchar(255)
  • duration_ms : int(10) unsigned
  • queried_at : datetime
  • created_at : timestamp
  • updated_at : timestamp
merchant_notification_outboxes
Lihat semua kolom (11)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • transaction_id : bigint(20) unsigned (FK) [NOT NULL]
  • destination_url : varchar(255)
  • payload : longtext
  • delivery_status : enum('PENDING','SENT','FAILED') [NOT NULL]
  • retry_count : int(10) unsigned [NOT NULL]
  • next_retry_at : datetime
  • last_error : text
  • delivered_at : datetime
  • created_at : timestamp
  • updated_at : timestamp
refunds
Lihat semua kolom (11)
  • id : bigint(20) unsigned (PK) [NOT NULL]
  • transaction_id : bigint(20) unsigned (FK) [NOT NULL]
  • refund_reference_no : varchar(255) [NOT NULL]
  • refund_amount : decimal(15,2) [NOT NULL]
  • refund_status : enum('PENDING','SUCCESS','FAILED') [NOT NULL]
  • requested_at : datetime
  • processed_at : datetime
  • response_code : varchar(16)
  • response_message : varchar(255)
  • created_at : timestamp
  • updated_at : timestamp

FK Relationships

callback_logs.transaction_id

belongs to (1:N)

qris_transactions.id

merchant_notification_outboxes.transaction_id

belongs to (1:1)

qris_transactions.id

qris_transactions.merchant_id

belongs to (1:N)

merchants.id

qris_transactions.store_id

belongs to (1:N)

stores.id

qris_transactions.terminal_id

belongs to (1:N)

terminals.id

qris_transactions.user_id

belongs to (1:N)

users.id

refunds.transaction_id

belongs to (1:N)

qris_transactions.id

settlements.transaction_id

belongs to (1:1)

qris_transactions.id

stores.merchant_id

belongs to (1:N)

merchants.id

terminals.store_id

belongs to (1:N)

stores.id

transaction_query_logs.transaction_id

belongs to (1:N)

qris_transactions.id

transaction_status_histories.transaction_id

belongs to (1:N)

qris_transactions.id

Catatan Arsitektur

  • qris_transactions menjadi pusat relasi untuk log callback, query, settlement, outbox, history, dan refund.
  • Relasi merchant -> store -> terminal dipakai saat terminal-level transaction diterapkan.
  • Data di panel ini langsung membaca metadata schema, bukan hardcoded.