offdataai
Banking & Financial Services · data model template

Payments & Card-Fraud Analytics data model

Kimball warehouse for payments and fraud: payment-transaction and authorization facts, merchant settlement, an accumulating chargeback snapshot, and fraud alerts over conformed customer, card, merchant, device, and fraud-rule dimensions — built for approval rates, chargeback ratios, and fraud-model performance.

Payments and card-fraud analytics covering multi-rail payment transactions, card authorizations with real-time fraud scoring, merchant settlement, the chargeback/dispute lifecycle, and fraud alerting — a Kimball star schema with conformed customer, card, and merchant dimensions where the PAN is tokenized and masked for PCI-DSS. It is a Kimball dimensional model: fact tables at a declared grain surrounded by conformed dimensions, ready for BI tools and a semantic layer.

KimballBanking & Financial ServicesPCI-DSSPSD2GDPR
13
tables
115
columns
22
relationships
6
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: BigQuery). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

paymentssettlementdisputesfraudconformed_dimensions

Design decisions

  • Tokenized card, never the raw PAN

    PCI-DSS forbids storing the primary account number in the clear; the card dimension holds a token (restricted, fully masked) plus the non-sensitive BIN and last-four.

  • Authorization separate from settled transaction

    Authorizations include declines and never-settled holds; keeping them distinct from settled payments supports approval-rate and decline analysis and real-time fraud scoring.

  • Accumulating snapshot for chargebacks

    A dispute progresses initiated → represented → won/lost with shifting liability; an accumulating snapshot captures resolution time and outcome for chargeback-ratio monitoring.

Tables in the Payments & Card-Fraud Analytics model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Fact tables (5)

fct_payment_transaction

Grain: one row per payment transaction

Transaction-grain payment event across rails.

ColumnTypeKeys
payment_transaction_keybigintPK
date_keybigint
customer_keybigint
card_keybigint
merchant_keybigint
payment_method_keybigint
channel_keybigint
device_keybigint
transaction_idvarchar
amountdecimal
amount_usd_equivalentdecimal
currencyvarchar
is_cross_borderboolean
is_recurringboolean

fct_authorization

Grain: one row per authorization request

Authorization-grain fact — approval and real-time fraud scoring.

ColumnTypeKeys
authorization_keybigintPK
date_keybigint
card_keybigint
merchant_keybigint
channel_keybigint
device_keybigint
authorization_idvarchar
authorization_amountdecimal
currencyvarchar
is_approvedboolean
response_codevarchar
decline_reasonvarchar
fraud_scoredecimal

fct_settlement

Grain: one row per merchant settlement batch line

Merchant settlement — daily batch funding.

ColumnTypeKeys
settlement_keybigintPK
date_keybigint
merchant_keybigint
batch_idvarchar
transaction_countinteger
gross_amountdecimal
interchange_feedecimal
processing_feedecimal
net_amountdecimal
currencyvarchar
settlement_statusvarchar

fct_chargeback

Grain: one row per chargeback / dispute (accumulating snapshot)

Accumulating snapshot of the dispute lifecycle.

ColumnTypeKeys
chargeback_keybigintPK
date_keybigint
card_keybigint
merchant_keybigint
resolution_date_keybigint
chargeback_idvarchar
reason_codevarchar
dispute_amountdecimal
currencyvarchar
dispute_statusvarchar
liabilityvarchar
days_to_resolutioninteger

fct_fraud_alert

Grain: one row per fraud alert

Fraud alerts and confirmed-loss outcomes for model tuning.

ColumnTypeKeys
fraud_alert_keybigintPK
date_keybigint
customer_keybigint
card_keybigint
fraud_rule_keybigint
device_keybigint
alert_idvarchar
alert_scoredecimal
alert_statusvarchar
dispositionvarchar
exposure_amountdecimal
confirmed_loss_amountdecimal

Dimension tables (5)

dim_date

Grain: one row per calendar day

ColumnTypeKeys
date_keybigintPK
full_datedateBK
month_numbersmallint
quartersmallint
yearsmallint
is_weekendboolean

dim_customer

Grain: one row per customer per SCD2 version

SCD type 2

ColumnTypeKeys
customer_keybigintPK
customer_idvarcharBK
first_namevarcharPII
last_namevarcharPII
emailvarcharPII
phonevarcharPII
countryvarchar
risk_segmentvarchar
account_tenure_daysinteger
is_activeboolean

dim_card

Grain: one row per card per SCD2 version

SCD type 2

ColumnTypeKeys
card_keybigintPK
card_idvarcharBK
card_tokenvarcharPII
card_binvarchar
last_fourvarcharPII
card_typevarchar
card_networkvarchar
issue_datedate
expiry_datedate
card_statusvarchar

dim_merchant

Grain: one row per merchant

ColumnTypeKeys
merchant_keybigintPK
merchant_idvarcharBK
merchant_namevarchar
mccvarchar
merchant_categoryvarchar
acquirer_namevarchar
countryvarchar
risk_levelvarchar

dim_device

Grain: one row per device fingerprint

ColumnTypeKeys
device_keybigintPK
device_idvarcharBK
device_typevarchar
operating_systemvarchar
ip_countryvarchar
is_trustedboolean

Lookup tables (3)

dim_payment_method

Grain: one row per payment method / rail

ColumnTypeKeys
payment_method_keybigintPK
method_codevarcharBK
method_namevarchar
is_real_timeboolean

dim_channel

Grain: one row per channel

ColumnTypeKeys
channel_keybigintPK
channel_codevarcharBK
channel_namevarchar
is_card_presentboolean

dim_fraud_rule

Grain: one row per fraud detection rule

ColumnTypeKeys
fraud_rule_keybigintPK
rule_codevarcharBK
rule_namevarchar
rule_categoryvarchar
default_severityvarchar

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • fct_payment_transaction.date_key → dim_date (many-to-one)
  • fct_payment_transaction.customer_key → dim_customer (many-to-one)
  • fct_payment_transaction.card_key → dim_card (many-to-one)
  • fct_payment_transaction.merchant_key → dim_merchant (many-to-one)
  • fct_payment_transaction.payment_method_key → dim_payment_method (many-to-one)
  • fct_payment_transaction.channel_key → dim_channel (many-to-one)
  • fct_payment_transaction.device_key → dim_device (many-to-one)
  • fct_authorization.date_key → dim_date (many-to-one)
  • fct_authorization.card_key → dim_card (many-to-one)
  • fct_authorization.merchant_key → dim_merchant (many-to-one)
  • fct_authorization.channel_key → dim_channel (many-to-one)
  • fct_authorization.device_key → dim_device (many-to-one)
  • fct_settlement.date_key → dim_date (many-to-one)
  • fct_settlement.merchant_key → dim_merchant (many-to-one)
  • fct_chargeback.date_key → dim_date (many-to-one)
  • fct_chargeback.card_key → dim_card (many-to-one)
  • fct_chargeback.merchant_key → dim_merchant (many-to-one)
  • fct_fraud_alert.date_key → dim_date (many-to-one)
  • fct_fraud_alert.customer_key → dim_customer (many-to-one)
  • fct_fraud_alert.card_key → dim_card (many-to-one)
  • fct_fraud_alert.fraud_rule_key → dim_fraud_rule (many-to-one)
  • fct_fraud_alert.device_key → dim_device (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time