From 0399735da3f3da810c3badfd2029b04644339af2 Mon Sep 17 00:00:00 2001 From: Raghu Kumar Date: Thu, 27 Aug 2026 14:00:10 -0700 Subject: [PATCH 1/2] [NEB-4779] Add KYC, geo, and bot-detection structured fields --- CHANGES.md | 5 +++++ README.md | 17 +++++++++++++++++ sift/version.py | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 31c250b..0c45522 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +6.1.0 2026-08-27 +================ + +- Added support for KYC, geo, and bot-detection structured fields ($nationality, $year_of_birth, $kyc, $geo, $bot_identification) on existing event types + 6.0.0 2025-05-05 ================ diff --git a/README.md b/README.md index 5bc94c5..5e158d3 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,23 @@ properties = { }, "$currency_code": "USD", "$amount": 15230000, + # Identity / KYC signals + "$kyc": { + "$names_match": True, + "$kyc_level": "$basic", # "$basic" or "$full" + "$bin_nationality_match": True, + "$provider": "lexisnexis", + }, + # Geo/compliance signals + "$geo": { + "$uuid": "gc-abc-123", + "$provider": "geocomply", + }, + # Bot detection signals + "$bot_identification": { + "$result": "$human", # "$bot", "$human", or "$suspected" + "$provider": "datadome", + }, } try: diff --git a/sift/version.py b/sift/version.py index ad368aa..402513f 100644 --- a/sift/version.py +++ b/sift/version.py @@ -1,2 +1,2 @@ -VERSION = "6.0.0" +VERSION = "6.1.0" API_VERSION = "205" From 14ddbc35dfb29a6c94594e86dde1665ce12e259d Mon Sep 17 00:00:00 2001 From: Raghu Kumar Date: Wed, 2 Sep 2026 08:51:01 -0700 Subject: [PATCH 2/2] Address review: add integration test fixtures, refine CHANGES.md --- CHANGES.md | 4 +- .../events_api/test_events_api.py | 92 +++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 0c45522..8a256aa 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,9 @@ 6.1.0 2026-08-27 ================ -- Added support for KYC, geo, and bot-detection structured fields ($nationality, $year_of_birth, $kyc, $geo, $bot_identification) on existing event types +- Added support for `$nationality`, `$year_of_birth` fields on `$create_account`, `$update_account` events +- Added support for `$kyc` field on `$create_account`, `$update_account`, `$transaction`, `$create_order`, `$update_order`, `$verification` events +- Added support for `$geo`, `$bot_identification` fields on `$create_account`, `$update_account`, `$login`, `$transaction`, `$create_order`, `$update_order` events 6.0.0 2025-05-05 ================ diff --git a/test_integration_app/events_api/test_events_api.py b/test_integration_app/events_api/test_events_api.py index 3a065f5..2194343 100644 --- a/test_integration_app/events_api/test_events_api.py +++ b/test_integration_app/events_api/test_events_api.py @@ -158,6 +158,23 @@ def create_account(self) -> sift.client.Response: ], "$social_sign_on_type": "$twitter", "$account_types": ["merchant", "premium"], + # Structured fields (KYC / geo / bot detection) + "$nationality": "US", + "$year_of_birth": 1985, + "$kyc": { + "$names_match": True, + "$kyc_level": "$basic", + "$bin_nationality_match": True, + "$provider": "lexisnexis", + }, + "$geo": { + "$uuid": "gc-abc-123", + "$provider": "geocomply", + }, + "$bot_identification": { + "$result": "$human", + "$provider": "datadome", + }, # Suggested Custom Fields "twitter_handle": "billyjones", "work_phone": "1-347-555-5921", @@ -541,6 +558,20 @@ def build_create_order_event(self) -> dict[str, t.Any]: }, } ], + # Structured fields (KYC / geo / bot detection) + "$kyc": { + "$names_match": True, + "$kyc_level": "$basic", + "$provider": "lexisnexis", + }, + "$geo": { + "$uuid": "gc-abc-123", + "$provider": "geocomply", + }, + "$bot_identification": { + "$result": "$human", + "$provider": "datadome", + }, # Sample Custom Fields "digital_wallet": "apple_pay", # "google_wallet", etc. "coupon_code": "dollarMadness", @@ -595,6 +626,15 @@ def login(self) -> sift.client.Response: "$brand_name": "sift", "$site_domain": "sift.com", "$site_country": "US", + # Structured fields (geo / bot detection) + "$geo": { + "$uuid": "gc-abc-123", + "$provider": "geocomply", + }, + "$bot_identification": { + "$result": "$human", + "$provider": "datadome", + }, # Send this information with a login from a BROWSER client. "$browser": { "$user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36", @@ -761,6 +801,20 @@ def transaction(self) -> sift.client.Response: "$session_id": "gigtleqddo84l8cm15qe4il", # For marketplaces, use $seller_user_id to identify the seller "$seller_user_id": "slinkys_emporium", + # Structured fields (KYC / geo / bot detection) + "$kyc": { + "$names_match": True, + "$bin_nationality_match": False, + "$provider": "prove", + }, + "$geo": { + "$uuid": "gc-abc-123", + "$provider": "geocomply", + }, + "$bot_identification": { + "$result": "$human", + "$provider": "human_security", + }, # Sample Custom Fields "digital_wallet": "apple_pay", # "google_wallet", etc. "coupon_code": "dollarMadness", @@ -816,6 +870,23 @@ def update_account(self) -> sift.client.Response: }, "$social_sign_on_type": "$twitter", "$account_types": ["merchant", "premium"], + # Structured fields (KYC / geo / bot detection) + "$nationality": "US", + "$year_of_birth": 1985, + "$kyc": { + "$names_match": True, + "$kyc_level": "$full", + "$bin_nationality_match": True, + "$provider": "prove", + }, + "$geo": { + "$uuid": "gc-abc-123", + "$provider": "geocomply", + }, + "$bot_identification": { + "$result": "$human", + "$provider": "datadome", + }, # Send this information from a BROWSER client. "$browser": { "$user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36", @@ -1226,6 +1297,20 @@ def update_order(self) -> sift.client.Response: }, } ], + # Structured fields (KYC / geo / bot detection) + "$kyc": { + "$names_match": True, + "$kyc_level": "$basic", + "$provider": "lexisnexis", + }, + "$geo": { + "$uuid": "gc-abc-123", + "$provider": "geocomply", + }, + "$bot_identification": { + "$result": "$human", + "$provider": "datadome", + }, # Sample Custom Fields "digital_wallet": "apple_pay", # "google_wallet", etc. "coupon_code": "dollarMadness", @@ -1284,5 +1369,12 @@ def verification(self) -> sift.client.Response: "$reason": "$automated_rule", "$verification_type": "$sms", "$verified_value": "14155551212", + # Structured fields (KYC) + "$kyc": { + "$names_match": True, + "$kyc_level": "$basic", + "$bin_nationality_match": False, + "$provider": "lexisnexis", + }, } return self.client.track("$verification", verification_properties)