diff --git a/.fern/metadata.json b/.fern/metadata.json
index 97957d82..b808b571 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -13,5 +13,5 @@
"enable-forward-compatible-enums": true,
"publish-to": "central"
},
- "sdkVersion": "46.1.0.20260122"
+ "sdkVersion": "46.1.0.20260520"
}
\ No newline at end of file
diff --git a/.fern/replay.lock b/.fern/replay.lock
new file mode 100644
index 00000000..4641bc99
--- /dev/null
+++ b/.fern/replay.lock
@@ -0,0 +1,10 @@
+# DO NOT EDIT MANUALLY - Managed by Fern Replay
+version: "1.0"
+generations:
+ - commit_sha: 057a56683ddf1e5007072397fc4221b8eda8676f
+ tree_hash: d77c090eed91cd634edf2d25d9a78cc98a391bdb
+ timestamp: 2026-05-19T21:19:34.660Z
+ cli_version: unknown
+ generator_versions: {}
+current_generation: 057a56683ddf1e5007072397fc4221b8eda8676f
+patches: []
diff --git a/.fernignore b/.fernignore
index 0dce8ae6..c234b7f8 100644
--- a/.fernignore
+++ b/.fernignore
@@ -6,3 +6,6 @@ src/main/java/com/squareup/square/core/SquareApiException.java
src/main/java/com/squareup/square/utilities/WebhooksHelper.java
src/test/resources/testdata
.github/workflows/ci.yml
+.fern/replay.lock
+.fern/replay.yml
+.gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..74928d6a
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+.fern/replay.lock linguist-generated=true
diff --git a/README.md b/README.md
index 51154439..6d9b3d4b 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ Add the dependency in your `pom.xml` file:
com.squareupsquare
- 46.1.0.20260122
+ 46.1.0.20260520
```
@@ -361,8 +361,8 @@ Gradle:
```groovy
dependencies {
- implementation 'com.squareup:square:46.1.0.20260122'
- implementation 'com.squareup:square-legacy:46.1.0.20260122'
+ implementation 'com.squareup:square:46.1.0.20260520'
+ implementation 'com.squareup:square-legacy:46.1.0.20260520'
}
```
@@ -372,12 +372,12 @@ Maven:
com.squareupsquare
- 46.1.0.20260122
+ 46.1.0.20260520com.squareupsquare-legacy
- 46.1.0.20260122
+ 46.1.0.20260520
```
diff --git a/build.gradle b/build.gradle
index 7fb73bdf..92366215 100644
--- a/build.gradle
+++ b/build.gradle
@@ -47,7 +47,7 @@ java {
group = 'com.squareup'
-version = '46.1.0.20260122'
+version = '46.1.0.20260520'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.squareup'
artifactId = 'square'
- version = '46.1.0.20260122'
+ version = '46.1.0.20260520'
from components.java
pom {
name = 'square'
diff --git a/reference.md b/reference.md
index 9e8d4775..b516def7 100644
--- a/reference.md
+++ b/reference.md
@@ -11539,6 +11539,19 @@ For more information, see [Permissions](https://developer.squareup.com/docs/paym
+**appFeeAllocations:** `Optional>`
+
+Details pertaining to recipients of the application fee. The sum of the amounts in the
+app_fee_allocations must equal the app_fee_money amount, if present. If populated, an
+allocation must be present for every party that expects to receive a portion of the application
+fee, including the application developer.
+
+
+
+
+
+
+
**delayDuration:** `Optional`
The duration of time after the payment's creation when Square automatically
@@ -12769,6 +12782,19 @@ For more information, see [Permissions](https://developer.squareup.com/docs/paym
+**appFeeAllocations:** `Optional>`
+
+Details pertaining to contributors to the refund of the application fee.
+The sum of the amounts in the app_fee_allocations must equal the app_fee_money amount, if
+present. If populated, an allocation must be present for every party that expects to contribute
+a portion of the refunded application fee, including the application developer.
+
+
+
+
+
+
+
**paymentId:** `Optional`
The unique ID of the payment being refunded.
diff --git a/src/main/java/com/squareup/square/AsyncSquareClientBuilder.java b/src/main/java/com/squareup/square/AsyncSquareClientBuilder.java
index 1bf8d661..1be6dfee 100644
--- a/src/main/java/com/squareup/square/AsyncSquareClientBuilder.java
+++ b/src/main/java/com/squareup/square/AsyncSquareClientBuilder.java
@@ -20,7 +20,7 @@ public class AsyncSquareClientBuilder {
private String token = System.getenv("SQUARE_TOKEN");
- private String version = "2026-01-22";
+ private String version = "2026-05-20";
private Environment environment = Environment.PRODUCTION;
diff --git a/src/main/java/com/squareup/square/SquareClientBuilder.java b/src/main/java/com/squareup/square/SquareClientBuilder.java
index adc5469e..9b8ee1fc 100644
--- a/src/main/java/com/squareup/square/SquareClientBuilder.java
+++ b/src/main/java/com/squareup/square/SquareClientBuilder.java
@@ -20,7 +20,7 @@ public class SquareClientBuilder {
private String token = System.getenv("SQUARE_TOKEN");
- private String version = "2026-01-22";
+ private String version = "2026-05-20";
private Environment environment = Environment.PRODUCTION;
diff --git a/src/main/java/com/squareup/square/core/ClientOptions.java b/src/main/java/com/squareup/square/core/ClientOptions.java
index c0b18131..f1d3f7d7 100644
--- a/src/main/java/com/squareup/square/core/ClientOptions.java
+++ b/src/main/java/com/squareup/square/core/ClientOptions.java
@@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.squareup:square/46.1.0.20260122");
+ put("User-Agent", "com.squareup:square/46.1.0.20260520");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.square.fern:api-sdk");
- put("X-Fern-SDK-Version", "46.1.0.20260122");
+ put("X-Fern-SDK-Version", "46.1.0.20260520");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/squareup/square/types/CardPaymentDetails.java b/src/main/java/com/squareup/square/types/CardPaymentDetails.java
index 045181b7..66b5baa3 100644
--- a/src/main/java/com/squareup/square/types/CardPaymentDetails.java
+++ b/src/main/java/com/squareup/square/types/CardPaymentDetails.java
@@ -53,6 +53,10 @@ public final class CardPaymentDetails {
private final Optional> errors;
+ private final Optional appliedCardSurchargeDetails;
+
+ private final Optional walletType;
+
private final Map additionalProperties;
private CardPaymentDetails(
@@ -72,6 +76,8 @@ private CardPaymentDetails(
Optional cardPaymentTimeline,
Optional refundRequiresCardPresence,
Optional> errors,
+ Optional appliedCardSurchargeDetails,
+ Optional walletType,
Map additionalProperties) {
this.status = status;
this.card = card;
@@ -89,6 +95,8 @@ private CardPaymentDetails(
this.cardPaymentTimeline = cardPaymentTimeline;
this.refundRequiresCardPresence = refundRequiresCardPresence;
this.errors = errors;
+ this.appliedCardSurchargeDetails = appliedCardSurchargeDetails;
+ this.walletType = walletType;
this.additionalProperties = additionalProperties;
}
@@ -231,6 +239,26 @@ public Optional> getErrors() {
return errors;
}
+ /**
+ * @return Additional information about a card_surcharge on the payment.
+ */
+ @JsonProperty("applied_card_surcharge_details")
+ public Optional getAppliedCardSurchargeDetails() {
+ return appliedCardSurchargeDetails;
+ }
+
+ /**
+ * @return The type of digital wallet used for this card payment, if applicable.
+ * Currently only populated for in-person Apple Pay payments. Detection has no false
+ * positives but may have false negatives (some Apple Pay payments may not be detected).
+ *
For payments with source_type of WALLET, see DigitalWalletDetails instead.
The type of digital wallet used for this card payment, if applicable.
+ * Currently only populated for in-person Apple Pay payments. Detection has no false
+ * positives but may have false negatives (some Apple Pay payments may not be detected).
+ *
For payments with source_type of WALLET, see DigitalWalletDetails instead.
+ *
Values: APPLE_PAY
+ */
+ @JsonSetter(value = "wallet_type", nulls = Nulls.SKIP)
+ public Builder walletType(Optional walletType) {
+ this.walletType = walletType;
+ return this;
+ }
+
+ public Builder walletType(String walletType) {
+ this.walletType = Optional.ofNullable(walletType);
+ return this;
+ }
+
public CardPaymentDetails build() {
return new CardPaymentDetails(
status,
@@ -603,6 +673,8 @@ public CardPaymentDetails build() {
cardPaymentTimeline,
refundRequiresCardPresence,
errors,
+ appliedCardSurchargeDetails,
+ walletType,
additionalProperties);
}
diff --git a/src/main/java/com/squareup/square/types/CardSurchargeDetails.java b/src/main/java/com/squareup/square/types/CardSurchargeDetails.java
new file mode 100644
index 00000000..96abb486
--- /dev/null
+++ b/src/main/java/com/squareup/square/types/CardSurchargeDetails.java
@@ -0,0 +1,125 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.squareup.square.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.squareup.square.core.ObjectMappers;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CardSurchargeDetails.Builder.class)
+public final class CardSurchargeDetails {
+ private final Optional cardSurchargeMoney;
+
+ private final Map additionalProperties;
+
+ private CardSurchargeDetails(Optional cardSurchargeMoney, Map additionalProperties) {
+ this.cardSurchargeMoney = cardSurchargeMoney;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return A specific surcharge levied by the merchant, if a card payment is used, instead of cash or
+ * some other payment type. Should only include the base surcharge amount. Any additional fees related
+ * to the surcharge (e.g. taxes on the surcharge) should only be included in the additional_amount_money.
+ * This amount is specified in the smallest denomination of the applicable currency (for example,
+ * US dollar amounts are specified in cents). For more information, see
+ * Working with Monetary Amounts.
+ * The currency code must match the currency associated with the business that is accepting the
+ * payment.
+ */
+ @JsonProperty("card_surcharge_money")
+ public Optional getCardSurchargeMoney() {
+ return cardSurchargeMoney;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CardSurchargeDetails && equalTo((CardSurchargeDetails) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CardSurchargeDetails other) {
+ return cardSurchargeMoney.equals(other.cardSurchargeMoney);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.cardSurchargeMoney);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional cardSurchargeMoney = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(CardSurchargeDetails other) {
+ cardSurchargeMoney(other.getCardSurchargeMoney());
+ return this;
+ }
+
+ /**
+ *
A specific surcharge levied by the merchant, if a card payment is used, instead of cash or
+ * some other payment type. Should only include the base surcharge amount. Any additional fees related
+ * to the surcharge (e.g. taxes on the surcharge) should only be included in the additional_amount_money.
+ * This amount is specified in the smallest denomination of the applicable currency (for example,
+ * US dollar amounts are specified in cents). For more information, see
+ * Working with Monetary Amounts.
+ * The currency code must match the currency associated with the business that is accepting the
+ * payment.
+ */
+ @JsonSetter(value = "card_surcharge_money", nulls = Nulls.SKIP)
+ public Builder cardSurchargeMoney(Optional cardSurchargeMoney) {
+ this.cardSurchargeMoney = cardSurchargeMoney;
+ return this;
+ }
+
+ public Builder cardSurchargeMoney(Money cardSurchargeMoney) {
+ this.cardSurchargeMoney = Optional.ofNullable(cardSurchargeMoney);
+ return this;
+ }
+
+ public CardSurchargeDetails build() {
+ return new CardSurchargeDetails(cardSurchargeMoney, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/squareup/square/types/CreatePaymentRequest.java b/src/main/java/com/squareup/square/types/CreatePaymentRequest.java
index 75f8ee7d..a179e6fb 100644
--- a/src/main/java/com/squareup/square/types/CreatePaymentRequest.java
+++ b/src/main/java/com/squareup/square/types/CreatePaymentRequest.java
@@ -13,6 +13,7 @@
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.squareup.square.core.ObjectMappers;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
@@ -31,6 +32,8 @@ public final class CreatePaymentRequest {
private final Optional appFeeMoney;
+ private final Optional> appFeeAllocations;
+
private final Optional delayDuration;
private final Optional delayAction;
@@ -79,6 +82,7 @@ private CreatePaymentRequest(
Optional amountMoney,
Optional tipMoney,
Optional appFeeMoney,
+ Optional> appFeeAllocations,
Optional delayDuration,
Optional delayAction,
Optional autocomplete,
@@ -105,6 +109,7 @@ private CreatePaymentRequest(
this.amountMoney = amountMoney;
this.tipMoney = tipMoney;
this.appFeeMoney = appFeeMoney;
+ this.appFeeAllocations = appFeeAllocations;
this.delayDuration = delayDuration;
this.delayAction = delayAction;
this.autocomplete = autocomplete;
@@ -201,6 +206,17 @@ public Optional getAppFeeMoney() {
return appFeeMoney;
}
+ /**
+ * @return Details pertaining to recipients of the application fee. The sum of the amounts in the
+ * app_fee_allocations must equal the app_fee_money amount, if present. If populated, an
+ * allocation must be present for every party that expects to receive a portion of the application
+ * fee, including the application developer.
+ */
+ @JsonProperty("app_fee_allocations")
+ public Optional> getAppFeeAllocations() {
+ return appFeeAllocations;
+ }
+
/**
* @return The duration of time after the payment's creation when Square automatically
* either completes or cancels the payment depending on the delay_action field value.
@@ -424,6 +440,7 @@ private boolean equalTo(CreatePaymentRequest other) {
&& amountMoney.equals(other.amountMoney)
&& tipMoney.equals(other.tipMoney)
&& appFeeMoney.equals(other.appFeeMoney)
+ && appFeeAllocations.equals(other.appFeeAllocations)
&& delayDuration.equals(other.delayDuration)
&& delayAction.equals(other.delayAction)
&& autocomplete.equals(other.autocomplete)
@@ -454,6 +471,7 @@ public int hashCode() {
this.amountMoney,
this.tipMoney,
this.appFeeMoney,
+ this.appFeeAllocations,
this.delayDuration,
this.delayAction,
this.autocomplete,
@@ -562,6 +580,16 @@ public interface _FinalStage {
_FinalStage appFeeMoney(Money appFeeMoney);
+ /**
+ *
Details pertaining to recipients of the application fee. The sum of the amounts in the
+ * app_fee_allocations must equal the app_fee_money amount, if present. If populated, an
+ * allocation must be present for every party that expects to receive a portion of the application
+ * fee, including the application developer.