transaction_id string | timestamp_utc string | amount_usd float64 | merchant_category string | payment_method string | card_country string | ip_country string | distance_from_home_km float64 | txn_count_24h int64 | account_age_days int64 | is_new_merchant bool | is_fraud int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
TXN-0001 | 2026-09-14T09:12:04Z | 42.8 | grocery | card_present | US | US | 1.2 | 2 | 812 | false | 0 |
TXN-0002 | 2026-09-14T11:47:31Z | 18.25 | coffee_shop | card_present | US | US | 0.4 | 3 | 1,503 | false | 0 |
TXN-0003 | 2026-09-14T23:58:12Z | 1,875 | electronics | card_not_present | US | RO | 4,820 | 7 | 96 | true | 1 |
TXN-0004 | 2026-09-15T02:31:55Z | 640 | gift_cards | card_not_present | US | NG | 6,100 | 11 | 12 | true | 1 |
TXN-0005 | 2026-09-15T08:05:19Z | 76.4 | pharmacy | card_present | US | US | 2.7 | 1 | 2,210 | false | 0 |
TXN-0006 | 2026-09-15T13:22:47Z | 230.15 | restaurant | card_present | US | US | 6.5 | 4 | 448 | true | 0 |
TXN-0007 | 2026-09-15T19:44:02Z | 12.99 | streaming | card_not_present | US | US | 0 | 1 | 1,890 | false | 0 |
TXN-0008 | 2026-09-16T01:07:38Z | 3,100 | crypto_exchange | card_not_present | US | UA | 5,920 | 14 | 5 | true | 1 |
TXN-0009 | 2026-09-16T03:52:11Z | 890 | travel | card_not_present | US | BR | 7,300 | 9 | 63 | true | 1 |
TXN-0010 | 2026-09-16T16:18:26Z | 55.3 | gas_station | card_present | US | US | 3.1 | 2 | 967 | false | 0 |
Synthetic Fraud Detection Demo (10 samples)
Ten hand-written synthetic card-transaction records for smoke-testing a fraud-detection pipeline: loading, schema validation, feature engineering, and a demo UI.
This is not training or evaluation data. Ten rows cannot support a model, and the class balance here (4 fraud / 6 legitimate, 40%) is nothing like real card fraud prevalence, which is roughly 0.1β0.5%.
Loading
from datasets import load_dataset
ds = load_dataset("abidlabs/synthetic-fraud-demo", split="train")
print(ds.to_pandas())
Schema
| column | type | description |
|---|---|---|
transaction_id |
string | Unique transaction identifier |
timestamp_utc |
string | ISO-8601 authorization timestamp (UTC) |
amount_usd |
float | Transaction amount in US dollars |
merchant_category |
string | Merchant category code group |
payment_method |
string | card_present or card_not_present |
card_country |
string | ISO-3166 alpha-2 country of the card issuer |
ip_country |
string | ISO-3166 alpha-2 country of the originating IP |
distance_from_home_km |
float | Distance between the transaction and the cardholder's home |
txn_count_24h |
int | Number of transactions on the card in the preceding 24 hours |
account_age_days |
int | Age of the account at authorization time |
is_new_merchant |
bool | Whether this is the first transaction with the merchant |
is_fraud |
int | Label: 1 = confirmed fraud, 0 = legitimate |
How the label was assigned
The label is deliberately correlated with the features, so the set is learnable: fraudulent rows are card-not-present, have a card/IP country mismatch, are far from home, show high 24-hour velocity, belong to young accounts, and go to new merchants. Legitimate rows are mostly card-present, local, and on established accounts. A model trained on this will separate the two easily β which is the point for a pipeline test and useless as a signal-quality claim.
Notes
- All records are synthetic. No real cardholder data is involved.
- Timestamps span 2026-09-14 to 2026-09-16, so the rows have a usable time ordering.
- Downloads last month
- 33