@flopay/shared 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -82,6 +82,7 @@ __export(index_exports, {
82
82
  hasVendoredStripeMethodLogo: () => hasVendoredStripeMethodLogo,
83
83
  isAVSEnabled: () => isAVSEnabled,
84
84
  isAVSFieldVisible: () => isAVSFieldVisible,
85
+ isSetupIntentClientSecret: () => isSetupIntentClientSecret,
85
86
  isValidPublishableKey: () => isValidPublishableKey,
86
87
  isValidSecretKey: () => isValidSecretKey,
87
88
  needsStripeMethodExplicitConfirm: () => needsStripeMethodExplicitConfirm,
@@ -181,7 +182,7 @@ var PAYMENT_METHOD_LOGOS = {
181
182
  };
182
183
 
183
184
  // src/constants.ts
184
- var SDK_VERSION = "1.2.7";
185
+ var SDK_VERSION = "1.2.8";
185
186
  var BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
186
187
  var BILLING_API_URL_PRODUCTION = "https://api.flopay.com";
187
188
  var DEFAULT_API_BASE_URL = BILLING_API_URL_STAGING;
@@ -972,6 +973,10 @@ var STRIPE_METHOD_MATRIX = {
972
973
  displayName: "Cash App Pay",
973
974
  currencies: ["usd"],
974
975
  countries: ["US"],
976
+ // Cash App Pay cannot process a $0 (or sub-$0.50) charge — Stripe rejects
977
+ // `amount_too_small`. Range per Stripe: USD 0.50 – 999,999.99. Keeps a
978
+ // free-trial ($0 today) cart from surfacing a Cash App button.
979
+ amounts: { usd: { min: 50, max: 99999999 } },
975
980
  needsExplicitConfirm: false,
976
981
  theme: {
977
982
  light: {
@@ -2025,6 +2030,9 @@ function isValidPublishableKey(key) {
2025
2030
  function isValidSecretKey(key) {
2026
2031
  return /^sk_(test|live)_[A-Za-z0-9]+$/.test(key);
2027
2032
  }
2033
+ function isSetupIntentClientSecret(clientSecret) {
2034
+ return typeof clientSecret === "string" && clientSecret.startsWith("seti_");
2035
+ }
2028
2036
  // Annotate the CommonJS export names for ESM import in node:
2029
2037
  0 && (module.exports = {
2030
2038
  BILLING_API_URL,
@@ -2089,6 +2097,7 @@ function isValidSecretKey(key) {
2089
2097
  hasVendoredStripeMethodLogo,
2090
2098
  isAVSEnabled,
2091
2099
  isAVSFieldVisible,
2100
+ isSetupIntentClientSecret,
2092
2101
  isValidPublishableKey,
2093
2102
  isValidSecretKey,
2094
2103
  needsStripeMethodExplicitConfirm,