Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ History
``phone_was_verification_successful``, and ``phone_verification_time``
inputs to the ``/billing`` request object. They describe the most recent
verification of the billing phone number.
* Added the ``was_verification_successful`` and ``verification_time`` inputs
to the ``/email`` request object. They describe the most recent
verification of the email address.

3.3.0 (2026-07-21)
++++++++++++++++++
Expand Down
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ Score, Insights and Factors Example
>>> },
>>> 'email': {
>>> 'address': '977577b140bfb7c516e4746204fbdb01',
>>> 'domain': 'maxmind.com'
>>> 'domain': 'maxmind.com',
>>> 'verification_time': '2026-10-01T14:25:00Z',
>>> 'was_verification_successful': True,
>>> },
>>> 'billing': {
>>> 'first_name': 'Jane',
Expand Down
2 changes: 2 additions & 0 deletions src/minfraud/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ def _uri(s: str) -> str:
"email": {
"address": _email_or_md5,
"domain": _hostname,
"verification_time": _rfc3339_datetime,
"was_verification_successful": bool,
},
"event": {
"party": _event_party,
Expand Down
4 changes: 3 additions & 1 deletion tests/data/full-transaction-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
},
"email": {
"address": "977577b140bfb7c516e4746204fbdb01",
"domain": "maxmind.com"
"domain": "maxmind.com",
"verification_time": "2026-10-01T14:25:00Z",
"was_verification_successful": true
},
"billing": {
"first_name": "First",
Expand Down
9 changes: 9 additions & 0 deletions tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,15 @@ def test_domain(self) -> None:
for bad in ("bad ", " bad.com"):
self.check_invalid_transaction({"email": {"domain": bad}})

def test_was_verification_successful(self) -> None:
self.check_bool("email", "was_verification_successful")

def test_verification_time(self) -> None:
for good in ("2015-05-08T16:07:56+00:00", "2015-05-08T16:07:56Z"):
self.check_transaction({"email": {"verification_time": good}})
for bad in ("2015-05-08T16:07:56", "2015-05-08 16:07:56Z"):
self.check_invalid_transaction({"email": {"verification_time": bad}})


class TestEvent(ValidationBase, unittest.TestCase):
def test_party(self) -> None:
Expand Down
Loading