- BREAKING CHANGE: The
minfraud.model.*
classes have been refactored to simplify them and make them more flexible. They are no longer subclass NamedTuple and are now standard Python classes. This also means the classes are no longer immutable. For most users, these differences should not impact their integration. - BREAKING CHANGE: Model attributes that were formerly tuples are now lists.
- BREAKING CHANGE: The deprecated is_high_risk attribute on resp.ip_address.country has been removed.
- IMPORTANT: Python 3.9 or greater is required. If you are using an older version, please use an earlier release.
- Added
to_dict
methods to the model classes. These return a dict version of the object that is suitable for serialization. It recursively callsto_dict
or the equivalent on all objects contained within the object. - The minFraud Factors subscores have been deprecated. They will be removed in March 2025. Please see our release notes for more information.
- Added
epayco
to the/payment/processor
validation.
setuptools
was incorrectly listed as a runtime dependency. This has been removed.- Added support for the new risk reasons outputs in minFraud Factors. The risk reasons output codes and reasons are currently in beta and are subject to change. We recommend that you use these beta outputs with caution and avoid relying on them for critical applications.
- Updated the validation for the Report Transactions API to make the
ip_address
parameter optional. Now thetag
and at least one of the following parameters must be supplied:ip_address
,maxmind_id
,minfraud_id
,transaction_id
. - Added
billing_phone
andshipping_phone
properties to the minFraud Insights and Factors response models. These contain objects with information about the respective phone numbers. Please see our developer site for more information. - Added
payconex
to the/payment/processor
validation.
- Added the following new values to the
/payment/processor
validation:pxp_financial
trustpay
- Equivalent domain names are now normalized when
hash_email
is used. For example,googlemail.com
will becomegmail.com
. - Periods are now removed from
gmail.com
email address local parts whenhash_email
is used. For example,[email protected]
will become[email protected]
. - Fastmail alias subdomain email addresses are now normalized when
hash_email
is used. For example,[email protected]
will become[email protected]
. - Additional
yahoo.com
email addresses now have aliases removed from their local part whenhash_email
is used. For example,[email protected]
will become[email protected]
for additionalyahoo.com
domains. - Duplicate
.com
s are now removed from email domain names whenhash_email
is used. For example,example.com.com
will becomeexample.com
. - Certain TLD typos are now normalized when
hash_email
is used. For example,example.comcom
will becomeexample.com
. - Additional
gmail.com
domain names with leading digits are now normalized whenhash_email
is used. For example,100gmail.com
will becomegmail.com
. - Additional
gmail.com
typos are now normalized whenhash_email
is used. For example,gmali.com
will becomegmail.com
. - When
hash_email
is used, the local part of an email address is now normalized to NFC.
- IMPORTANT: Python 3.8 or greater is required. If you are using an older version, please use an earlier release.
- Updated
geoip2
to version that includes theis_anycast
attribute ongeoip2.record.Traits
. This property isTrue
if the IP address belongs to an anycast network. This is available in minFraud Insights and Factors.
- IMPORTANT: Python 3.7 or greater is required. If you are using an older version, please use an earlier release.
- Added the following new values to the
/payment/processor
validation:google_pay
placetopay
shopify_payments
- Updated code to correctly handle
None
Content-Type
from minFraud web service. This should never happen, but if it does, the correct exception will now be thrown.
- Fixed
KeyError
when using thereport()
method. Reported by siang. GitHub #99.
- Added the input
/credit_card/country
. This is the country where the issuer of the card is located. This may be passed instead of/credit_card/issuer_id_number
if you do not wish to pass partial account numbers or if your payment processor does not provide them.
- Upgraded
geoip2
to 4.5.0. This adds mobile country code (MCC) and mobile network code (MNC) to minFraud Insights and Factors responses. These are available atresponse.ip_address.traits.mobile_country_code
andresponse.ip_address.traits.mobile_network_code
. We expect this data to be available by late January, 2022. - Added the following new values to the
/payment/processor
validation:boacompra
boku
coregateway
fiserv
neopay
neosurf
openbucks
paysera
payvision
trustly
windcave
- The
/credit_card/last_4_digits
input has been deprecated in favor of/credit_card/last_digits
and will be removed in a future release.last_digits
/last_4_digits
also now supports two digit values in addition to the previous four digit values. - Eight digit
/credit_card/issuer_id_number
inputs are now supported in addition to the previously accepted six digitissuer_id_number
. In most cases, you should send the last four digits forlast_digits
. If you send anissuer_id_number
that contains an eight digit IIN, and if the credit card brand is not one of the following, you should send the last two digits forlast_digits
:Discover
JCB
Mastercard
UnionPay
Visa
- Previously, the
py.typed
file was not being added to the source distribution. It is now explicitly specified in the manifest.
- Added the following new values to the
/payment/processor
validation:cardknox
creditguard
credorax
datacap
dlocal
onpay
safecharge
- Added
rule_label
to minFraud output/disposition
. - Added
was_3d_secure_successful
to/credit_card
validation
- In 2.2.0 and 2.3.0, a
KeyError
would be thrown if the response from the web service did not have theip_address
key but did contain the text "ip_address" in the JSON body. Reported and fixed by Justas-iDenfy. GitHub #78.
- You may now set a proxy to use when making web service requests by passing
the
proxy
parameter to theAsyncClient
orClient
constructor. - Added
apple_pay
andaps_payments
to the/payment/processor
validation. - You may now enable client-side email hashing by setting the keyword argument
hash_email
toTrue
in the web-service client request methods (i.e.,score
,insights
,factors
). When set, this normalizes the email address and sends an MD5 hash of it to the web service rather than the plain-text address. Note that the email domain will still be sent in plain text. - Added support for the IP address risk reasons in the minFraud Insights and
Factors responses. This is available at
.ip_address.risk_reasons
. It is an array ofIPRiskReason
objects.
- Added
tsys
to the/payment/processor
validation. - The device IP address is no longer a required input.
- Added
response.ip_address.traits.is_residential_proxy
to the minFraud Insights and Factors models. This indicates whether the IP address is on a suspected anonymizing network and belongs to a residential ISP. HTTPError
now provides the decoded response content in thedecoded_content
attribute.
- Added
py.typed
file per PEP 561. Reported by Árni Már Jónsson. GitHub #62. - Tightened
install_requirements
for dependencies to prevent a new major version from being installed.
- Fixed type annotation for
locales
inminfraud.webservice
to allow tuples of arbitrary length. Reported by Árni Már Jónsson. GitHub #60.
- Minor documentation fix.
- IMPORTANT: Python 2.7 and 3.5 support has been dropped. Python 3.6 or greater is required.
- Asyncio support has been added for web service requests. To make async
requests, use
minfraud.AsyncClient
. minfraud.Client
now provides aclose()
method and an associated context manager to be used inwith
statements.- For both
Client
andAsyncClient
requests, the default timeout is now 60 seconds. - Type hints have been added.
- Email validation is now done with
email_validator
rather thanvalidate_email
. - URL validation is now done with
urllib.parse
rather thanrfc3987
. - RFC 3339 timestamp validation is now done via a regular expression.
- Added the following new values to the
/payment/processor
validation:cashfree
first_atlantic_commerce
komoju
paytm
razorpay
systempay
- Added support for the following new subscores in Factors responses:
device
: the risk associated with the deviceemail_local_part
: the risk associated with the email address local partshipping_address
: the risk associated with the shipping address
- Fixes documentation that caused warnings when building a distribution.
- Added support for the Report Transactions API. We encourage use of this API as we use data received through this channel to continually improve the accuracy of our fraud detection algorithms.
- Added support for the new credit card output
/credit_card/is_business
. This indicates whether the card is a business card. It may be accessed viaresponse.credit_card.is_business
on the minFraud Insights and Factors response objects.
- Added support for the new email domain output
/email/domain/first_seen
. This may be accessed viaresponse.email.domain.first_seen
on the minFraud Insights and Factors response objects. - Added the following new values to the
/payment/processor
validation:cardpay
epx
- Added support for the new email output
/email/is_disposable
. This may be accessed via theis_disposable
attribute ofminfraud.models.Email
.
- The client-side validation for numeric custom inputs has been updated to match the server-side validation. The valid range is -9,999,999,999,999 to 9,999,999,999,999. Previously, larger numbers were allowed.
- Python 3.3 and 3.4 are no longer supported.
- Added the following new values to the
/payment/processor
validation:affirm
afterpay
cetelem
datacash
dotpay
ecommpay
g2a_pay
gocardless
interac
klarna
mercanet
payeezy
paylike
payment_express
paysafecard
smartdebit
synapsefi
- Deprecated the
email_tenure
andip_tenure
attributes ofminfraud.models.Subscores
. - Deprecated the
is_high_risk
attribute ofminfraud.models.GeoIP2Country
.
- Python 2.6 support has been dropped. Python 2.7+ or 3.3+ is now required.
- Renamed MaxMind user ID to account ID in the code and added support for the
new
ACCOUNT_ID_REQUIRED
error code. - Added the following new values to the
/payment/processor
validation:ccavenue
ct_payments
dalenys
oney
posconnect
- Added support for the
/device/local_time
output. - Added support for the
/credit_card/is_virtual
output. - Added
payout_change
to the/event/type
input validation.
- Updated
geoip2
dependency. This version adds theis_in_european_union
attribute togeoip2.record.Country
andgeoip2.record.RepresentedCountry
. This attribute isTrue
if the country is a member state of the European Union. - Added the following new values to the
/payment/processor
validation:cybersource
transact_pro
wirecard
- Added the following new values to the
/payment/processor
validation:bpoint
checkout_com
emerchantpay
heartland
payway
- Updated
geoip2
dependency to add support for GeoIP2 Precision Insights anonymizer fields.
- Added support for custom inputs. You may set up custom inputs from your account portal.
- Added the following new values to the
/payment/processor
validation:american_express_payment_gateway
bluesnap
commdoo
curopayments
ebs
exact
hipay
lemon_way
oceanpayment
paymentwall
payza
securetrading
solidtrust_pay
vantiv
vericheck
vpos
- Added the following new input values:
/device/session_age
and/device/session_id
. - Added support for the
/email/first_seen
output.
- Recent releases of
requests
(2.12.2 and 2.12.3) require that the username for basic authentication be a string or bytes. The documentation for this module uses an integer for theuser_id
, which will break with theserequests
versions. Theuser_id
is now converted to bytes before being passed torequests
. - Fixed test breakage on 3.6.
- Fixed
setup.py
on Python 2.
- The disposition was added to the minFraud response models. This is used to return the disposition of the transaction as set by the custom rules for the account.
- Fixed package's long description for display on PyPI.
- Allow
/credit_card/token
input.
- Added the following new values to the
/event/type
validation:email_change
andpassword_reset
.
- Added the following new values to the
/payment/processor
validation:concept_payments
,ecomm365
,orangepay
, andpacnet_services
. - ipaddress is now used for IP validation on Python 2 instead of ipaddr.
- BREAKING CHANGE:
credits_remaining
has been removed from the web service response model and has been replaced byqueries_remaining
. - Added
queries_remaining
andfunds_remaining
. Note thatfunds_remaining
will not be returned by the web service until our new credit system is in place. confidence
andlast_seen
were added to theDevice
response model.
- Added support for the minFraud Factors.
- Added IP address risk to the minFraud Score model.
- Added the following new values to the
/payment/processor
validation:ccnow
,dalpay
,epay
(replacesepayeu
),payplus
,pinpayments
,quickpay
, andverepay
. - A
PERMISSION_REQUIRED
error will now throw aPermissionRequiredError
exception.
- Added support for new minFraud Insights outputs. These are:
/credit_card/brand
/credit_card/type
/device/id
/email/is_free
/email/is_high_risk
input
on theWarning
response model has been replaced withinput_pointer
. The latter is a JSON pointer to the input that caused the warning.
- Added
is_gift
andhas_gift_message
to order input dictionary validation. - Request keys with
None
values are no longer validated or sent to the web service.
- First beta release.
- Initial release.