Skip to content

Add schema for simple payment fraud analytics #83

Description

@Chaffelson

The following schema is useful for simple payment fraud analysis, and used in this blog.
It would be good to have it as a general option in Mockingbird.

{
 "timestamp": {
   "type": "mockingbird.timestampNow"
 },
 "transaction_id": {
   "type": "finance.routingNumber"
 },
 "user_id": {
   "type": "mockingbird.pick",
   "params": [
     {
       "values": ["Mike", "John", "Jane", "Mary", "Bob", "Alice", "Joe", "Sue", "Ryan", "Jill", "Bill","Jen", "Jack", "Jill", "Tom", "Tim", "Tina", "Terry", "Troy", "Tara", "Tanya", "Trevor", "Tucker","Trent", "Trenton", "Mario"]
     }
   ]
 },
 "amount": {
   "type": "finance.amount"
 },
 "ip_address": {
   "type": "internet.ip"
 },
 "browser": {
   "type": "mockingbird.pickWeighted",
   "params": [
     {
       "values": ["Chrome", "Brave", "Firefox", "Safari"],
       "weights": [65, 3, 8, 20]
     }
   ]
 },
 "location": {
   "type": "mockingbird.pickWeighted",
   "params": [
     {
       "values": [ "USA", "Spain", "UK", "Australia", "Mexico", "China", "Japan", "Canada"],
       "weights": [65, 20, 8, 1, 3, 1, 1, 1]
     }
   ]
 },
 "is_declined": {
   "type": "mockingbird.pickWeighted",
   "params": [
     {
       "values": [true, false],
       "weights": [3, 98]
     }
   ]
 },
 "fraud_flag": {
   "type": "mockingbird.pick",
   "params": [
     {
       "values": [false]
     }
   ]
 }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions