Skip to content
Merged
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
CHANGELOG
=========

4.5.1
------------------

* Updated the documentation for the email and phone verification inputs. Set
`wasVerificationSuccessful` and `phoneWasVerificationSuccessful` to `true`
if your system considers the email address or phone number verified as of
the time of the event. Set them to `false` if it is not verified, for

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "Set them to false if it is not verified, for example if its only verification is pending or failed." Here "them" is the two fields, but "it" and "its" are the email address or phone number, which this sentence does not name. A reader can think "it" is the field.

Suggest: "Set them to false if the email address or phone number is not verified, for example if its only verification is pending or failed."

🤖 Comment by Claude Opus 5.5.

example if its only verification is pending or failed. If your system does
not track verification, leave them unset. Set a verification time only when

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important: This entry does not say that the method and the time changed meaning since 4.5.0.

  • phoneVerificationMethod was "the most recent method used". Now it is the method of the most recent completed verification. The method of an attempt is allowed only when the phone number is not verified.
  • Email.verificationTime was "the most recent attempt to verify the email address". Now it is the time that the user completed the verification.

The entry says only "Set a verification time only when the value is true." An integrator who follows the 4.5.0 docs can read this, change only the boolean, and keep sending the method and time of the newest attempt. Example: SMS verification succeeds in January, and a NETWORK re-verification fails in March. The integrator sends true with NETWORK and the March time. The flag and the method and time then describe different events.

Suggest adding: "The verification method and time now describe the most recent completed verification, not the most recent attempt. If the email address or phone number is not verified, you can set the method of the most recent attempt."

🤖 Comment by Claude Opus 5.5.

the value is `true`. There are no code changes.

4.5.0 (2026-11-18)
------------------

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ Transaction request = new Transaction.Builder(
.phoneNumber("313-545-3113")
.phoneCountryCode("1")
.phoneVerificationMethod(Shipping.PhoneVerificationMethod.NETWORK)
.phoneVerificationTime(ZonedDateTime.parse("2026-10-02T09:15:00Z"))
.phoneWasVerificationSuccessful(false)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This PR removes the time from this example because a time now goes only with true. The test fixtures that copy this example still set a time with false:

  • src/test/java/com/maxmind/minfraud/request/RequestTestHelper.java:110-112 (shipping: NETWORK, false, 2026-10-02T09:15:00Z)
  • src/test/resources/test-data/full-request.json:47-49
  • src/test/resources/test-data/full-request-email-md5.json:47-49
  • src/test/java/com/maxmind/minfraud/request/AbstractLocationTest.java:133-135
  • src/test/java/com/maxmind/minfraud/request/EmailTest.java:342-343

The tests still pass, because the library does not check the pairing. But these are the full-request reference payloads, and they now show usage that the docs tell people not to do. Suggest removing the time from the false cases, or changing those cases to true.

🤖 Comment by Claude Opus 5.5.

.deliverySpeed(Shipping.DeliverySpeed.EXPEDITED)
.address("32 Washington Ave.")
Expand Down
40 changes: 26 additions & 14 deletions src/main/java/com/maxmind/minfraud/request/AbstractLocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ public final T phoneNumber(String number) {
}

/**
* @param method The most recent method used to verify the phone number associated with
* the address. Do not set this if no verification was attempted.
* @param method The method used for the most recent completed verification of the phone
* number associated with the address. If the phone number is not verified,
* you can set the method of the most recent attempt if your system records
* it. Do not set this if you did not try to verify the phone number.
* @return The builder object.
*/
public final T phoneVerificationMethod(PhoneVerificationMethod method) {
Expand All @@ -184,9 +186,16 @@ public final T phoneVerificationMethod(PhoneVerificationMethod method) {
}

/**
* @param wasSuccessful Whether the most recent verification of the phone number
* associated with the address succeeded. Do not set this if no
* verification was attempted.
* @param wasSuccessful Whether the end user has verified that they control the phone
* number associated with the address, as of the time of the event.
* Set this to {@code true} if your system considers the phone
* number verified as of the time of the event. An earlier completed
* verification still counts, even if a newer attempt is pending or
* failed. Set it to {@code false} if the phone number is not
* verified. This includes one whose only verification is pending or
* failed, and one that you did not try to verify. Leaving this
* unset is not equivalent to {@code false}. If your system does not
* track phone verification, leave this unset.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important: This Javadoc leaves out two parts of the new reference text. The OpenAPI text (maxmind/openapi#28) says:

If your system tracks phone verification, send true or false for every request that includes this phone number. If your system does not track phone verification, leave this field out. The choice can affect risk scores.

Here, the "every request that includes this phone number" rule and "The choice can affect risk scores." are missing. Without the first sentence, an integrator can send the value only on some requests, for example only at sign-up, and leave it unset on later requests. The text says that unset is not the same as false, so those later requests send "unknown" for a phone number whose status the merchant knows.

Suggest adding, after "Leaving this unset is not equivalent to {@code false}.": "If your system tracks phone verification, set this to {@code true} or {@code false} for every request that includes this phone number." Then end with "The choice can affect risk scores." Make the same change to Email.Builder.wasVerificationSuccessful (Email.java:416-418), with "email address".

🤖 Comment by Claude Opus 5.5.

* @return The builder object.
*/
public final T phoneWasVerificationSuccessful(Boolean wasSuccessful) {
Expand All @@ -195,10 +204,12 @@ public final T phoneWasVerificationSuccessful(Boolean wasSuccessful) {
}

/**
* @param time The date and time of the most recent verification of the phone number
* associated with the address. The time must not be before
* 1970-01-01T00:00:00Z or more than two days in the future. The web
* service ignores a time outside this range and returns a warning.
* @param time The date and time that the end user completed the most recent
* verification of the phone number associated with the address, if
* known. Set this only if {@code phoneWasVerificationSuccessful} is
* {@code true}. The time must not be before 1970-01-01T00:00:00Z or
* more than two days in the future. The web service ignores a time
* outside this range and returns a warning.
* @return The builder object.
*/
public final T phoneVerificationTime(ZonedDateTime time) {
Expand Down Expand Up @@ -303,25 +314,26 @@ public final String phoneCountryCode() {
}

/**
* @return The most recent method used to verify the phone number associated with the address
* @return The method used for the most recent completed verification of the phone number
* associated with the address, or for the most recent attempt if it is not verified
*/
@JsonProperty("phone_verification_method")
public final PhoneVerificationMethod phoneVerificationMethod() {
return phoneVerificationMethod;
}

/**
* @return Whether the most recent verification of the phone number associated with the
* address succeeded
* @return Whether the end user has verified that they control the phone number associated
* with the address, as of the time of the event
*/
@JsonProperty("phone_was_verification_successful")
public final Boolean phoneWasVerificationSuccessful() {
return phoneWasVerificationSuccessful;
}

/**
* @return The date and time of the most recent verification of the phone number associated
* with the address
* @return The date and time that the end user completed the most recent verification of
* the phone number associated with the address
*/
@JsonProperty("phone_verification_time")
public final ZonedDateTime phoneVerificationTime() {
Expand Down
31 changes: 20 additions & 11 deletions src/main/java/com/maxmind/minfraud/request/Email.java
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,11 @@ public Email.Builder domain(String domain) {
}

/**
* @param time The date and time of the most recent attempt to verify the email address,
* if known. The time must not be before 1970-01-01T00:00:00Z or more than
* two days in the future. The web service ignores a time outside this range
* and returns a warning.
* @param time The date and time that the end user completed the most recent
* verification of the email address, if known. Set this only if
* {@code wasVerificationSuccessful} is {@code true}. The time must not be
* before 1970-01-01T00:00:00Z or more than two days in the future. The web
* service ignores a time outside this range and returns a warning.
* @return The builder object.
*/
public Email.Builder verificationTime(ZonedDateTime time) {
Expand All @@ -404,10 +405,17 @@ public Email.Builder verificationTime(ZonedDateTime time) {
}

/**
* @param wasSuccessful Whether the most recent verification that the end user controls
* the email address succeeded, for example by confirming a link
* sent to the address. Do not set this if no verification was
* attempted.
* @param wasSuccessful Whether the end user has verified that they control the email
* address, as of the time of the event, for example by confirming a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "for example by confirming a link sent to the address" now comes after "as of the time of the event". So it reads as an example of the time, not of how the user verified that they control the address.

Suggest moving the example to its own sentence, as the OpenAPI text does: "Whether the end user has verified that they control the email address, as of the time of the event. For example, the user confirmed a link sent to the address."

🤖 Comment by Claude Opus 5.5.

* link sent to the address. Set this to {@code true} if your system
* considers the email address verified as of the time of the event.
* An earlier completed verification still counts, even if a newer
* attempt is pending or failed. Set it to {@code false} if the
* email address is not verified. This includes one whose only
* verification is pending or failed, and one that you did not try
* to verify. Leaving this unset is not equivalent to {@code false}.
* If your system does not track email verification, leave this
* unset.
* @return The builder object.
*/
public Email.Builder wasVerificationSuccessful(Boolean wasSuccessful) {
Expand Down Expand Up @@ -605,16 +613,17 @@ public String domain() {
}

/**
* @return The date and time of the most recent attempt to verify the email address.
* @return The date and time that the end user completed the most recent verification of
* the email address.
*/
@JsonProperty("verification_time")
public ZonedDateTime verificationTime() {
return verificationTime;
}

/**
* @return Whether the most recent verification that the end user controls the email
* address succeeded.
* @return Whether the end user has verified that they control the email address, as of
* the time of the event.
*/
@JsonProperty("was_verification_successful")
public Boolean wasVerificationSuccessful() {
Expand Down
Loading