From fdcf76c889a05ef505a61380814da7ec7b18080b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 1 Dec 2025 12:37:56 +0000
Subject: [PATCH 01/11] chore(client): fix logger property type
---
src/client.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client.ts b/src/client.ts
index bee185ea..c680929e 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -397,7 +397,7 @@ export class Lithic {
baseURL: string;
maxRetries: number;
timeout: number;
- logger: Logger | undefined;
+ logger: Logger;
logLevel: LogLevel | undefined;
fetchOptions: MergedRequestInit | undefined;
From 4350d987faf057810107110ce2fb4d8dfaa7e59a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 2 Dec 2025 13:04:09 +0000
Subject: [PATCH 02/11] chore(internal): upgrade eslint
---
package.json | 2 +-
yarn.lock | 150 ++++++++++++++++++++++++++++++---------------------
2 files changed, 89 insertions(+), 63 deletions(-)
diff --git a/package.json b/package.json
index 65d8aa4a..09927ecf 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,7 @@
"@types/node": "^20.17.6",
"@typescript-eslint/eslint-plugin": "8.31.1",
"@typescript-eslint/parser": "8.31.1",
- "eslint": "^9.20.1",
+ "eslint": "^9.39.1",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unused-imports": "^4.1.4",
"iconv-lite": "^0.6.3",
diff --git a/yarn.lock b/yarn.lock
index 8311caf5..5f56a201 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -350,45 +350,52 @@
dependencies:
"@cspotcode/source-map-consumer" "0.8.0"
-"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
+"@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
eslint-visitor-keys "^3.3.0"
+"@eslint-community/eslint-utils@^4.8.0":
+ version "4.9.0"
+ resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3"
+ integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==
+ dependencies:
+ eslint-visitor-keys "^3.4.3"
+
"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1":
version "4.12.1"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0"
integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==
-"@eslint/config-array@^0.19.0":
- version "0.19.2"
- resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.2.tgz#3060b809e111abfc97adb0bb1172778b90cb46aa"
- integrity sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==
+"@eslint/config-array@^0.21.1":
+ version "0.21.1"
+ resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.1.tgz#7d1b0060fea407f8301e932492ba8c18aff29713"
+ integrity sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==
dependencies:
- "@eslint/object-schema" "^2.1.6"
+ "@eslint/object-schema" "^2.1.7"
debug "^4.3.1"
minimatch "^3.1.2"
-"@eslint/core@^0.10.0":
- version "0.10.0"
- resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.10.0.tgz#23727063c21b335f752dbb3a16450f6f9cbc9091"
- integrity sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==
+"@eslint/config-helpers@^0.4.2":
+ version "0.4.2"
+ resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda"
+ integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==
dependencies:
- "@types/json-schema" "^7.0.15"
+ "@eslint/core" "^0.17.0"
-"@eslint/core@^0.11.0":
- version "0.11.0"
- resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.11.0.tgz#7a9226e850922e42cbd2ba71361eacbe74352a12"
- integrity sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==
+"@eslint/core@^0.17.0":
+ version "0.17.0"
+ resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c"
+ integrity sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==
dependencies:
"@types/json-schema" "^7.0.15"
-"@eslint/eslintrc@^3.2.0":
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c"
- integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==
+"@eslint/eslintrc@^3.3.1":
+ version "3.3.3"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.3.tgz#26393a0806501b5e2b6a43aa588a4d8df67880ac"
+ integrity sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
@@ -396,26 +403,26 @@
globals "^14.0.0"
ignore "^5.2.0"
import-fresh "^3.2.1"
- js-yaml "^4.1.0"
+ js-yaml "^4.1.1"
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@eslint/js@9.20.0":
- version "9.20.0"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.20.0.tgz#7421bcbe74889fcd65d1be59f00130c289856eb4"
- integrity sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==
+"@eslint/js@9.39.1":
+ version "9.39.1"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.1.tgz#0dd59c3a9f40e3f1882975c321470969243e0164"
+ integrity sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==
-"@eslint/object-schema@^2.1.6":
- version "2.1.6"
- resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.6.tgz#58369ab5b5b3ca117880c0f6c0b0f32f6950f24f"
- integrity sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==
+"@eslint/object-schema@^2.1.7":
+ version "2.1.7"
+ resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad"
+ integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==
-"@eslint/plugin-kit@^0.2.5":
- version "0.2.5"
- resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz#ee07372035539e7847ef834e3f5e7b79f09e3a81"
- integrity sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==
+"@eslint/plugin-kit@^0.4.1":
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2"
+ integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==
dependencies:
- "@eslint/core" "^0.10.0"
+ "@eslint/core" "^0.17.0"
levn "^0.4.1"
"@humanfs/core@^0.19.1":
@@ -441,10 +448,10 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a"
integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==
-"@humanwhocodes/retry@^0.4.1":
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b"
- integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==
+"@humanwhocodes/retry@^0.4.2":
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba"
+ integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==
"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
@@ -1057,6 +1064,11 @@ acorn@^8.14.0:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0"
integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==
+acorn@^8.15.0:
+ version "8.15.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816"
+ integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==
+
acorn@^8.4.1:
version "8.7.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf"
@@ -1560,15 +1572,15 @@ eslint-plugin-unused-imports@^4.1.4:
resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738"
integrity sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==
-eslint-scope@^8.2.0:
- version "8.2.0"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442"
- integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==
+eslint-scope@^8.4.0:
+ version "8.4.0"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.4.0.tgz#88e646a207fad61436ffa39eb505147200655c82"
+ integrity sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==
dependencies:
esrecurse "^4.3.0"
estraverse "^5.2.0"
-eslint-visitor-keys@^3.3.0:
+eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
@@ -1578,31 +1590,36 @@ eslint-visitor-keys@^4.2.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45"
integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==
-eslint@^9.20.1:
- version "9.20.1"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.20.1.tgz#923924c078f5226832449bac86662dd7e53c91d6"
- integrity sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==
+eslint-visitor-keys@^4.2.1:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1"
+ integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==
+
+eslint@^9.39.1:
+ version "9.39.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.1.tgz#be8bf7c6de77dcc4252b5a8dcb31c2efff74a6e5"
+ integrity sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==
dependencies:
- "@eslint-community/eslint-utils" "^4.2.0"
+ "@eslint-community/eslint-utils" "^4.8.0"
"@eslint-community/regexpp" "^4.12.1"
- "@eslint/config-array" "^0.19.0"
- "@eslint/core" "^0.11.0"
- "@eslint/eslintrc" "^3.2.0"
- "@eslint/js" "9.20.0"
- "@eslint/plugin-kit" "^0.2.5"
+ "@eslint/config-array" "^0.21.1"
+ "@eslint/config-helpers" "^0.4.2"
+ "@eslint/core" "^0.17.0"
+ "@eslint/eslintrc" "^3.3.1"
+ "@eslint/js" "9.39.1"
+ "@eslint/plugin-kit" "^0.4.1"
"@humanfs/node" "^0.16.6"
"@humanwhocodes/module-importer" "^1.0.1"
- "@humanwhocodes/retry" "^0.4.1"
+ "@humanwhocodes/retry" "^0.4.2"
"@types/estree" "^1.0.6"
- "@types/json-schema" "^7.0.15"
ajv "^6.12.4"
chalk "^4.0.0"
cross-spawn "^7.0.6"
debug "^4.3.2"
escape-string-regexp "^4.0.0"
- eslint-scope "^8.2.0"
- eslint-visitor-keys "^4.2.0"
- espree "^10.3.0"
+ eslint-scope "^8.4.0"
+ eslint-visitor-keys "^4.2.1"
+ espree "^10.4.0"
esquery "^1.5.0"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
@@ -1618,7 +1635,7 @@ eslint@^9.20.1:
natural-compare "^1.4.0"
optionator "^0.9.3"
-espree@^10.0.1, espree@^10.3.0:
+espree@^10.0.1:
version "10.3.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a"
integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==
@@ -1627,6 +1644,15 @@ espree@^10.0.1, espree@^10.3.0:
acorn-jsx "^5.3.2"
eslint-visitor-keys "^4.2.0"
+espree@^10.4.0:
+ version "10.4.0"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837"
+ integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==
+ dependencies:
+ acorn "^8.15.0"
+ acorn-jsx "^5.3.2"
+ eslint-visitor-keys "^4.2.1"
+
esprima@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
@@ -2440,10 +2466,10 @@ js-yaml@^3.13.1:
argparse "^1.0.7"
esprima "^4.0.0"
-js-yaml@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
- integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
+js-yaml@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b"
+ integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==
dependencies:
argparse "^2.0.1"
From cbe82854fa79d7b47a32b94fd75c37e51b347d40 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 3 Dec 2025 09:06:01 +0000
Subject: [PATCH 03/11] feat(api): add bulk card creation APIs fix(api):
extract several common types to reduce duplication
---
.stats.yml | 8 +-
MIGRATION.md | 1 +
api.md | 71 +-
src/client.ts | 67 +-
src/resources/card-bulk-orders.ts | 188 +++++
src/resources/cards/balances.ts | 84 +--
src/resources/cards/cards.ts | 68 +-
src/resources/cards/index.ts | 7 +-
.../external-bank-accounts.ts | 196 +-----
src/resources/external-bank-accounts/index.ts | 3 +-
src/resources/financial-accounts/balances.ts | 77 +-
.../financial-accounts/financial-accounts.ts | 71 +-
src/resources/financial-accounts/index.ts | 9 +-
src/resources/funding-events.ts | 73 +-
src/resources/index.ts | 31 +-
src/resources/internal-transaction.ts | 47 ++
src/resources/reports/index.ts | 2 +
src/resources/reports/reports.ts | 93 +++
src/resources/reports/settlement/index.ts | 8 +-
.../reports/settlement/network-totals.ts | 201 +-----
.../reports/settlement/settlement.ts | 16 +-
src/resources/three-ds/authentication.ts | 666 +-----------------
src/resources/three-ds/index.ts | 3 +-
src/resources/three-ds/three-ds.ts | 664 ++++++++++++++++-
src/resources/tokenizations.ts | 252 +++++--
src/resources/transactions/index.ts | 2 +
src/resources/transactions/transactions.ts | 116 +--
tests/api-resources/card-bulk-orders.test.ts | 106 +++
tests/api-resources/cards/cards.test.ts | 1 +
29 files changed, 1688 insertions(+), 1443 deletions(-)
create mode 100644 src/resources/card-bulk-orders.ts
create mode 100644 src/resources/internal-transaction.ts
create mode 100644 tests/api-resources/card-bulk-orders.test.ts
diff --git a/.stats.yml b/.stats.yml
index 3cab4cd3..284673ed 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 172
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a9de2732e7a28b7fc5b8b7b171781d617337b6223d82ef7d6a554d0bd2b33bab.yml
-openapi_spec_hash: fc6111d286c7002cd854af23841d137e
-config_hash: cbad5dbbbeb0a85e4e3b70e5865a1900
+configured_endpoints: 176
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6d54fb5bba49d761acf9d62a7e105443a80a0d34dda61932ff1d1cb8fe214393.yml
+openapi_spec_hash: 20da53572fec9742df4a6d403464521b
+config_hash: ba3fbfc99a1b8635d9e79e9e49d12952
diff --git a/MIGRATION.md b/MIGRATION.md
index 73724358..b79795e2 100644
--- a/MIGRATION.md
+++ b/MIGRATION.md
@@ -107,6 +107,7 @@ client.example.list(undefined, { headers: { ... } });
- `client.cards.aggregateBalances.list()`
- `client.cards.balances.list()`
- `client.cards.financialTransactions.list()`
+- `client.cardBulkOrders.list()`
- `client.balances.list()`
- `client.aggregateBalances.list()`
- `client.disputes.list()`
diff --git a/api.md b/api.md
index 4a1140fa..d29cc520 100644
--- a/api.md
+++ b/api.md
@@ -138,7 +138,13 @@ Methods:
Types:
+- Device
+- DigitalWalletTokenMetadata
- Tokenization
+- TokenizationDeclineReason
+- TokenizationRuleResult
+- TokenizationTfaReason
+- WalletDecisioningInfo
Methods:
@@ -194,13 +200,9 @@ Methods:
## Balances
-Types:
-
-- BalanceListResponse
-
Methods:
-- client.cards.balances.list(cardToken, { ...params }) -> BalanceListResponsesSinglePage
+- client.cards.balances.list(cardToken, { ...params }) -> FinancialAccountBalancesSinglePage
## FinancialTransactions
@@ -209,6 +211,19 @@ Methods:
- client.cards.financialTransactions.retrieve(financialTransactionToken, { ...params }) -> FinancialTransaction
- client.cards.financialTransactions.list(cardToken, { ...params }) -> FinancialTransactionsSinglePage
+# CardBulkOrders
+
+Types:
+
+- CardBulkOrder
+
+Methods:
+
+- client.cardBulkOrders.create({ ...params }) -> CardBulkOrder
+- client.cardBulkOrders.retrieve(bulkOrderToken) -> CardBulkOrder
+- client.cardBulkOrders.update(bulkOrderToken, { ...params }) -> CardBulkOrder
+- client.cardBulkOrders.list({ ...params }) -> CardBulkOrdersCursorPage
+
# Balances
Types:
@@ -317,6 +332,7 @@ Types:
- CategoryDetails
- FinancialAccount
+- FinancialAccountBalance
- FinancialTransaction
- StatementTotals
@@ -331,13 +347,9 @@ Methods:
## Balances
-Types:
-
-- BalanceListResponse
-
Methods:
-- client.financialAccounts.balances.list(financialAccountToken, { ...params }) -> BalanceListResponsesSinglePage
+- client.financialAccounts.balances.list(financialAccountToken, { ...params }) -> FinancialAccountBalancesSinglePage
## FinancialTransactions
@@ -395,6 +407,8 @@ Methods:
Types:
+- CardholderAuthentication
+- TokenInfo
- Transaction
- TransactionSimulateAuthorizationResponse
- TransactionSimulateAuthorizationAdviceResponse
@@ -465,6 +479,7 @@ Methods:
Types:
+- ExternalBankAccount
- ExternalBankAccountAddress
- OwnerType
- VerificationMethod
@@ -473,8 +488,6 @@ Types:
- ExternalBankAccountUpdateResponse
- ExternalBankAccountListResponse
- ExternalBankAccountRetryMicroDepositsResponse
-- ExternalBankAccountRetryPrenoteResponse
-- ExternalBankAccountUnpauseResponse
Methods:
@@ -483,8 +496,8 @@ Methods:
- client.externalBankAccounts.update(externalBankAccountToken, { ...params }) -> ExternalBankAccountUpdateResponse
- client.externalBankAccounts.list({ ...params }) -> ExternalBankAccountListResponsesCursorPage
- client.externalBankAccounts.retryMicroDeposits(externalBankAccountToken, { ...params }) -> ExternalBankAccountRetryMicroDepositsResponse
-- client.externalBankAccounts.retryPrenote(externalBankAccountToken, { ...params }) -> ExternalBankAccountRetryPrenoteResponse
-- client.externalBankAccounts.unpause(externalBankAccountToken) -> ExternalBankAccountUnpauseResponse
+- client.externalBankAccounts.retryPrenote(externalBankAccountToken, { ...params }) -> ExternalBankAccount
+- client.externalBankAccounts.unpause(externalBankAccountToken) -> ExternalBankAccount
## MicroDeposits
@@ -522,16 +535,19 @@ Methods:
# ThreeDS
+Types:
+
+- ThreeDSAuthentication
+
## Authentication
Types:
-- AuthenticationRetrieveResponse
- AuthenticationSimulateResponse
Methods:
-- client.threeDS.authentication.retrieve(threeDSAuthenticationToken) -> AuthenticationRetrieveResponse
+- client.threeDS.authentication.retrieve(threeDSAuthenticationToken) -> ThreeDSAuthentication
- client.threeDS.authentication.simulate({ ...params }) -> AuthenticationSimulateResponse
- client.threeDS.authentication.simulateOtpEntry({ ...params }) -> void
@@ -553,6 +569,7 @@ Methods:
Types:
+- NetworkTotal
- SettlementDetail
- SettlementReport
- SettlementSummaryDetails
@@ -566,15 +583,10 @@ Methods:
### NetworkTotals
-Types:
-
-- NetworkTotalRetrieveResponse
-- NetworkTotalListResponse
-
Methods:
-- client.reports.settlement.networkTotals.retrieve(token) -> NetworkTotalRetrieveResponse
-- client.reports.settlement.networkTotals.list({ ...params }) -> NetworkTotalListResponsesCursorPage
+- client.reports.settlement.networkTotals.retrieve(token) -> NetworkTotal
+- client.reports.settlement.networkTotals.list({ ...params }) -> NetworkTotalsCursorPage
# CardPrograms
@@ -665,18 +677,23 @@ Methods:
- client.managementOperations.list({ ...params }) -> ManagementOperationTransactionsCursorPage
- client.managementOperations.reverse(managementOperationToken, { ...params }) -> ManagementOperationTransaction
+# InternalTransaction
+
+Types:
+
+- InternalTransaction
+
# FundingEvents
Types:
-- FundingEventRetrieveResponse
-- FundingEventListResponse
+- FundingEvent
- FundingEventRetrieveDetailsResponse
Methods:
-- client.fundingEvents.retrieve(fundingEventToken) -> FundingEventRetrieveResponse
-- client.fundingEvents.list({ ...params }) -> FundingEventListResponsesCursorPage
+- client.fundingEvents.retrieve(fundingEventToken) -> FundingEvent
+- client.fundingEvents.list({ ...params }) -> FundingEventsCursorPage
- client.fundingEvents.retrieveDetails(fundingEventToken) -> FundingEventRetrieveDetailsResponse
# Fraud
diff --git a/src/client.ts b/src/client.ts
index c680929e..7abcd4a5 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -80,6 +80,14 @@ import {
BookTransferReverseParams,
BookTransfers,
} from './resources/book-transfers';
+import {
+ CardBulkOrder,
+ CardBulkOrderCreateParams,
+ CardBulkOrderListParams,
+ CardBulkOrderUpdateParams,
+ CardBulkOrders,
+ CardBulkOrdersCursorPage,
+} from './resources/card-bulk-orders';
import {
CardProgram,
CardProgramListParams,
@@ -119,13 +127,13 @@ import {
ExternalPaymentsCursorPage,
} from './resources/external-payments';
import {
+ FundingEvent,
FundingEventListParams,
- FundingEventListResponse,
- FundingEventListResponsesCursorPage,
FundingEventRetrieveDetailsResponse,
- FundingEventRetrieveResponse,
FundingEvents,
+ FundingEventsCursorPage,
} from './resources/funding-events';
+import { InternalTransaction, InternalTransactionResource } from './resources/internal-transaction';
import {
ExternalResource,
ExternalResourceType,
@@ -174,13 +182,19 @@ import {
TokenizationSecret,
} from './resources/tokenization-decisioning';
import {
+ Device,
+ DigitalWalletTokenMetadata,
Tokenization,
+ TokenizationDeclineReason,
TokenizationListParams,
TokenizationResendActivationCodeParams,
+ TokenizationRuleResult,
TokenizationSimulateParams,
+ TokenizationTfaReason,
TokenizationUpdateDigitalCardArtParams,
Tokenizations,
TokenizationsCursorPage,
+ WalletDecisioningInfo,
} from './resources/tokenizations';
import { Transfer, TransferCreateParams, Transfers } from './resources/transfers';
import { AuthRules } from './resources/auth-rules/auth-rules';
@@ -218,6 +232,7 @@ import {
MessageAttemptsCursorPage,
} from './resources/events/events';
import {
+ ExternalBankAccount,
ExternalBankAccountAddress,
ExternalBankAccountCreateParams,
ExternalBankAccountCreateResponse,
@@ -228,8 +243,6 @@ import {
ExternalBankAccountRetryMicroDepositsParams,
ExternalBankAccountRetryMicroDepositsResponse,
ExternalBankAccountRetryPrenoteParams,
- ExternalBankAccountRetryPrenoteResponse,
- ExternalBankAccountUnpauseResponse,
ExternalBankAccountUpdateParams,
ExternalBankAccountUpdateResponse,
ExternalBankAccounts,
@@ -239,6 +252,7 @@ import {
import {
CategoryDetails,
FinancialAccount,
+ FinancialAccountBalance,
FinancialAccountCreateParams,
FinancialAccountListParams,
FinancialAccountRegisterAccountNumberParams,
@@ -251,13 +265,16 @@ import {
} from './resources/financial-accounts/financial-accounts';
import { Fraud } from './resources/fraud/fraud';
import {
+ NetworkTotal,
Reports,
SettlementDetail,
SettlementReport,
SettlementSummaryDetails,
} from './resources/reports/reports';
-import { ThreeDS } from './resources/three-ds/three-ds';
+import { ThreeDS, ThreeDSAuthentication } from './resources/three-ds/three-ds';
import {
+ CardholderAuthentication,
+ TokenInfo,
Transaction,
TransactionListParams,
TransactionSimulateAuthorizationAdviceParams,
@@ -1031,6 +1048,7 @@ export class Lithic {
tokenizationDecisioning: API.TokenizationDecisioning = new API.TokenizationDecisioning(this);
tokenizations: API.Tokenizations = new API.Tokenizations(this);
cards: API.Cards = new API.Cards(this);
+ cardBulkOrders: API.CardBulkOrders = new API.CardBulkOrders(this);
balances: API.Balances = new API.Balances(this);
aggregateBalances: API.AggregateBalances = new API.AggregateBalances(this);
disputes: API.Disputes = new API.Disputes(this);
@@ -1050,6 +1068,7 @@ export class Lithic {
creditProducts: API.CreditProducts = new API.CreditProducts(this);
externalPayments: API.ExternalPayments = new API.ExternalPayments(this);
managementOperations: API.ManagementOperations = new API.ManagementOperations(this);
+ internalTransaction: API.InternalTransactionResource = new API.InternalTransactionResource(this);
fundingEvents: API.FundingEvents = new API.FundingEvents(this);
fraud: API.Fraud = new API.Fraud(this);
networkPrograms: API.NetworkPrograms = new API.NetworkPrograms(this);
@@ -1063,6 +1082,7 @@ Lithic.AuthStreamEnrollment = AuthStreamEnrollment;
Lithic.TokenizationDecisioning = TokenizationDecisioning;
Lithic.Tokenizations = Tokenizations;
Lithic.Cards = Cards;
+Lithic.CardBulkOrders = CardBulkOrders;
Lithic.Balances = Balances;
Lithic.AggregateBalances = AggregateBalances;
Lithic.Disputes = Disputes;
@@ -1082,6 +1102,7 @@ Lithic.BookTransfers = BookTransfers;
Lithic.CreditProducts = CreditProducts;
Lithic.ExternalPayments = ExternalPayments;
Lithic.ManagementOperations = ManagementOperations;
+Lithic.InternalTransactionResource = InternalTransactionResource;
Lithic.FundingEvents = FundingEvents;
Lithic.Fraud = Fraud;
Lithic.NetworkPrograms = NetworkPrograms;
@@ -1142,7 +1163,13 @@ export declare namespace Lithic {
export {
Tokenizations as Tokenizations,
+ type Device as Device,
+ type DigitalWalletTokenMetadata as DigitalWalletTokenMetadata,
type Tokenization as Tokenization,
+ type TokenizationDeclineReason as TokenizationDeclineReason,
+ type TokenizationRuleResult as TokenizationRuleResult,
+ type TokenizationTfaReason as TokenizationTfaReason,
+ type WalletDecisioningInfo as WalletDecisioningInfo,
type TokenizationsCursorPage as TokenizationsCursorPage,
type TokenizationListParams as TokenizationListParams,
type TokenizationResendActivationCodeParams as TokenizationResendActivationCodeParams,
@@ -1173,6 +1200,15 @@ export declare namespace Lithic {
type CardWebProvisionParams as CardWebProvisionParams,
};
+ export {
+ CardBulkOrders as CardBulkOrders,
+ type CardBulkOrder as CardBulkOrder,
+ type CardBulkOrdersCursorPage as CardBulkOrdersCursorPage,
+ type CardBulkOrderCreateParams as CardBulkOrderCreateParams,
+ type CardBulkOrderUpdateParams as CardBulkOrderUpdateParams,
+ type CardBulkOrderListParams as CardBulkOrderListParams,
+ };
+
export {
Balances as Balances,
type Balance as Balance,
@@ -1230,6 +1266,7 @@ export declare namespace Lithic {
FinancialAccounts as FinancialAccounts,
type CategoryDetails as CategoryDetails,
type FinancialAccount as FinancialAccount,
+ type FinancialAccountBalance as FinancialAccountBalance,
type FinancialTransaction as FinancialTransaction,
type StatementTotals as StatementTotals,
type FinancialAccountsSinglePage as FinancialAccountsSinglePage,
@@ -1242,6 +1279,8 @@ export declare namespace Lithic {
export {
Transactions as Transactions,
+ type CardholderAuthentication as CardholderAuthentication,
+ type TokenInfo as TokenInfo,
type Transaction as Transaction,
type TransactionSimulateAuthorizationResponse as TransactionSimulateAuthorizationResponse,
type TransactionSimulateAuthorizationAdviceResponse as TransactionSimulateAuthorizationAdviceResponse,
@@ -1274,6 +1313,7 @@ export declare namespace Lithic {
export {
ExternalBankAccounts as ExternalBankAccounts,
+ type ExternalBankAccount as ExternalBankAccount,
type ExternalBankAccountAddress as ExternalBankAccountAddress,
type OwnerType as OwnerType,
type VerificationMethod as VerificationMethod,
@@ -1282,8 +1322,6 @@ export declare namespace Lithic {
type ExternalBankAccountUpdateResponse as ExternalBankAccountUpdateResponse,
type ExternalBankAccountListResponse as ExternalBankAccountListResponse,
type ExternalBankAccountRetryMicroDepositsResponse as ExternalBankAccountRetryMicroDepositsResponse,
- type ExternalBankAccountRetryPrenoteResponse as ExternalBankAccountRetryPrenoteResponse,
- type ExternalBankAccountUnpauseResponse as ExternalBankAccountUnpauseResponse,
type ExternalBankAccountListResponsesCursorPage as ExternalBankAccountListResponsesCursorPage,
type ExternalBankAccountCreateParams as ExternalBankAccountCreateParams,
type ExternalBankAccountUpdateParams as ExternalBankAccountUpdateParams,
@@ -1311,10 +1349,11 @@ export declare namespace Lithic {
type PaymentSimulateReturnParams as PaymentSimulateReturnParams,
};
- export { ThreeDS as ThreeDS };
+ export { ThreeDS as ThreeDS, type ThreeDSAuthentication as ThreeDSAuthentication };
export {
Reports as Reports,
+ type NetworkTotal as NetworkTotal,
type SettlementDetail as SettlementDetail,
type SettlementReport as SettlementReport,
type SettlementSummaryDetails as SettlementSummaryDetails,
@@ -1368,12 +1407,16 @@ export declare namespace Lithic {
type ManagementOperationReverseParams as ManagementOperationReverseParams,
};
+ export {
+ InternalTransactionResource as InternalTransactionResource,
+ type InternalTransaction as InternalTransaction,
+ };
+
export {
FundingEvents as FundingEvents,
- type FundingEventRetrieveResponse as FundingEventRetrieveResponse,
- type FundingEventListResponse as FundingEventListResponse,
+ type FundingEvent as FundingEvent,
type FundingEventRetrieveDetailsResponse as FundingEventRetrieveDetailsResponse,
- type FundingEventListResponsesCursorPage as FundingEventListResponsesCursorPage,
+ type FundingEventsCursorPage as FundingEventsCursorPage,
type FundingEventListParams as FundingEventListParams,
};
diff --git a/src/resources/card-bulk-orders.ts b/src/resources/card-bulk-orders.ts
new file mode 100644
index 00000000..8d9ee205
--- /dev/null
+++ b/src/resources/card-bulk-orders.ts
@@ -0,0 +1,188 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../core/resource';
+import { APIPromise } from '../core/api-promise';
+import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
+import { RequestOptions } from '../internal/request-options';
+import { path } from '../internal/utils/path';
+
+export class CardBulkOrders extends APIResource {
+ /**
+ * Create a new bulk order for physical card shipments **[BETA]**. Cards can be
+ * added to the order via the POST /v1/cards endpoint by specifying the
+ * bulk_order_token. Lock the order via PATCH
+ * /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work
+ * with your Customer Success Manager and card personalization bureau to ensure
+ * bulk shipping is supported for your program.
+ *
+ * @example
+ * ```ts
+ * const cardBulkOrder = await client.cardBulkOrders.create({
+ * customer_product_id: 'custom-card-design-123',
+ * shipping_address: {
+ * address1: '123 Main Street',
+ * city: 'NEW YORK',
+ * country: 'USA',
+ * first_name: 'Johnny',
+ * last_name: 'Appleseed',
+ * postal_code: '10001',
+ * state: 'NY',
+ * },
+ * shipping_method: 'BULK_EXPEDITED',
+ * });
+ * ```
+ */
+ create(body: CardBulkOrderCreateParams, options?: RequestOptions): APIPromise {
+ return this._client.post('/v1/card_bulk_orders', { body, ...options });
+ }
+
+ /**
+ * Retrieve a specific bulk order by token **[BETA]**
+ *
+ * @example
+ * ```ts
+ * const cardBulkOrder = await client.cardBulkOrders.retrieve(
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * );
+ * ```
+ */
+ retrieve(bulkOrderToken: string, options?: RequestOptions): APIPromise {
+ return this._client.get(path`/v1/card_bulk_orders/${bulkOrderToken}`, options);
+ }
+
+ /**
+ * Update a bulk order **[BETA]**. Primarily used to lock the order, preventing
+ * additional cards from being added
+ *
+ * @example
+ * ```ts
+ * const cardBulkOrder = await client.cardBulkOrders.update(
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * { status: 'LOCKED' },
+ * );
+ * ```
+ */
+ update(
+ bulkOrderToken: string,
+ body: CardBulkOrderUpdateParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.patch(path`/v1/card_bulk_orders/${bulkOrderToken}`, { body, ...options });
+ }
+
+ /**
+ * List bulk orders for physical card shipments **[BETA]**
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const cardBulkOrder of client.cardBulkOrders.list()) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ query: CardBulkOrderListParams | null | undefined = {},
+ options?: RequestOptions,
+ ): PagePromise {
+ return this._client.getAPIList('/v1/card_bulk_orders', CursorPage, { query, ...options });
+ }
+}
+
+export type CardBulkOrdersCursorPage = CursorPage;
+
+/**
+ * Represents a bulk order for physical card shipments
+ */
+export interface CardBulkOrder {
+ /**
+ * Globally unique identifier for the bulk order
+ */
+ token: string;
+
+ /**
+ * List of card tokens associated with this bulk order
+ */
+ card_tokens: Array;
+
+ /**
+ * An RFC 3339 timestamp for when the bulk order was created. UTC time zone
+ */
+ created: string;
+
+ /**
+ * Customer-specified product configuration for physical card manufacturing. This
+ * must be configured with Lithic before use
+ */
+ customer_product_id: string | null;
+
+ /**
+ * Shipping address for all cards in this bulk order
+ */
+ shipping_address: unknown;
+
+ /**
+ * Shipping method for all cards in this bulk order
+ */
+ shipping_method: 'BULK_EXPEDITED';
+
+ /**
+ * Status of the bulk order. OPEN indicates the order is accepting cards. LOCKED
+ * indicates the order is finalized and no more cards can be added
+ */
+ status: 'OPEN' | 'LOCKED';
+
+ /**
+ * An RFC 3339 timestamp for when the bulk order was last updated. UTC time zone
+ */
+ updated: string;
+}
+
+export interface CardBulkOrderCreateParams {
+ /**
+ * Customer-specified product configuration for physical card manufacturing. This
+ * must be configured with Lithic before use
+ */
+ customer_product_id: string;
+
+ /**
+ * Shipping address for all cards in this bulk order
+ */
+ shipping_address: unknown;
+
+ /**
+ * Shipping method for all cards in this bulk order
+ */
+ shipping_method: 'BULK_EXPEDITED';
+}
+
+export interface CardBulkOrderUpdateParams {
+ /**
+ * Status to update the bulk order to. Use LOCKED to finalize the order
+ */
+ status: 'LOCKED';
+}
+
+export interface CardBulkOrderListParams extends CursorPageParams {
+ /**
+ * Date string in RFC 3339 format. Only entries created after the specified time
+ * will be included. UTC time zone.
+ */
+ begin?: string;
+
+ /**
+ * Date string in RFC 3339 format. Only entries created before the specified time
+ * will be included. UTC time zone.
+ */
+ end?: string;
+}
+
+export declare namespace CardBulkOrders {
+ export {
+ type CardBulkOrder as CardBulkOrder,
+ type CardBulkOrdersCursorPage as CardBulkOrdersCursorPage,
+ type CardBulkOrderCreateParams as CardBulkOrderCreateParams,
+ type CardBulkOrderUpdateParams as CardBulkOrderUpdateParams,
+ type CardBulkOrderListParams as CardBulkOrderListParams,
+ };
+}
diff --git a/src/resources/cards/balances.ts b/src/resources/cards/balances.ts
index 7d8f9a0a..1c7304b6 100644
--- a/src/resources/cards/balances.ts
+++ b/src/resources/cards/balances.ts
@@ -1,6 +1,8 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
+import * as FinancialAccountsAPI from '../financial-accounts/financial-accounts';
+import { FinancialAccountBalancesSinglePage } from '../financial-accounts/financial-accounts';
import { PagePromise, SinglePage } from '../../core/pagination';
import { RequestOptions } from '../../internal/request-options';
import { path } from '../../internal/utils/path';
@@ -12,7 +14,7 @@ export class Balances extends APIResource {
* @example
* ```ts
* // Automatically fetches more pages as needed.
- * for await (const balanceListResponse of client.cards.balances.list(
+ * for await (const financialAccountBalance of client.cards.balances.list(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* )) {
* // ...
@@ -23,75 +25,15 @@ export class Balances extends APIResource {
cardToken: string,
query: BalanceListParams | null | undefined = {},
options?: RequestOptions,
- ): PagePromise {
- return this._client.getAPIList(path`/v1/cards/${cardToken}/balances`, SinglePage, {
- query,
- ...options,
- });
+ ): PagePromise {
+ return this._client.getAPIList(
+ path`/v1/cards/${cardToken}/balances`,
+ SinglePage,
+ { query, ...options },
+ );
}
}
-export type BalanceListResponsesSinglePage = SinglePage;
-
-/**
- * Balance of a Financial Account
- */
-export interface BalanceListResponse {
- /**
- * Globally unique identifier for the financial account that holds this balance.
- */
- token: string;
-
- /**
- * Funds available for spend in the currency's smallest unit (e.g., cents for USD)
- */
- available_amount: number;
-
- /**
- * Date and time for when the balance was first created.
- */
- created: string;
-
- /**
- * 3-character alphabetic ISO 4217 code for the local currency of the balance.
- */
- currency: string;
-
- /**
- * Globally unique identifier for the last financial transaction event that
- * impacted this balance.
- */
- last_transaction_event_token: string;
-
- /**
- * Globally unique identifier for the last financial transaction that impacted this
- * balance.
- */
- last_transaction_token: string;
-
- /**
- * Funds not available for spend due to card authorizations or pending ACH release.
- * Shown in the currency's smallest unit (e.g., cents for USD).
- */
- pending_amount: number;
-
- /**
- * The sum of available and pending balance in the currency's smallest unit (e.g.,
- * cents for USD).
- */
- total_amount: number;
-
- /**
- * Type of financial account.
- */
- type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY';
-
- /**
- * Date and time for when the balance was last updated.
- */
- updated: string;
-}
-
export interface BalanceListParams {
/**
* UTC date of the balance to retrieve. Defaults to latest available balance
@@ -107,9 +49,7 @@ export interface BalanceListParams {
}
export declare namespace Balances {
- export {
- type BalanceListResponse as BalanceListResponse,
- type BalanceListResponsesSinglePage as BalanceListResponsesSinglePage,
- type BalanceListParams as BalanceListParams,
- };
+ export { type BalanceListParams as BalanceListParams };
}
+
+export { type FinancialAccountBalancesSinglePage };
diff --git a/src/resources/cards/cards.ts b/src/resources/cards/cards.ts
index af5d99c9..093bdd73 100644
--- a/src/resources/cards/cards.ts
+++ b/src/resources/cards/cards.ts
@@ -10,7 +10,7 @@ import {
AggregateBalances,
} from './aggregate-balances';
import * as BalancesAPI from './balances';
-import { BalanceListParams, BalanceListResponse, BalanceListResponsesSinglePage, Balances } from './balances';
+import { BalanceListParams, Balances } from './balances';
import * as FinancialTransactionsAPI from './financial-transactions';
import {
FinancialTransactionListParams,
@@ -593,6 +593,12 @@ export interface NonPCICard {
*/
auth_rule_tokens?: Array;
+ /**
+ * Globally unique identifier for the bulk order associated with this card. Only
+ * applicable to physical cards that are part of a bulk shipment
+ */
+ bulk_order_token?: string | null;
+
/**
* 3-character alphabetic ISO 4217 code for the currency of the cardholder.
*/
@@ -862,6 +868,13 @@ export interface CardCreateParams {
*/
account_token?: string;
+ /**
+ * Globally unique identifier for an existing bulk order to associate this card
+ * with. When specified, the card will be added to the bulk order for batch
+ * shipment. Only applicable to cards of type PHYSICAL
+ */
+ bulk_order_token?: string;
+
/**
* For card programs with more than one BIN range. This must be configured with
* Lithic before use. Identifies the card program/BIN range under which to create
@@ -994,8 +1007,16 @@ export interface CardCreateParams {
* tracking
* - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
* or similar international option, with tracking
+ * - `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
*/
- shipping_method?: '2_DAY' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';
+ shipping_method?:
+ | '2_DAY'
+ | 'BULK_EXPEDITED'
+ | 'EXPEDITED'
+ | 'EXPRESS'
+ | 'PRIORITY'
+ | 'STANDARD'
+ | 'STANDARD_WITH_TRACKING';
/**
* Amount (in cents) to limit approved authorizations (e.g. 100000 would be a
@@ -1213,8 +1234,16 @@ export interface CardConvertPhysicalParams {
* tracking
* - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
* or similar international option, with tracking
- */
- shipping_method?: '2_DAY' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';
+ * - `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ */
+ shipping_method?:
+ | '2_DAY'
+ | 'BULK_EXPEDITED'
+ | 'EXPEDITED'
+ | 'EXPRESS'
+ | 'PRIORITY'
+ | 'STANDARD'
+ | 'STANDARD_WITH_TRACKING';
}
export interface CardEmbedParams {
@@ -1373,8 +1402,16 @@ export interface CardReissueParams {
* tracking
* - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
* or similar international option, with tracking
- */
- shipping_method?: '2_DAY' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';
+ * - `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ */
+ shipping_method?:
+ | '2_DAY'
+ | 'BULK_EXPEDITED'
+ | 'EXPEDITED'
+ | 'EXPRESS'
+ | 'PRIORITY'
+ | 'STANDARD'
+ | 'STANDARD_WITH_TRACKING';
}
export interface CardRenewParams {
@@ -1422,8 +1459,16 @@ export interface CardRenewParams {
* tracking
* - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
* or similar international option, with tracking
- */
- shipping_method?: '2_DAY' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';
+ * - `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ */
+ shipping_method?:
+ | '2_DAY'
+ | 'BULK_EXPEDITED'
+ | 'EXPEDITED'
+ | 'EXPRESS'
+ | 'PRIORITY'
+ | 'STANDARD'
+ | 'STANDARD_WITH_TRACKING';
}
export interface CardSearchByPanParams {
@@ -1476,12 +1521,7 @@ export declare namespace Cards {
type AggregateBalanceListParams as AggregateBalanceListParams,
};
- export {
- Balances as Balances,
- type BalanceListResponse as BalanceListResponse,
- type BalanceListResponsesSinglePage as BalanceListResponsesSinglePage,
- type BalanceListParams as BalanceListParams,
- };
+ export { Balances as Balances, type BalanceListParams as BalanceListParams };
export {
FinancialTransactions as FinancialTransactions,
diff --git a/src/resources/cards/index.ts b/src/resources/cards/index.ts
index dee1243e..2ff2f8af 100644
--- a/src/resources/cards/index.ts
+++ b/src/resources/cards/index.ts
@@ -6,12 +6,7 @@ export {
type AggregateBalanceListParams,
type AggregateBalanceListResponsesSinglePage,
} from './aggregate-balances';
-export {
- Balances,
- type BalanceListResponse,
- type BalanceListParams,
- type BalanceListResponsesSinglePage,
-} from './balances';
+export { Balances, type BalanceListParams } from './balances';
export {
Cards,
type Card,
diff --git a/src/resources/external-bank-accounts/external-bank-accounts.ts b/src/resources/external-bank-accounts/external-bank-accounts.ts
index 8a695b6e..08f5efd9 100644
--- a/src/resources/external-bank-accounts/external-bank-accounts.ts
+++ b/src/resources/external-bank-accounts/external-bank-accounts.ts
@@ -135,7 +135,7 @@ export class ExternalBankAccounts extends APIResource {
*
* @example
* ```ts
- * const response =
+ * const externalBankAccount =
* await client.externalBankAccounts.retryPrenote(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* );
@@ -145,7 +145,7 @@ export class ExternalBankAccounts extends APIResource {
externalBankAccountToken: string,
body: ExternalBankAccountRetryPrenoteParams | null | undefined = {},
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.post(path`/v1/external_bank_accounts/${externalBankAccountToken}/retry_prenote`, {
body,
...options,
@@ -157,45 +157,20 @@ export class ExternalBankAccounts extends APIResource {
*
* @example
* ```ts
- * const response = await client.externalBankAccounts.unpause(
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
- * );
+ * const externalBankAccount =
+ * await client.externalBankAccounts.unpause(
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * );
* ```
*/
- unpause(
- externalBankAccountToken: string,
- options?: RequestOptions,
- ): APIPromise {
+ unpause(externalBankAccountToken: string, options?: RequestOptions): APIPromise {
return this._client.post(path`/v1/external_bank_accounts/${externalBankAccountToken}/unpause`, options);
}
}
export type ExternalBankAccountListResponsesCursorPage = CursorPage;
-export interface ExternalBankAccountAddress {
- address1: string;
-
- city: string;
-
- country: string;
-
- postal_code: string;
-
- state: string;
-
- address2?: string | null;
-}
-
-export type OwnerType = 'INDIVIDUAL' | 'BUSINESS';
-
-export type VerificationMethod =
- | 'MANUAL'
- | 'MICRO_DEPOSIT'
- | 'PRENOTE'
- | 'EXTERNALLY_VERIFIED'
- | 'UNVERIFIED';
-
-export interface ExternalBankAccountCreateResponse {
+export interface ExternalBankAccount {
/**
* A globally unique identifier for this record of an external bank account
* association. If a program links an external bank account to more than one
@@ -236,7 +211,7 @@ export interface ExternalBankAccountCreateResponse {
/**
* Owner Type
*/
- owner_type: 'BUSINESS' | 'INDIVIDUAL';
+ owner_type: OwnerType;
/**
* Routing Number
@@ -261,7 +236,7 @@ export interface ExternalBankAccountCreateResponse {
/**
* Verification Method
*/
- verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE';
+ verification_method: VerificationMethod;
/**
* Verification State
@@ -318,130 +293,30 @@ export interface ExternalBankAccountCreateResponse {
verification_failed_reason?: string | null;
}
-export interface ExternalBankAccountRetrieveResponse {
- /**
- * A globally unique identifier for this record of an external bank account
- * association. If a program links an external bank account to more than one
- * end-user or to both the program and the end-user, then Lithic will return each
- * record of the association
- */
- token: string;
-
- /**
- * The country that the bank account is located in using ISO 3166-1. We will only
- * accept USA bank accounts e.g., USA
- */
- country: string;
-
- /**
- * An ISO 8601 string representing when this funding source was added to the Lithic
- * account.
- */
- created: string;
-
- /**
- * currency of the external account 3-character alphabetic ISO 4217 code
- */
- currency: string;
-
- /**
- * The last 4 digits of the bank account. Derived by Lithic from the account number
- * passed
- */
- last_four: string;
-
- /**
- * Legal Name of the business or individual who owns the external account. This
- * will appear in statements
- */
- owner: string;
-
- /**
- * Owner Type
- */
- owner_type: 'BUSINESS' | 'INDIVIDUAL';
-
- /**
- * Routing Number
- */
- routing_number: string;
-
- /**
- * Account State
- */
- state: 'ENABLED' | 'CLOSED' | 'PAUSED';
-
- /**
- * Account Type
- */
- type: 'CHECKING' | 'SAVINGS';
-
- /**
- * The number of attempts at verification
- */
- verification_attempts: number;
-
- /**
- * Verification Method
- */
- verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE';
-
- /**
- * Verification State
- */
- verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS';
-
- /**
- * Indicates which Lithic account the external account is associated with. For
- * external accounts that are associated with the program, account_token field
- * returned will be null
- */
- account_token?: string | null;
-
- /**
- * Address
- */
- address?: ExternalBankAccountAddress | null;
+export interface ExternalBankAccountAddress {
+ address1: string;
- /**
- * Optional field that helps identify bank accounts in receipts
- */
- company_id?: string | null;
+ city: string;
- /**
- * Date of Birth of the Individual that owns the external bank account
- */
- dob?: string | null;
+ country: string;
- /**
- * Doing Business As
- */
- doing_business_as?: string | null;
+ postal_code: string;
- /**
- * The financial account token of the operating account to fund the micro deposits
- */
- financial_account_token?: string | null;
+ state: string;
- /**
- * The nickname for this External Bank Account
- */
- name?: string | null;
+ address2?: string | null;
+}
- /**
- * User Defined ID
- */
- user_defined_id?: string | null;
+export type OwnerType = 'INDIVIDUAL' | 'BUSINESS';
- /**
- * Optional free text description of the reason for the failed verification. For
- * ACH micro-deposits returned, this field will display the reason return code sent
- * by the ACH network
- */
- verification_failed_reason?: string | null;
-}
+export type VerificationMethod =
+ | 'MANUAL'
+ | 'MICRO_DEPOSIT'
+ | 'PRENOTE'
+ | 'EXTERNALLY_VERIFIED'
+ | 'UNVERIFIED';
-export interface ExternalBankAccountUpdateResponse {
+export interface ExternalBankAccountCreateResponse {
/**
* A globally unique identifier for this record of an external bank account
* association. If a program links an external bank account to more than one
@@ -564,7 +439,7 @@ export interface ExternalBankAccountUpdateResponse {
verification_failed_reason?: string | null;
}
-export interface ExternalBankAccountListResponse {
+export interface ExternalBankAccountRetrieveResponse {
/**
* A globally unique identifier for this record of an external bank account
* association. If a program links an external bank account to more than one
@@ -687,7 +562,7 @@ export interface ExternalBankAccountListResponse {
verification_failed_reason?: string | null;
}
-export interface ExternalBankAccountRetryMicroDepositsResponse {
+export interface ExternalBankAccountUpdateResponse {
/**
* A globally unique identifier for this record of an external bank account
* association. If a program links an external bank account to more than one
@@ -810,7 +685,7 @@ export interface ExternalBankAccountRetryMicroDepositsResponse {
verification_failed_reason?: string | null;
}
-export interface ExternalBankAccountRetryPrenoteResponse {
+export interface ExternalBankAccountListResponse {
/**
* A globally unique identifier for this record of an external bank account
* association. If a program links an external bank account to more than one
@@ -851,7 +726,7 @@ export interface ExternalBankAccountRetryPrenoteResponse {
/**
* Owner Type
*/
- owner_type: OwnerType;
+ owner_type: 'BUSINESS' | 'INDIVIDUAL';
/**
* Routing Number
@@ -876,7 +751,7 @@ export interface ExternalBankAccountRetryPrenoteResponse {
/**
* Verification Method
*/
- verification_method: VerificationMethod;
+ verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE';
/**
* Verification State
@@ -933,7 +808,7 @@ export interface ExternalBankAccountRetryPrenoteResponse {
verification_failed_reason?: string | null;
}
-export interface ExternalBankAccountUnpauseResponse {
+export interface ExternalBankAccountRetryMicroDepositsResponse {
/**
* A globally unique identifier for this record of an external bank account
* association. If a program links an external bank account to more than one
@@ -974,7 +849,7 @@ export interface ExternalBankAccountUnpauseResponse {
/**
* Owner Type
*/
- owner_type: OwnerType;
+ owner_type: 'BUSINESS' | 'INDIVIDUAL';
/**
* Routing Number
@@ -999,7 +874,7 @@ export interface ExternalBankAccountUnpauseResponse {
/**
* Verification Method
*/
- verification_method: VerificationMethod;
+ verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE';
/**
* Verification State
@@ -1384,6 +1259,7 @@ ExternalBankAccounts.MicroDeposits = MicroDeposits;
export declare namespace ExternalBankAccounts {
export {
+ type ExternalBankAccount as ExternalBankAccount,
type ExternalBankAccountAddress as ExternalBankAccountAddress,
type OwnerType as OwnerType,
type VerificationMethod as VerificationMethod,
@@ -1392,8 +1268,6 @@ export declare namespace ExternalBankAccounts {
type ExternalBankAccountUpdateResponse as ExternalBankAccountUpdateResponse,
type ExternalBankAccountListResponse as ExternalBankAccountListResponse,
type ExternalBankAccountRetryMicroDepositsResponse as ExternalBankAccountRetryMicroDepositsResponse,
- type ExternalBankAccountRetryPrenoteResponse as ExternalBankAccountRetryPrenoteResponse,
- type ExternalBankAccountUnpauseResponse as ExternalBankAccountUnpauseResponse,
type ExternalBankAccountListResponsesCursorPage as ExternalBankAccountListResponsesCursorPage,
type ExternalBankAccountCreateParams as ExternalBankAccountCreateParams,
type ExternalBankAccountUpdateParams as ExternalBankAccountUpdateParams,
diff --git a/src/resources/external-bank-accounts/index.ts b/src/resources/external-bank-accounts/index.ts
index 54cb84fa..f48376c6 100644
--- a/src/resources/external-bank-accounts/index.ts
+++ b/src/resources/external-bank-accounts/index.ts
@@ -2,6 +2,7 @@
export {
ExternalBankAccounts,
+ type ExternalBankAccount,
type ExternalBankAccountAddress,
type OwnerType,
type VerificationMethod,
@@ -10,8 +11,6 @@ export {
type ExternalBankAccountUpdateResponse,
type ExternalBankAccountListResponse,
type ExternalBankAccountRetryMicroDepositsResponse,
- type ExternalBankAccountRetryPrenoteResponse,
- type ExternalBankAccountUnpauseResponse,
type ExternalBankAccountCreateParams,
type ExternalBankAccountUpdateParams,
type ExternalBankAccountListParams,
diff --git a/src/resources/financial-accounts/balances.ts b/src/resources/financial-accounts/balances.ts
index aaab993a..d5635c58 100644
--- a/src/resources/financial-accounts/balances.ts
+++ b/src/resources/financial-accounts/balances.ts
@@ -1,6 +1,8 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
+import * as FinancialAccountsAPI from './financial-accounts';
+import { FinancialAccountBalancesSinglePage } from './financial-accounts';
import { PagePromise, SinglePage } from '../../core/pagination';
import { RequestOptions } from '../../internal/request-options';
import { path } from '../../internal/utils/path';
@@ -12,7 +14,7 @@ export class Balances extends APIResource {
* @example
* ```ts
* // Automatically fetches more pages as needed.
- * for await (const balanceListResponse of client.financialAccounts.balances.list(
+ * for await (const financialAccountBalance of client.financialAccounts.balances.list(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* )) {
* // ...
@@ -23,76 +25,15 @@ export class Balances extends APIResource {
financialAccountToken: string,
query: BalanceListParams | null | undefined = {},
options?: RequestOptions,
- ): PagePromise {
+ ): PagePromise {
return this._client.getAPIList(
path`/v1/financial_accounts/${financialAccountToken}/balances`,
- SinglePage,
+ SinglePage,
{ query, ...options },
);
}
}
-export type BalanceListResponsesSinglePage = SinglePage;
-
-/**
- * Balance of a Financial Account
- */
-export interface BalanceListResponse {
- /**
- * Globally unique identifier for the financial account that holds this balance.
- */
- token: string;
-
- /**
- * Funds available for spend in the currency's smallest unit (e.g., cents for USD)
- */
- available_amount: number;
-
- /**
- * Date and time for when the balance was first created.
- */
- created: string;
-
- /**
- * 3-character alphabetic ISO 4217 code for the local currency of the balance.
- */
- currency: string;
-
- /**
- * Globally unique identifier for the last financial transaction event that
- * impacted this balance.
- */
- last_transaction_event_token: string;
-
- /**
- * Globally unique identifier for the last financial transaction that impacted this
- * balance.
- */
- last_transaction_token: string;
-
- /**
- * Funds not available for spend due to card authorizations or pending ACH release.
- * Shown in the currency's smallest unit (e.g., cents for USD).
- */
- pending_amount: number;
-
- /**
- * The sum of available and pending balance in the currency's smallest unit (e.g.,
- * cents for USD).
- */
- total_amount: number;
-
- /**
- * Type of financial account.
- */
- type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY';
-
- /**
- * Date and time for when the balance was last updated.
- */
- updated: string;
-}
-
export interface BalanceListParams {
/**
* UTC date of the balance to retrieve. Defaults to latest available balance
@@ -108,9 +49,7 @@ export interface BalanceListParams {
}
export declare namespace Balances {
- export {
- type BalanceListResponse as BalanceListResponse,
- type BalanceListResponsesSinglePage as BalanceListResponsesSinglePage,
- type BalanceListParams as BalanceListParams,
- };
+ export { type BalanceListParams as BalanceListParams };
}
+
+export { type FinancialAccountBalancesSinglePage };
diff --git a/src/resources/financial-accounts/financial-accounts.ts b/src/resources/financial-accounts/financial-accounts.ts
index 0bae442e..7cf811c9 100644
--- a/src/resources/financial-accounts/financial-accounts.ts
+++ b/src/resources/financial-accounts/financial-accounts.ts
@@ -3,7 +3,7 @@
import { APIResource } from '../../core/resource';
import * as Shared from '../shared';
import * as BalancesAPI from './balances';
-import { BalanceListParams, BalanceListResponse, BalanceListResponsesSinglePage, Balances } from './balances';
+import { BalanceListParams, Balances } from './balances';
import * as CreditConfigurationAPI from './credit-configuration';
import {
CreditConfiguration as CreditConfigurationAPICreditConfiguration,
@@ -176,6 +176,8 @@ export class FinancialAccounts extends APIResource {
export type FinancialAccountsSinglePage = SinglePage;
+export type FinancialAccountBalancesSinglePage = SinglePage;
+
export type FinancialTransactionsSinglePage = SinglePage;
export interface CategoryDetails {
@@ -269,6 +271,65 @@ export namespace FinancialAccount {
}
}
+/**
+ * Balance of a Financial Account
+ */
+export interface FinancialAccountBalance {
+ /**
+ * Globally unique identifier for the financial account that holds this balance.
+ */
+ token: string;
+
+ /**
+ * Funds available for spend in the currency's smallest unit (e.g., cents for USD)
+ */
+ available_amount: number;
+
+ /**
+ * Date and time for when the balance was first created.
+ */
+ created: string;
+
+ /**
+ * 3-character alphabetic ISO 4217 code for the local currency of the balance.
+ */
+ currency: string;
+
+ /**
+ * Globally unique identifier for the last financial transaction event that
+ * impacted this balance.
+ */
+ last_transaction_event_token: string;
+
+ /**
+ * Globally unique identifier for the last financial transaction that impacted this
+ * balance.
+ */
+ last_transaction_token: string;
+
+ /**
+ * Funds not available for spend due to card authorizations or pending ACH release.
+ * Shown in the currency's smallest unit (e.g., cents for USD).
+ */
+ pending_amount: number;
+
+ /**
+ * The sum of available and pending balance in the currency's smallest unit (e.g.,
+ * cents for USD).
+ */
+ total_amount: number;
+
+ /**
+ * Type of financial account.
+ */
+ type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY';
+
+ /**
+ * Date and time for when the balance was last updated.
+ */
+ updated: string;
+}
+
export interface FinancialTransaction {
/**
* Globally unique identifier.
@@ -477,6 +538,7 @@ export declare namespace FinancialAccounts {
export {
type CategoryDetails as CategoryDetails,
type FinancialAccount as FinancialAccount,
+ type FinancialAccountBalance as FinancialAccountBalance,
type FinancialTransaction as FinancialTransaction,
type StatementTotals as StatementTotals,
type FinancialAccountsSinglePage as FinancialAccountsSinglePage,
@@ -487,12 +549,7 @@ export declare namespace FinancialAccounts {
type FinancialAccountUpdateStatusParams as FinancialAccountUpdateStatusParams,
};
- export {
- Balances as Balances,
- type BalanceListResponse as BalanceListResponse,
- type BalanceListResponsesSinglePage as BalanceListResponsesSinglePage,
- type BalanceListParams as BalanceListParams,
- };
+ export { Balances as Balances, type BalanceListParams as BalanceListParams };
export {
FinancialTransactions as FinancialTransactions,
diff --git a/src/resources/financial-accounts/index.ts b/src/resources/financial-accounts/index.ts
index 8bd97f0e..d5b39e0c 100644
--- a/src/resources/financial-accounts/index.ts
+++ b/src/resources/financial-accounts/index.ts
@@ -1,11 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-export {
- Balances,
- type BalanceListResponse,
- type BalanceListParams,
- type BalanceListResponsesSinglePage,
-} from './balances';
+export { Balances, type BalanceListParams } from './balances';
export {
CreditConfiguration,
type FinancialAccountCreditConfig,
@@ -15,6 +10,7 @@ export {
FinancialAccounts,
type CategoryDetails,
type FinancialAccount,
+ type FinancialAccountBalance,
type FinancialTransaction,
type StatementTotals,
type FinancialAccountCreateParams,
@@ -22,6 +18,7 @@ export {
type FinancialAccountListParams,
type FinancialAccountRegisterAccountNumberParams,
type FinancialAccountUpdateStatusParams,
+ type FinancialAccountBalancesSinglePage,
type FinancialTransactionsSinglePage,
type FinancialAccountsSinglePage,
} from './financial-accounts';
diff --git a/src/resources/funding-events.ts b/src/resources/funding-events.ts
index 20c2751b..5f08be63 100644
--- a/src/resources/funding-events.ts
+++ b/src/resources/funding-events.ts
@@ -10,7 +10,7 @@ export class FundingEvents extends APIResource {
/**
* Get funding event for program by id
*/
- retrieve(fundingEventToken: string, options?: RequestOptions): APIPromise {
+ retrieve(fundingEventToken: string, options?: RequestOptions): APIPromise {
return this._client.get(path`/v1/funding_events/${fundingEventToken}`, options);
}
@@ -20,11 +20,8 @@ export class FundingEvents extends APIResource {
list(
query: FundingEventListParams | null | undefined = {},
options?: RequestOptions,
- ): PagePromise {
- return this._client.getAPIList('/v1/funding_events', CursorPage, {
- query,
- ...options,
- });
+ ): PagePromise {
+ return this._client.getAPIList('/v1/funding_events', CursorPage, { query, ...options });
}
/**
@@ -38,9 +35,9 @@ export class FundingEvents extends APIResource {
}
}
-export type FundingEventListResponsesCursorPage = CursorPage;
+export type FundingEventsCursorPage = CursorPage;
-export interface FundingEventRetrieveResponse {
+export interface FundingEvent {
/**
* Unique token ID
*/
@@ -70,7 +67,7 @@ export interface FundingEventRetrieveResponse {
/**
* Network settlement summary breakdown by network settlement date
*/
- network_settlement_summary: Array;
+ network_settlement_summary: Array;
/**
* Time of the previous high watermark
@@ -83,58 +80,7 @@ export interface FundingEventRetrieveResponse {
updated: string;
}
-export namespace FundingEventRetrieveResponse {
- export interface NetworkSettlementSummary {
- network_settlement_date: string;
-
- settled_gross_amount: number;
- }
-}
-
-export interface FundingEventListResponse {
- /**
- * Unique token ID
- */
- token: string;
-
- /**
- * Collection resource type
- */
- collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT';
-
- /**
- * IDs of collections, further information can be gathered from the appropriate
- * collection API based on collection_resource_type
- */
- collection_tokens: Array;
-
- /**
- * Time of the creation
- */
- created: string;
-
- /**
- * Time of the high watermark
- */
- high_watermark: string;
-
- /**
- * Network settlement summary breakdown by network settlement date
- */
- network_settlement_summary: Array;
-
- /**
- * Time of the previous high watermark
- */
- previous_high_watermark: string;
-
- /**
- * Time of the update
- */
- updated: string;
-}
-
-export namespace FundingEventListResponse {
+export namespace FundingEvent {
export interface NetworkSettlementSummary {
network_settlement_date: string;
@@ -163,10 +109,9 @@ export interface FundingEventListParams extends CursorPageParams {}
export declare namespace FundingEvents {
export {
- type FundingEventRetrieveResponse as FundingEventRetrieveResponse,
- type FundingEventListResponse as FundingEventListResponse,
+ type FundingEvent as FundingEvent,
type FundingEventRetrieveDetailsResponse as FundingEventRetrieveDetailsResponse,
- type FundingEventListResponsesCursorPage as FundingEventListResponsesCursorPage,
+ type FundingEventsCursorPage as FundingEventsCursorPage,
type FundingEventListParams as FundingEventListParams,
};
}
diff --git a/src/resources/index.ts b/src/resources/index.ts
index fa6d6864..ec4db1b3 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -56,6 +56,14 @@ export {
type BookTransferReverseParams,
type BookTransferResponsesCursorPage,
} from './book-transfers';
+export {
+ CardBulkOrders,
+ type CardBulkOrder,
+ type CardBulkOrderCreateParams,
+ type CardBulkOrderUpdateParams,
+ type CardBulkOrderListParams,
+ type CardBulkOrdersCursorPage,
+} from './card-bulk-orders';
export {
CardPrograms,
type CardProgram,
@@ -124,6 +132,7 @@ export {
} from './events/events';
export {
ExternalBankAccounts,
+ type ExternalBankAccount,
type ExternalBankAccountAddress,
type OwnerType,
type VerificationMethod,
@@ -132,8 +141,6 @@ export {
type ExternalBankAccountUpdateResponse,
type ExternalBankAccountListResponse,
type ExternalBankAccountRetryMicroDepositsResponse,
- type ExternalBankAccountRetryPrenoteResponse,
- type ExternalBankAccountUnpauseResponse,
type ExternalBankAccountCreateParams,
type ExternalBankAccountUpdateParams,
type ExternalBankAccountListParams,
@@ -156,6 +163,7 @@ export {
FinancialAccounts,
type CategoryDetails,
type FinancialAccount,
+ type FinancialAccountBalance,
type FinancialTransaction,
type StatementTotals,
type FinancialAccountCreateParams,
@@ -163,18 +171,19 @@ export {
type FinancialAccountListParams,
type FinancialAccountRegisterAccountNumberParams,
type FinancialAccountUpdateStatusParams,
+ type FinancialAccountBalancesSinglePage,
type FinancialTransactionsSinglePage,
type FinancialAccountsSinglePage,
} from './financial-accounts/financial-accounts';
export { Fraud } from './fraud/fraud';
export {
FundingEvents,
- type FundingEventRetrieveResponse,
- type FundingEventListResponse,
+ type FundingEvent,
type FundingEventRetrieveDetailsResponse,
type FundingEventListParams,
- type FundingEventListResponsesCursorPage,
+ type FundingEventsCursorPage,
} from './funding-events';
+export { InternalTransactionResource, type InternalTransaction } from './internal-transaction';
export {
ManagementOperations,
type ExternalResource,
@@ -211,10 +220,12 @@ export {
} from './payments';
export {
Reports,
+ type NetworkTotal,
type SettlementDetail,
type SettlementReport,
type SettlementSummaryDetails,
type SettlementDetailsCursorPage,
+ type NetworkTotalsCursorPage,
} from './reports/reports';
export {
ResponderEndpoints,
@@ -224,7 +235,7 @@ export {
type ResponderEndpointDeleteParams,
type ResponderEndpointCheckStatusParams,
} from './responder-endpoints';
-export { ThreeDS } from './three-ds/three-ds';
+export { ThreeDS, type ThreeDSAuthentication } from './three-ds/three-ds';
export {
TokenizationDecisioning,
type TokenizationSecret,
@@ -232,7 +243,13 @@ export {
} from './tokenization-decisioning';
export {
Tokenizations,
+ type Device,
+ type DigitalWalletTokenMetadata,
type Tokenization,
+ type TokenizationDeclineReason,
+ type TokenizationRuleResult,
+ type TokenizationTfaReason,
+ type WalletDecisioningInfo,
type TokenizationListParams,
type TokenizationResendActivationCodeParams,
type TokenizationSimulateParams,
@@ -241,6 +258,8 @@ export {
} from './tokenizations';
export {
Transactions,
+ type CardholderAuthentication,
+ type TokenInfo,
type Transaction,
type TransactionSimulateAuthorizationResponse,
type TransactionSimulateAuthorizationAdviceResponse,
diff --git a/src/resources/internal-transaction.ts b/src/resources/internal-transaction.ts
new file mode 100644
index 00000000..0bee5355
--- /dev/null
+++ b/src/resources/internal-transaction.ts
@@ -0,0 +1,47 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../core/resource';
+
+export class InternalTransactionResource extends APIResource {}
+
+export interface InternalTransaction {
+ token: string;
+
+ category: 'INTERNAL';
+
+ created: string;
+
+ currency: string;
+
+ descriptor: string;
+
+ events: Array;
+
+ pending_amount: number;
+
+ result: 'APPROVED' | 'DECLINED';
+
+ settled_amount: number;
+
+ status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED';
+
+ updated: string;
+}
+
+export namespace InternalTransaction {
+ export interface Event {
+ token: string;
+
+ amount: number;
+
+ created: string;
+
+ result: 'APPROVED' | 'DECLINED';
+
+ type: 'INTERNAL_ADJUSTMENT';
+ }
+}
+
+export declare namespace InternalTransactionResource {
+ export { type InternalTransaction as InternalTransaction };
+}
diff --git a/src/resources/reports/index.ts b/src/resources/reports/index.ts
index 5b423ecd..8d5c4156 100644
--- a/src/resources/reports/index.ts
+++ b/src/resources/reports/index.ts
@@ -2,9 +2,11 @@
export {
Reports,
+ type NetworkTotal,
type SettlementDetail,
type SettlementReport,
type SettlementSummaryDetails,
type SettlementDetailsCursorPage,
+ type NetworkTotalsCursorPage,
} from './reports';
export { Settlement, type SettlementListDetailsParams } from './settlement/index';
diff --git a/src/resources/reports/reports.ts b/src/resources/reports/reports.ts
index dea48a36..fb2a51d5 100644
--- a/src/resources/reports/reports.ts
+++ b/src/resources/reports/reports.ts
@@ -11,6 +11,98 @@ export class Reports extends APIResource {
export type SettlementDetailsCursorPage = CursorPage;
+export type NetworkTotalsCursorPage = CursorPage;
+
+export interface NetworkTotal {
+ /**
+ * Globally unique identifier.
+ */
+ token: string;
+
+ amounts: NetworkTotal.Amounts;
+
+ /**
+ * RFC 3339 timestamp for when the record was created. UTC time zone.
+ */
+ created: string;
+
+ /**
+ * 3-character alphabetic ISO 4217 code.
+ */
+ currency: string;
+
+ /**
+ * The institution that activity occurred on. For Mastercard: ICA (Interbank Card
+ * Association). For Maestro: institution ID. For Visa: lowest level SRE
+ * (Settlement Reporting Entity).
+ */
+ institution_id: string;
+
+ /**
+ * Indicates that all settlement records related to this Network Total are
+ * available in the details endpoint.
+ */
+ is_complete: boolean;
+
+ /**
+ * Card network where the transaction took place. AMEX, VISA, MASTERCARD, MAESTRO,
+ * or INTERLINK.
+ */
+ network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK';
+
+ /**
+ * Date that the network total record applies to. YYYY-MM-DD format.
+ */
+ report_date: string;
+
+ /**
+ * The institution responsible for settlement. For Mastercard: same as
+ * `institution_id`. For Maestro: billing ICA. For Visa: Funds Transfer SRE
+ * (FTSRE).
+ */
+ settlement_institution_id: string;
+
+ /**
+ * Settlement service.
+ */
+ settlement_service: string;
+
+ /**
+ * RFC 3339 timestamp for when the record was last updated. UTC time zone.
+ */
+ updated: string;
+
+ /**
+ * The clearing cycle that the network total record applies to. Mastercard only.
+ */
+ cycle?: number;
+}
+
+export namespace NetworkTotal {
+ export interface Amounts {
+ /**
+ * Total settlement amount excluding interchange, in currency's smallest unit.
+ */
+ gross_settlement: number;
+
+ /**
+ * Interchange amount, in currency's smallest unit.
+ */
+ interchange_fees: number;
+
+ /**
+ * `gross_settlement` net of `interchange_fees` and `visa_charges` (if applicable),
+ * in currency's smallest unit.
+ */
+ net_settlement: number;
+
+ /**
+ * Charges specific to Visa/Interlink, in currency's smallest unit.
+ */
+ visa_charges?: number;
+ }
+}
+
export interface SettlementDetail {
/**
* Globally unique identifier denoting the Settlement Detail.
@@ -264,6 +356,7 @@ Reports.Settlement = Settlement;
export declare namespace Reports {
export {
+ type NetworkTotal as NetworkTotal,
type SettlementDetail as SettlementDetail,
type SettlementReport as SettlementReport,
type SettlementSummaryDetails as SettlementSummaryDetails,
diff --git a/src/resources/reports/settlement/index.ts b/src/resources/reports/settlement/index.ts
index 87fb0631..fc30e957 100644
--- a/src/resources/reports/settlement/index.ts
+++ b/src/resources/reports/settlement/index.ts
@@ -1,10 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-export {
- NetworkTotals,
- type NetworkTotalRetrieveResponse,
- type NetworkTotalListResponse,
- type NetworkTotalListParams,
- type NetworkTotalListResponsesCursorPage,
-} from './network-totals';
+export { NetworkTotals, type NetworkTotalListParams } from './network-totals';
export { Settlement, type SettlementListDetailsParams } from './settlement';
diff --git a/src/resources/reports/settlement/network-totals.ts b/src/resources/reports/settlement/network-totals.ts
index 0250bf30..9b684c9c 100644
--- a/src/resources/reports/settlement/network-totals.ts
+++ b/src/resources/reports/settlement/network-totals.ts
@@ -1,6 +1,8 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../../core/resource';
+import * as ReportsAPI from '../reports';
+import { NetworkTotalsCursorPage } from '../reports';
import { APIPromise } from '../../../core/api-promise';
import { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pagination';
import { RequestOptions } from '../../../internal/request-options';
@@ -18,7 +20,7 @@ export class NetworkTotals extends APIResource {
* );
* ```
*/
- retrieve(token: string, options?: RequestOptions): APIPromise {
+ retrieve(token: string, options?: RequestOptions): APIPromise {
return this._client.get(path`/v1/reports/settlement/network_totals/${token}`, options);
}
@@ -28,7 +30,7 @@ export class NetworkTotals extends APIResource {
* @example
* ```ts
* // Automatically fetches more pages as needed.
- * for await (const networkTotalListResponse of client.reports.settlement.networkTotals.list()) {
+ * for await (const networkTotal of client.reports.settlement.networkTotals.list()) {
* // ...
* }
* ```
@@ -36,197 +38,15 @@ export class NetworkTotals extends APIResource {
list(
query: NetworkTotalListParams | null | undefined = {},
options?: RequestOptions,
- ): PagePromise {
+ ): PagePromise {
return this._client.getAPIList(
'/v1/reports/settlement/network_totals',
- CursorPage,
+ CursorPage,
{ query, ...options },
);
}
}
-export type NetworkTotalListResponsesCursorPage = CursorPage;
-
-export interface NetworkTotalRetrieveResponse {
- /**
- * Globally unique identifier.
- */
- token: string;
-
- amounts: NetworkTotalRetrieveResponse.Amounts;
-
- /**
- * RFC 3339 timestamp for when the record was created. UTC time zone.
- */
- created: string;
-
- /**
- * 3-character alphabetic ISO 4217 code.
- */
- currency: string;
-
- /**
- * The institution that activity occurred on. For Mastercard: ICA (Interbank Card
- * Association). For Maestro: institution ID. For Visa: lowest level SRE
- * (Settlement Reporting Entity).
- */
- institution_id: string;
-
- /**
- * Indicates that all settlement records related to this Network Total are
- * available in the details endpoint.
- */
- is_complete: boolean;
-
- /**
- * Card network where the transaction took place. AMEX, VISA, MASTERCARD, MAESTRO,
- * or INTERLINK.
- */
- network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK';
-
- /**
- * Date that the network total record applies to. YYYY-MM-DD format.
- */
- report_date: string;
-
- /**
- * The institution responsible for settlement. For Mastercard: same as
- * `institution_id`. For Maestro: billing ICA. For Visa: Funds Transfer SRE
- * (FTSRE).
- */
- settlement_institution_id: string;
-
- /**
- * Settlement service.
- */
- settlement_service: string;
-
- /**
- * RFC 3339 timestamp for when the record was last updated. UTC time zone.
- */
- updated: string;
-
- /**
- * The clearing cycle that the network total record applies to. Mastercard only.
- */
- cycle?: number;
-}
-
-export namespace NetworkTotalRetrieveResponse {
- export interface Amounts {
- /**
- * Total settlement amount excluding interchange, in currency's smallest unit.
- */
- gross_settlement: number;
-
- /**
- * Interchange amount, in currency's smallest unit.
- */
- interchange_fees: number;
-
- /**
- * `gross_settlement` net of `interchange_fees` and `visa_charges` (if applicable),
- * in currency's smallest unit.
- */
- net_settlement: number;
-
- /**
- * Charges specific to Visa/Interlink, in currency's smallest unit.
- */
- visa_charges?: number;
- }
-}
-
-export interface NetworkTotalListResponse {
- /**
- * Globally unique identifier.
- */
- token: string;
-
- amounts: NetworkTotalListResponse.Amounts;
-
- /**
- * RFC 3339 timestamp for when the record was created. UTC time zone.
- */
- created: string;
-
- /**
- * 3-character alphabetic ISO 4217 code.
- */
- currency: string;
-
- /**
- * The institution that activity occurred on. For Mastercard: ICA (Interbank Card
- * Association). For Maestro: institution ID. For Visa: lowest level SRE
- * (Settlement Reporting Entity).
- */
- institution_id: string;
-
- /**
- * Indicates that all settlement records related to this Network Total are
- * available in the details endpoint.
- */
- is_complete: boolean;
-
- /**
- * Card network where the transaction took place. AMEX, VISA, MASTERCARD, MAESTRO,
- * or INTERLINK.
- */
- network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK';
-
- /**
- * Date that the network total record applies to. YYYY-MM-DD format.
- */
- report_date: string;
-
- /**
- * The institution responsible for settlement. For Mastercard: same as
- * `institution_id`. For Maestro: billing ICA. For Visa: Funds Transfer SRE
- * (FTSRE).
- */
- settlement_institution_id: string;
-
- /**
- * Settlement service.
- */
- settlement_service: string;
-
- /**
- * RFC 3339 timestamp for when the record was last updated. UTC time zone.
- */
- updated: string;
-
- /**
- * The clearing cycle that the network total record applies to. Mastercard only.
- */
- cycle?: number;
-}
-
-export namespace NetworkTotalListResponse {
- export interface Amounts {
- /**
- * Total settlement amount excluding interchange, in currency's smallest unit.
- */
- gross_settlement: number;
-
- /**
- * Interchange amount, in currency's smallest unit.
- */
- interchange_fees: number;
-
- /**
- * `gross_settlement` net of `interchange_fees` and `visa_charges` (if applicable),
- * in currency's smallest unit.
- */
- net_settlement: number;
-
- /**
- * Charges specific to Visa/Interlink, in currency's smallest unit.
- */
- visa_charges?: number;
- }
-}
-
export interface NetworkTotalListParams extends CursorPageParams {
/**
* Datetime in RFC 3339 format. Only entries created after the specified time will
@@ -273,10 +93,7 @@ export interface NetworkTotalListParams extends CursorPageParams {
}
export declare namespace NetworkTotals {
- export {
- type NetworkTotalRetrieveResponse as NetworkTotalRetrieveResponse,
- type NetworkTotalListResponse as NetworkTotalListResponse,
- type NetworkTotalListResponsesCursorPage as NetworkTotalListResponsesCursorPage,
- type NetworkTotalListParams as NetworkTotalListParams,
- };
+ export { type NetworkTotalListParams as NetworkTotalListParams };
}
+
+export { type NetworkTotalsCursorPage };
diff --git a/src/resources/reports/settlement/settlement.ts b/src/resources/reports/settlement/settlement.ts
index 1724347b..e5357f0b 100644
--- a/src/resources/reports/settlement/settlement.ts
+++ b/src/resources/reports/settlement/settlement.ts
@@ -4,13 +4,7 @@ import { APIResource } from '../../../core/resource';
import * as ReportsAPI from '../reports';
import { SettlementDetailsCursorPage } from '../reports';
import * as NetworkTotalsAPI from './network-totals';
-import {
- NetworkTotalListParams,
- NetworkTotalListResponse,
- NetworkTotalListResponsesCursorPage,
- NetworkTotalRetrieveResponse,
- NetworkTotals,
-} from './network-totals';
+import { NetworkTotalListParams, NetworkTotals } from './network-totals';
import { APIPromise } from '../../../core/api-promise';
import { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pagination';
import { RequestOptions } from '../../../internal/request-options';
@@ -65,13 +59,7 @@ Settlement.NetworkTotals = NetworkTotals;
export declare namespace Settlement {
export { type SettlementListDetailsParams as SettlementListDetailsParams };
- export {
- NetworkTotals as NetworkTotals,
- type NetworkTotalRetrieveResponse as NetworkTotalRetrieveResponse,
- type NetworkTotalListResponse as NetworkTotalListResponse,
- type NetworkTotalListResponsesCursorPage as NetworkTotalListResponsesCursorPage,
- type NetworkTotalListParams as NetworkTotalListParams,
- };
+ export { NetworkTotals as NetworkTotals, type NetworkTotalListParams as NetworkTotalListParams };
}
export { type SettlementDetailsCursorPage };
diff --git a/src/resources/three-ds/authentication.ts b/src/resources/three-ds/authentication.ts
index 5b220912..79518b8e 100644
--- a/src/resources/three-ds/authentication.ts
+++ b/src/resources/three-ds/authentication.ts
@@ -1,6 +1,7 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
+import * as ThreeDSAPI from './three-ds';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';
import { path } from '../../internal/utils/path';
@@ -11,7 +12,7 @@ export class Authentication extends APIResource {
*
* @example
* ```ts
- * const authentication =
+ * const threeDSAuthentication =
* await client.threeDS.authentication.retrieve(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* );
@@ -20,7 +21,7 @@ export class Authentication extends APIResource {
retrieve(
threeDSAuthenticationToken: string,
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.get(path`/v1/three_ds_authentication/${threeDSAuthenticationToken}`, options);
}
@@ -73,666 +74,6 @@ export class Authentication extends APIResource {
}
}
-/**
- * Represents a 3DS authentication
- */
-export interface AuthenticationRetrieveResponse {
- /**
- * Globally unique identifier for the 3DS authentication. Permitted values:
- * 36-digit version 4 UUID (including hyphens).
- */
- token: string;
-
- /**
- * Type of account/card that is being used for the transaction. Maps to EMV 3DS
- * field `acctType`.
- */
- account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE' | null;
-
- /**
- * Indicates the outcome of the 3DS authentication process.
- */
- authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION';
-
- /**
- * Indicates whether the expiration date provided by the cardholder during checkout
- * matches Lithic's record of the card's expiration date.
- */
- card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT';
-
- /**
- * Globally unique identifier for the card on which the 3DS authentication has
- * occurred. Permitted values: 36-digit version 4 UUID (including hyphens).
- */
- card_token: string;
-
- /**
- * Object containing data about the cardholder provided during the transaction.
- */
- cardholder: AuthenticationRetrieveResponse.Cardholder;
-
- /**
- * Channel in which the authentication occurs. Maps to EMV 3DS field
- * `deviceChannel`.
- */
- channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED';
-
- /**
- * Date and time when the authentication was created in Lithic's system. Permitted
- * values: Date string in the ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ.
- */
- created: string;
-
- /**
- * Object containing data about the merchant involved in the e-commerce
- * transaction.
- */
- merchant: AuthenticationRetrieveResponse.Merchant;
-
- /**
- * Either PAYMENT_AUTHENTICATION or NON_PAYMENT_AUTHENTICATION. For
- * NON_PAYMENT_AUTHENTICATION, additional_data and transaction fields are not
- * populated.
- */
- message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION';
-
- /**
- * Indicates whether a challenge is requested for this transaction
- *
- * - `NO_PREFERENCE` - No Preference
- * - `NO_CHALLENGE_REQUESTED` - No Challenge Requested
- * - `CHALLENGE_PREFERENCE` - Challenge requested (3DS Requestor preference)
- * - `CHALLENGE_MANDATE` - Challenge requested (Mandate)
- * - `NO_CHALLENGE_RISK_ALREADY_ASSESSED` - No Challenge requested (Transactional
- * risk analysis is already performed)
- * - `DATA_SHARE_ONLY` - No Challenge requested (Data Share Only)
- * - `OTHER` - Other indicators not captured by above. These are rarely used
- */
- three_ds_requestor_challenge_indicator:
- | 'NO_PREFERENCE'
- | 'NO_CHALLENGE_REQUESTED'
- | 'CHALLENGE_PREFERENCE'
- | 'CHALLENGE_MANDATE'
- | 'NO_CHALLENGE_RISK_ALREADY_ASSESSED'
- | 'DATA_SHARE_ONLY'
- | 'OTHER';
-
- /**
- * Object containing additional data about the 3DS request that is beyond the EMV
- * 3DS standard spec (e.g., specific fields that only certain card networks send
- * but are not required across all 3DS requests).
- */
- additional_data?: AuthenticationRetrieveResponse.AdditionalData | null;
-
- /**
- * Object containing data about the app used in the e-commerce transaction. Present
- * if the channel is 'APP_BASED'.
- */
- app?: AuthenticationRetrieveResponse.App | null;
-
- /**
- * Type of authentication request - i.e., the type of transaction or interaction is
- * causing the merchant to request an authentication. Maps to EMV 3DS field
- * `threeDSRequestorAuthenticationInd`.
- */
- authentication_request_type?:
- | 'ADD_CARD'
- | 'BILLING_AGREEMENT'
- | 'DELAYED_SHIPMENT'
- | 'EMV_TOKEN_CARDHOLDER_VERIFICATION'
- | 'INSTALLMENT_TRANSACTION'
- | 'MAINTAIN_CARD'
- | 'PAYMENT_TRANSACTION'
- | 'RECURRING_TRANSACTION'
- | 'SPLIT_PAYMENT'
- | 'SPLIT_SHIPMENT'
- | null;
-
- /**
- * Object containing data about the browser used in the e-commerce transaction.
- * Present if the channel is 'BROWSER'.
- */
- browser?: AuthenticationRetrieveResponse.Browser | null;
-
- /**
- * Metadata about the challenge method and delivery. Only present when a challenge
- * is triggered.
- */
- challenge_metadata?: AuthenticationRetrieveResponse.ChallengeMetadata | null;
-
- /**
- * Entity that orchestrates the challenge. This won't be set for authentications
- * for which a decision has not yet been made (e.g. in-flight customer decisioning
- * request).
- */
- challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE' | null;
-
- /**
- * Entity that made the authentication decision. This won't be set for
- * authentications for which a decision has not yet been made (e.g. in-flight
- * customer decisioning request).
- */
- decision_made_by?:
- | 'LITHIC_RULES'
- | 'LITHIC_DEFAULT'
- | 'CUSTOMER_RULES'
- | 'CUSTOMER_ENDPOINT'
- | 'NETWORK'
- | 'UNKNOWN'
- | null;
-
- /**
- * Type of 3DS Requestor Initiated (3RI) request — i.e., a 3DS authentication that
- * takes place at the initiation of the merchant rather than the cardholder. The
- * most common example of this is where a merchant is authenticating before billing
- * for a recurring transaction such as a pay TV subscription or a utility bill.
- * Maps to EMV 3DS field `threeRIInd`.
- */
- three_ri_request_type?:
- | 'ACCOUNT_VERIFICATION'
- | 'ADD_CARD'
- | 'BILLING_AGREEMENT'
- | 'CARD_SECURITY_CODE_STATUS_CHECK'
- | 'DELAYED_SHIPMENT'
- | 'DEVICE_BINDING_STATUS_CHECK'
- | 'INSTALLMENT_TRANSACTION'
- | 'MAIL_ORDER'
- | 'MAINTAIN_CARD_INFO'
- | 'OTHER_PAYMENT'
- | 'RECURRING_TRANSACTION'
- | 'SPLIT_PAYMENT'
- | 'SPLIT_SHIPMENT'
- | 'TELEPHONE_ORDER'
- | 'TOP_UP'
- | 'TRUST_LIST_STATUS_CHECK'
- | null;
-
- /**
- * Object containing data about the e-commerce transaction for which the merchant
- * is requesting authentication.
- */
- transaction?: AuthenticationRetrieveResponse.Transaction | null;
-}
-
-export namespace AuthenticationRetrieveResponse {
- /**
- * Object containing data about the cardholder provided during the transaction.
- */
- export interface Cardholder {
- /**
- * Indicates whether the shipping address and billing address provided by the
- * cardholder are the same. This value - and assessment of whether the addresses
- * match - is provided directly in the 3DS request and is not determined by Lithic.
- * Maps to EMV 3DS field `addrMatch`.
- */
- address_match?: boolean | null;
-
- /**
- * Lithic's evaluation result comparing the transaction's address data with the
- * cardholder KYC data if it exists. In the event Lithic does not have any
- * Cardholder KYC data, or the transaction does not contain any address data,
- * NOT_PRESENT will be returned
- */
- address_on_file_match?: 'MATCH' | 'MATCH_ADDRESS_ONLY' | 'MATCH_ZIP_ONLY' | 'MISMATCH' | 'NOT_PRESENT';
-
- /**
- * Object containing data on the billing address provided during the transaction.
- */
- billing_address?: Cardholder.BillingAddress;
-
- /**
- * Email address that is either provided by the cardholder or is on file with the
- * merchant in a 3RI request. Maps to EMV 3DS field `email`.
- */
- email?: string | null;
-
- /**
- * Name of the cardholder. Maps to EMV 3DS field `cardholderName`.
- */
- name?: string | null;
-
- /**
- * Home phone number in E.164 format provided by the cardholder. Maps to EMV 3DS
- * fields `homePhone.cc` and `homePhone.subscriber`.
- */
- phone_number_home?: string | null;
-
- /**
- * Mobile/cell phone number in E.164 format provided by the cardholder. Maps to EMV
- * 3DS fields `mobilePhone.cc` and `mobilePhone.subscriber`.
- */
- phone_number_mobile?: string | null;
-
- /**
- * Work phone number in E.164 format provided by the cardholder. Maps to EMV 3DS
- * fields `workPhone.cc` and `workPhone.subscriber`.
- */
- phone_number_work?: string | null;
-
- /**
- * Object containing data on the shipping address provided during the transaction.
- */
- shipping_address?: Cardholder.ShippingAddress;
- }
-
- export namespace Cardholder {
- /**
- * Object containing data on the billing address provided during the transaction.
- */
- export interface BillingAddress {
- /**
- * First line of the street address provided by the cardholder.
- */
- address1?: string | null;
-
- /**
- * Second line of the street address provided by the cardholder.
- */
- address2?: string | null;
-
- /**
- * Third line of the street address provided by the cardholder.
- */
- address3?: string | null;
-
- /**
- * City of the address provided by the cardholder.
- */
- city?: string | null;
-
- /**
- * Country of the address provided by the cardholder in ISO 3166-1 alpha-3 format
- * (e.g. USA)
- */
- country?: string | null;
-
- /**
- * Postal code (e.g., ZIP code) of the address provided by the cardholder
- */
- postal_code?: string | null;
- }
-
- /**
- * Object containing data on the shipping address provided during the transaction.
- */
- export interface ShippingAddress {
- /**
- * First line of the street address provided by the cardholder.
- */
- address1?: string | null;
-
- /**
- * Second line of the street address provided by the cardholder.
- */
- address2?: string | null;
-
- /**
- * Third line of the street address provided by the cardholder.
- */
- address3?: string | null;
-
- /**
- * City of the address provided by the cardholder.
- */
- city?: string | null;
-
- /**
- * Country of the address provided by the cardholder in ISO 3166-1 alpha-3 format
- * (e.g. USA)
- */
- country?: string | null;
-
- /**
- * Postal code (e.g., ZIP code) of the address provided by the cardholder
- */
- postal_code?: string | null;
- }
- }
-
- /**
- * Object containing data about the merchant involved in the e-commerce
- * transaction.
- */
- export interface Merchant {
- /**
- * Object containing additional data indicating additional risk factors related to
- * the e-commerce transaction.
- */
- risk_indicator: Merchant.RiskIndicator;
-
- /**
- * Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field
- * `acquirerMerchantId`. May not be present for non-payment authentications.
- */
- id?: string | null;
-
- /**
- * Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS
- * field `merchantCountryCode`. Permitted values: ISO 3166-1 alpha-3 country code
- * (e.g., USA). May not be present for non-payment authentications.
- */
- country?: string | null;
-
- /**
- * Merchant category code assigned to the merchant that describes its business
- * activity type. Maps to EMV 3DS field `mcc`. May not be present for non-payment
- * authentications.
- */
- mcc?: string | null;
-
- /**
- * Name of the merchant. Maps to EMV 3DS field `merchantName`. May not be present
- * for non-payment authentications.
- */
- name?: string | null;
- }
-
- export namespace Merchant {
- /**
- * Object containing additional data indicating additional risk factors related to
- * the e-commerce transaction.
- */
- export interface RiskIndicator {
- /**
- * In transactions with electronic delivery, email address to which merchandise is
- * delivered. Maps to EMV 3DS field `deliveryEmailAddress`.
- */
- delivery_email_address?: string | null;
-
- /**
- * The delivery time frame for the merchandise. Maps to EMV 3DS field
- * `deliveryTimeframe`.
- */
- delivery_time_frame?:
- | 'ELECTRONIC_DELIVERY'
- | 'OVERNIGHT_SHIPPING'
- | 'SAME_DAY_SHIPPING'
- | 'TWO_DAY_OR_MORE_SHIPPING'
- | null;
-
- /**
- * In prepaid or gift card purchase transactions, purchase amount total in major
- * units (e.g., a purchase of USD $205.10 would be 205). Maps to EMV 3DS field
- * `giftCardAmount`.
- */
- gift_card_amount?: number | null;
-
- /**
- * In prepaid or gift card purchase transactions, count of individual prepaid or
- * gift cards/codes purchased. Maps to EMV 3DS field `giftCardCount`.
- */
- gift_card_count?: number | null;
-
- /**
- * In prepaid or gift card purchase transactions, currency code of the gift card.
- * Maps to EMV 3DS field `giftCardCurr`. Permitted values: ISO 4217 three-character
- * currency code (e.g., USD).
- */
- gift_card_currency?: string | null;
-
- /**
- * Indicates whether the purchase is for merchandise that is available now or at a
- * future date. Maps to EMV 3DS field `preOrderPurchaseInd`.
- */
- order_availability?: 'FUTURE_AVAILABILITY' | 'MERCHANDISE_AVAILABLE' | null;
-
- /**
- * In pre-order purchase transactions, the expected date that the merchandise will
- * be available. Maps to EMV 3DS field `preOrderDate`. Permitted values: Date
- * string in the ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ
- */
- pre_order_available_date?: string | null;
-
- /**
- * Indicates whether the cardholder is reordering previously purchased merchandise.
- * Maps to EMV 3DS field `reorderItemsInd`.
- */
- reorder_items?: 'FIRST_TIME_ORDERED' | 'REORDERED' | null;
-
- /**
- * Shipping method that the cardholder chose for the transaction. If purchase
- * includes one or more item, this indicator is used for the physical goods; if the
- * purchase only includes digital goods, this indicator is used to describe the
- * most expensive item purchased. Maps to EMV 3DS field `shipIndicator`.
- */
- shipping_method?:
- | 'DIGITAL_GOODS'
- | 'LOCKER_DELIVERY'
- | 'OTHER'
- | 'PICK_UP_AND_GO_DELIVERY'
- | 'SHIP_TO_BILLING_ADDRESS'
- | 'SHIP_TO_NON_BILLING_ADDRESS'
- | 'SHIP_TO_OTHER_VERIFIED_ADDRESS'
- | 'SHIP_TO_STORE'
- | 'TRAVEL_AND_EVENT_TICKETS'
- | null;
- }
- }
-
- /**
- * Object containing additional data about the 3DS request that is beyond the EMV
- * 3DS standard spec (e.g., specific fields that only certain card networks send
- * but are not required across all 3DS requests).
- */
- export interface AdditionalData {
- /**
- * Mastercard only: Indicates whether the network would have considered the
- * authentication request to be low risk or not.
- */
- network_decision?: 'LOW_RISK' | 'NOT_LOW_RISK' | null;
-
- /**
- * Mastercard only: Assessment by the network of the authentication risk level,
- * with a higher value indicating a higher amount of risk. Permitted values:
- * Integer between 0-950, in increments of 50.
- */
- network_risk_score?: number | null;
- }
-
- /**
- * Object containing data about the app used in the e-commerce transaction. Present
- * if the channel is 'APP_BASED'.
- */
- export interface App {
- /**
- * Device model: e.g. "Apple iPhone 16".
- */
- device?: string | null;
-
- /**
- * Raw device information - base64-encoded JSON object. Maps to EMV 3DS field
- * `deviceInfo`.
- */
- device_info?: string | null;
-
- /**
- * IP address of the device.
- */
- ip?: string;
-
- /**
- * Latitude coordinate of current device location.
- */
- latitude?: number | null;
-
- /**
- * Device locale: e.g. "en-US".
- */
- locale?: string | null;
-
- /**
- * Longitude coordinate of current device location.
- */
- longitude?: number | null;
-
- /**
- * Operating System: e.g. "Android 12", "iOS 17.1".
- */
- os?: string | null;
-
- /**
- * Device platform: Android, iOS, Windows, etc.
- */
- platform?: string | null;
-
- /**
- * Screen height in pixels.
- */
- screen_height?: number | null;
-
- /**
- * Screen width in pixels.
- */
- screen_width?: number | null;
-
- /**
- * Time zone offset in minutes between UTC and device local time.
- */
- time_zone?: string | null;
- }
-
- /**
- * Object containing data about the browser used in the e-commerce transaction.
- * Present if the channel is 'BROWSER'.
- */
- export interface Browser {
- /**
- * Content of the HTTP accept headers as sent from the cardholder's browser to the
- * 3DS requestor (e.g., merchant or digital wallet).
- */
- accept_header?: string | null;
-
- /**
- * IP address of the browser as returned by the HTTP headers to the 3DS requestor
- * (e.g., merchant or digital wallet). Maps to EMV 3DS field `browserIP`.
- */
- ip?: string | null;
-
- /**
- * Indicates whether the cardholder's browser has the ability to execute Java. Maps
- * to EMV 3DS field `browserJavaEnabled`.
- */
- java_enabled?: boolean | null;
-
- /**
- * Indicates whether the cardholder's browser has the ability to execute
- * JavaScript. Maps to EMV 3DS field `browserJavascriptEnabled`.
- */
- javascript_enabled?: boolean | null;
-
- /**
- * Language of the cardholder's browser as defined in IETF BCP47. Maps to EMV 3DS
- * field `browserLanguage`.
- */
- language?: string | null;
-
- /**
- * Time zone offset in minutes between UTC and browser local time. Maps to EMV 3DS
- * field `browserTz`.
- */
- time_zone?: string | null;
-
- /**
- * Content of the HTTP user-agent header. Maps to EMV 3DS field `browserUserAgent`.
- */
- user_agent?: string | null;
- }
-
- /**
- * Metadata about the challenge method and delivery. Only present when a challenge
- * is triggered.
- */
- export interface ChallengeMetadata {
- /**
- * The type of challenge method used for authentication.
- */
- method_type: 'SMS_OTP' | 'OUT_OF_BAND';
-
- /**
- * Indicates the status of the challenge
- *
- * - SUCCESS - Cardholder completed the challenge successfully
- * - PENDING - Challenge was issued to the cardholder and was not completed yet
- * - SMS_DELIVERY_FAILED - Lithic confirmed undeliverability of the SMS to the
- * provided phone number. Relevant only for SMS_OTP method
- * - CARDHOLDER_TIMEOUT - Cardholder failed to complete the challenge within the
- * given challenge TTL
- * - CANCELED_VIA_CHALLENGE_UI - Cardholder canceled the challenge by selecting
- * "cancel" on the challenge UI
- * - CANCELED_OOB - Cardholder canceled the challenge out of band
- * - ATTEMPTS_EXCEEDED - Cardholder failed the challenge by either entering an
- * incorrect OTP more than the allowed number of times or requesting a new OTP
- * more than the allowed number of times
- * - ABORTED - Merchant aborted authentication after a challenge was requested
- * - ERROR - The challenge failed for a reason different than those documented
- */
- status:
- | 'SUCCESS'
- | 'PENDING'
- | 'SMS_DELIVERY_FAILED'
- | 'CARDHOLDER_TIMEOUT'
- | 'CANCELED_VIA_CHALLENGE_UI'
- | 'CANCELED_OOB'
- | 'ATTEMPTS_EXCEEDED'
- | 'ABORTED'
- | 'ERROR';
-
- /**
- * The phone number used for delivering the OTP. Relevant only for SMS_OTP method.
- */
- phone_number?: string | null;
- }
-
- /**
- * Object containing data about the e-commerce transaction for which the merchant
- * is requesting authentication.
- */
- export interface Transaction {
- /**
- * Amount of the purchase in minor units of currency with all punctuation removed.
- * Maps to EMV 3DS field `purchaseAmount`.
- */
- amount: number;
-
- /**
- * Approximate amount of the purchase in minor units of cardholder currency.
- * Derived from `amount` using a daily conversion rate.
- */
- cardholder_amount: number | null;
-
- /**
- * Currency of the purchase. Maps to EMV 3DS field `purchaseCurrency`. Permitted
- * values: ISO 4217 three-character currency code (e.g., USD).
- */
- currency: string;
-
- /**
- * Minor units of currency, as specified in ISO 4217 currency exponent. Maps to EMV
- * 3DS field `purchaseExponent`.
- */
- currency_exponent: number;
-
- /**
- * Date and time when the authentication was generated by the merchant/acquirer's
- * 3DS server. Maps to EMV 3DS field `purchaseDate`. Permitted values: Date string
- * in the ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ.
- */
- date_time: string;
-
- /**
- * Type of the transaction for which a 3DS authentication request is occurring.
- * Maps to EMV 3DS field `transType`.
- */
- type:
- | 'ACCOUNT_FUNDING'
- | 'CHECK_ACCEPTANCE'
- | 'GOODS_SERVICE_PURCHASE'
- | 'PREPAID_ACTIVATION_AND_LOAD'
- | 'QUASI_CASH_TRANSACTION'
- | null;
- }
-}
-
export interface AuthenticationSimulateResponse {
/**
* Globally unique identifier for the 3DS authentication.
@@ -825,7 +166,6 @@ export interface AuthenticationSimulateOtpEntryParams {
export declare namespace Authentication {
export {
- type AuthenticationRetrieveResponse as AuthenticationRetrieveResponse,
type AuthenticationSimulateResponse as AuthenticationSimulateResponse,
type AuthenticationSimulateParams as AuthenticationSimulateParams,
type AuthenticationSimulateOtpEntryParams as AuthenticationSimulateOtpEntryParams,
diff --git a/src/resources/three-ds/index.ts b/src/resources/three-ds/index.ts
index 13c4daf9..63670fa7 100644
--- a/src/resources/three-ds/index.ts
+++ b/src/resources/three-ds/index.ts
@@ -2,7 +2,6 @@
export {
Authentication,
- type AuthenticationRetrieveResponse,
type AuthenticationSimulateResponse,
type AuthenticationSimulateParams,
type AuthenticationSimulateOtpEntryParams,
@@ -14,4 +13,4 @@ export {
type DecisioningRetrieveSecretResponse,
type DecisioningChallengeResponseParams,
} from './decisioning';
-export { ThreeDS } from './three-ds';
+export { ThreeDS, type ThreeDSAuthentication } from './three-ds';
diff --git a/src/resources/three-ds/three-ds.ts b/src/resources/three-ds/three-ds.ts
index f1e42eeb..93c2c3b9 100644
--- a/src/resources/three-ds/three-ds.ts
+++ b/src/resources/three-ds/three-ds.ts
@@ -4,7 +4,6 @@ import { APIResource } from '../../core/resource';
import * as AuthenticationAPI from './authentication';
import {
Authentication,
- AuthenticationRetrieveResponse,
AuthenticationSimulateOtpEntryParams,
AuthenticationSimulateParams,
AuthenticationSimulateResponse,
@@ -23,13 +22,674 @@ export class ThreeDS extends APIResource {
decisioning: DecisioningAPI.Decisioning = new DecisioningAPI.Decisioning(this._client);
}
+/**
+ * Represents a 3DS authentication
+ */
+export interface ThreeDSAuthentication {
+ /**
+ * Globally unique identifier for the 3DS authentication. Permitted values:
+ * 36-digit version 4 UUID (including hyphens).
+ */
+ token: string;
+
+ /**
+ * Type of account/card that is being used for the transaction. Maps to EMV 3DS
+ * field `acctType`.
+ */
+ account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE' | null;
+
+ /**
+ * Indicates the outcome of the 3DS authentication process.
+ */
+ authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION';
+
+ /**
+ * Indicates whether the expiration date provided by the cardholder during checkout
+ * matches Lithic's record of the card's expiration date.
+ */
+ card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT';
+
+ /**
+ * Globally unique identifier for the card on which the 3DS authentication has
+ * occurred. Permitted values: 36-digit version 4 UUID (including hyphens).
+ */
+ card_token: string;
+
+ /**
+ * Object containing data about the cardholder provided during the transaction.
+ */
+ cardholder: ThreeDSAuthentication.Cardholder;
+
+ /**
+ * Channel in which the authentication occurs. Maps to EMV 3DS field
+ * `deviceChannel`.
+ */
+ channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED';
+
+ /**
+ * Date and time when the authentication was created in Lithic's system. Permitted
+ * values: Date string in the ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ.
+ */
+ created: string;
+
+ /**
+ * Object containing data about the merchant involved in the e-commerce
+ * transaction.
+ */
+ merchant: ThreeDSAuthentication.Merchant;
+
+ /**
+ * Either PAYMENT_AUTHENTICATION or NON_PAYMENT_AUTHENTICATION. For
+ * NON_PAYMENT_AUTHENTICATION, additional_data and transaction fields are not
+ * populated.
+ */
+ message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION';
+
+ /**
+ * Indicates whether a challenge is requested for this transaction
+ *
+ * - `NO_PREFERENCE` - No Preference
+ * - `NO_CHALLENGE_REQUESTED` - No Challenge Requested
+ * - `CHALLENGE_PREFERENCE` - Challenge requested (3DS Requestor preference)
+ * - `CHALLENGE_MANDATE` - Challenge requested (Mandate)
+ * - `NO_CHALLENGE_RISK_ALREADY_ASSESSED` - No Challenge requested (Transactional
+ * risk analysis is already performed)
+ * - `DATA_SHARE_ONLY` - No Challenge requested (Data Share Only)
+ * - `OTHER` - Other indicators not captured by above. These are rarely used
+ */
+ three_ds_requestor_challenge_indicator:
+ | 'NO_PREFERENCE'
+ | 'NO_CHALLENGE_REQUESTED'
+ | 'CHALLENGE_PREFERENCE'
+ | 'CHALLENGE_MANDATE'
+ | 'NO_CHALLENGE_RISK_ALREADY_ASSESSED'
+ | 'DATA_SHARE_ONLY'
+ | 'OTHER';
+
+ /**
+ * Object containing additional data about the 3DS request that is beyond the EMV
+ * 3DS standard spec (e.g., specific fields that only certain card networks send
+ * but are not required across all 3DS requests).
+ */
+ additional_data?: ThreeDSAuthentication.AdditionalData | null;
+
+ /**
+ * Object containing data about the app used in the e-commerce transaction. Present
+ * if the channel is 'APP_BASED'.
+ */
+ app?: ThreeDSAuthentication.App | null;
+
+ /**
+ * Type of authentication request - i.e., the type of transaction or interaction is
+ * causing the merchant to request an authentication. Maps to EMV 3DS field
+ * `threeDSRequestorAuthenticationInd`.
+ */
+ authentication_request_type?:
+ | 'ADD_CARD'
+ | 'BILLING_AGREEMENT'
+ | 'DELAYED_SHIPMENT'
+ | 'EMV_TOKEN_CARDHOLDER_VERIFICATION'
+ | 'INSTALLMENT_TRANSACTION'
+ | 'MAINTAIN_CARD'
+ | 'PAYMENT_TRANSACTION'
+ | 'RECURRING_TRANSACTION'
+ | 'SPLIT_PAYMENT'
+ | 'SPLIT_SHIPMENT'
+ | null;
+
+ /**
+ * Object containing data about the browser used in the e-commerce transaction.
+ * Present if the channel is 'BROWSER'.
+ */
+ browser?: ThreeDSAuthentication.Browser | null;
+
+ /**
+ * Metadata about the challenge method and delivery. Only present when a challenge
+ * is triggered.
+ */
+ challenge_metadata?: ThreeDSAuthentication.ChallengeMetadata | null;
+
+ /**
+ * Entity that orchestrates the challenge. This won't be set for authentications
+ * for which a decision has not yet been made (e.g. in-flight customer decisioning
+ * request).
+ */
+ challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE' | null;
+
+ /**
+ * Entity that made the authentication decision. This won't be set for
+ * authentications for which a decision has not yet been made (e.g. in-flight
+ * customer decisioning request).
+ */
+ decision_made_by?:
+ | 'LITHIC_RULES'
+ | 'LITHIC_DEFAULT'
+ | 'CUSTOMER_RULES'
+ | 'CUSTOMER_ENDPOINT'
+ | 'NETWORK'
+ | 'UNKNOWN'
+ | null;
+
+ /**
+ * Type of 3DS Requestor Initiated (3RI) request — i.e., a 3DS authentication that
+ * takes place at the initiation of the merchant rather than the cardholder. The
+ * most common example of this is where a merchant is authenticating before billing
+ * for a recurring transaction such as a pay TV subscription or a utility bill.
+ * Maps to EMV 3DS field `threeRIInd`.
+ */
+ three_ri_request_type?:
+ | 'ACCOUNT_VERIFICATION'
+ | 'ADD_CARD'
+ | 'BILLING_AGREEMENT'
+ | 'CARD_SECURITY_CODE_STATUS_CHECK'
+ | 'DELAYED_SHIPMENT'
+ | 'DEVICE_BINDING_STATUS_CHECK'
+ | 'INSTALLMENT_TRANSACTION'
+ | 'MAIL_ORDER'
+ | 'MAINTAIN_CARD_INFO'
+ | 'OTHER_PAYMENT'
+ | 'RECURRING_TRANSACTION'
+ | 'SPLIT_PAYMENT'
+ | 'SPLIT_SHIPMENT'
+ | 'TELEPHONE_ORDER'
+ | 'TOP_UP'
+ | 'TRUST_LIST_STATUS_CHECK'
+ | null;
+
+ /**
+ * Object containing data about the e-commerce transaction for which the merchant
+ * is requesting authentication.
+ */
+ transaction?: ThreeDSAuthentication.Transaction | null;
+}
+
+export namespace ThreeDSAuthentication {
+ /**
+ * Object containing data about the cardholder provided during the transaction.
+ */
+ export interface Cardholder {
+ /**
+ * Indicates whether the shipping address and billing address provided by the
+ * cardholder are the same. This value - and assessment of whether the addresses
+ * match - is provided directly in the 3DS request and is not determined by Lithic.
+ * Maps to EMV 3DS field `addrMatch`.
+ */
+ address_match?: boolean | null;
+
+ /**
+ * Lithic's evaluation result comparing the transaction's address data with the
+ * cardholder KYC data if it exists. In the event Lithic does not have any
+ * Cardholder KYC data, or the transaction does not contain any address data,
+ * NOT_PRESENT will be returned
+ */
+ address_on_file_match?: 'MATCH' | 'MATCH_ADDRESS_ONLY' | 'MATCH_ZIP_ONLY' | 'MISMATCH' | 'NOT_PRESENT';
+
+ /**
+ * Object containing data on the billing address provided during the transaction.
+ */
+ billing_address?: Cardholder.BillingAddress;
+
+ /**
+ * Email address that is either provided by the cardholder or is on file with the
+ * merchant in a 3RI request. Maps to EMV 3DS field `email`.
+ */
+ email?: string | null;
+
+ /**
+ * Name of the cardholder. Maps to EMV 3DS field `cardholderName`.
+ */
+ name?: string | null;
+
+ /**
+ * Home phone number in E.164 format provided by the cardholder. Maps to EMV 3DS
+ * fields `homePhone.cc` and `homePhone.subscriber`.
+ */
+ phone_number_home?: string | null;
+
+ /**
+ * Mobile/cell phone number in E.164 format provided by the cardholder. Maps to EMV
+ * 3DS fields `mobilePhone.cc` and `mobilePhone.subscriber`.
+ */
+ phone_number_mobile?: string | null;
+
+ /**
+ * Work phone number in E.164 format provided by the cardholder. Maps to EMV 3DS
+ * fields `workPhone.cc` and `workPhone.subscriber`.
+ */
+ phone_number_work?: string | null;
+
+ /**
+ * Object containing data on the shipping address provided during the transaction.
+ */
+ shipping_address?: Cardholder.ShippingAddress;
+ }
+
+ export namespace Cardholder {
+ /**
+ * Object containing data on the billing address provided during the transaction.
+ */
+ export interface BillingAddress {
+ /**
+ * First line of the street address provided by the cardholder.
+ */
+ address1?: string | null;
+
+ /**
+ * Second line of the street address provided by the cardholder.
+ */
+ address2?: string | null;
+
+ /**
+ * Third line of the street address provided by the cardholder.
+ */
+ address3?: string | null;
+
+ /**
+ * City of the address provided by the cardholder.
+ */
+ city?: string | null;
+
+ /**
+ * Country of the address provided by the cardholder in ISO 3166-1 alpha-3 format
+ * (e.g. USA)
+ */
+ country?: string | null;
+
+ /**
+ * Postal code (e.g., ZIP code) of the address provided by the cardholder
+ */
+ postal_code?: string | null;
+ }
+
+ /**
+ * Object containing data on the shipping address provided during the transaction.
+ */
+ export interface ShippingAddress {
+ /**
+ * First line of the street address provided by the cardholder.
+ */
+ address1?: string | null;
+
+ /**
+ * Second line of the street address provided by the cardholder.
+ */
+ address2?: string | null;
+
+ /**
+ * Third line of the street address provided by the cardholder.
+ */
+ address3?: string | null;
+
+ /**
+ * City of the address provided by the cardholder.
+ */
+ city?: string | null;
+
+ /**
+ * Country of the address provided by the cardholder in ISO 3166-1 alpha-3 format
+ * (e.g. USA)
+ */
+ country?: string | null;
+
+ /**
+ * Postal code (e.g., ZIP code) of the address provided by the cardholder
+ */
+ postal_code?: string | null;
+ }
+ }
+
+ /**
+ * Object containing data about the merchant involved in the e-commerce
+ * transaction.
+ */
+ export interface Merchant {
+ /**
+ * Object containing additional data indicating additional risk factors related to
+ * the e-commerce transaction.
+ */
+ risk_indicator: Merchant.RiskIndicator;
+
+ /**
+ * Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field
+ * `acquirerMerchantId`. May not be present for non-payment authentications.
+ */
+ id?: string | null;
+
+ /**
+ * Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS
+ * field `merchantCountryCode`. Permitted values: ISO 3166-1 alpha-3 country code
+ * (e.g., USA). May not be present for non-payment authentications.
+ */
+ country?: string | null;
+
+ /**
+ * Merchant category code assigned to the merchant that describes its business
+ * activity type. Maps to EMV 3DS field `mcc`. May not be present for non-payment
+ * authentications.
+ */
+ mcc?: string | null;
+
+ /**
+ * Name of the merchant. Maps to EMV 3DS field `merchantName`. May not be present
+ * for non-payment authentications.
+ */
+ name?: string | null;
+ }
+
+ export namespace Merchant {
+ /**
+ * Object containing additional data indicating additional risk factors related to
+ * the e-commerce transaction.
+ */
+ export interface RiskIndicator {
+ /**
+ * In transactions with electronic delivery, email address to which merchandise is
+ * delivered. Maps to EMV 3DS field `deliveryEmailAddress`.
+ */
+ delivery_email_address?: string | null;
+
+ /**
+ * The delivery time frame for the merchandise. Maps to EMV 3DS field
+ * `deliveryTimeframe`.
+ */
+ delivery_time_frame?:
+ | 'ELECTRONIC_DELIVERY'
+ | 'OVERNIGHT_SHIPPING'
+ | 'SAME_DAY_SHIPPING'
+ | 'TWO_DAY_OR_MORE_SHIPPING'
+ | null;
+
+ /**
+ * In prepaid or gift card purchase transactions, purchase amount total in major
+ * units (e.g., a purchase of USD $205.10 would be 205). Maps to EMV 3DS field
+ * `giftCardAmount`.
+ */
+ gift_card_amount?: number | null;
+
+ /**
+ * In prepaid or gift card purchase transactions, count of individual prepaid or
+ * gift cards/codes purchased. Maps to EMV 3DS field `giftCardCount`.
+ */
+ gift_card_count?: number | null;
+
+ /**
+ * In prepaid or gift card purchase transactions, currency code of the gift card.
+ * Maps to EMV 3DS field `giftCardCurr`. Permitted values: ISO 4217 three-character
+ * currency code (e.g., USD).
+ */
+ gift_card_currency?: string | null;
+
+ /**
+ * Indicates whether the purchase is for merchandise that is available now or at a
+ * future date. Maps to EMV 3DS field `preOrderPurchaseInd`.
+ */
+ order_availability?: 'FUTURE_AVAILABILITY' | 'MERCHANDISE_AVAILABLE' | null;
+
+ /**
+ * In pre-order purchase transactions, the expected date that the merchandise will
+ * be available. Maps to EMV 3DS field `preOrderDate`. Permitted values: Date
+ * string in the ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ
+ */
+ pre_order_available_date?: string | null;
+
+ /**
+ * Indicates whether the cardholder is reordering previously purchased merchandise.
+ * Maps to EMV 3DS field `reorderItemsInd`.
+ */
+ reorder_items?: 'FIRST_TIME_ORDERED' | 'REORDERED' | null;
+
+ /**
+ * Shipping method that the cardholder chose for the transaction. If purchase
+ * includes one or more item, this indicator is used for the physical goods; if the
+ * purchase only includes digital goods, this indicator is used to describe the
+ * most expensive item purchased. Maps to EMV 3DS field `shipIndicator`.
+ */
+ shipping_method?:
+ | 'DIGITAL_GOODS'
+ | 'LOCKER_DELIVERY'
+ | 'OTHER'
+ | 'PICK_UP_AND_GO_DELIVERY'
+ | 'SHIP_TO_BILLING_ADDRESS'
+ | 'SHIP_TO_NON_BILLING_ADDRESS'
+ | 'SHIP_TO_OTHER_VERIFIED_ADDRESS'
+ | 'SHIP_TO_STORE'
+ | 'TRAVEL_AND_EVENT_TICKETS'
+ | null;
+ }
+ }
+
+ /**
+ * Object containing additional data about the 3DS request that is beyond the EMV
+ * 3DS standard spec (e.g., specific fields that only certain card networks send
+ * but are not required across all 3DS requests).
+ */
+ export interface AdditionalData {
+ /**
+ * Mastercard only: Indicates whether the network would have considered the
+ * authentication request to be low risk or not.
+ */
+ network_decision?: 'LOW_RISK' | 'NOT_LOW_RISK' | null;
+
+ /**
+ * Mastercard only: Assessment by the network of the authentication risk level,
+ * with a higher value indicating a higher amount of risk. Permitted values:
+ * Integer between 0-950, in increments of 50.
+ */
+ network_risk_score?: number | null;
+ }
+
+ /**
+ * Object containing data about the app used in the e-commerce transaction. Present
+ * if the channel is 'APP_BASED'.
+ */
+ export interface App {
+ /**
+ * Device model: e.g. "Apple iPhone 16".
+ */
+ device?: string | null;
+
+ /**
+ * Raw device information - base64-encoded JSON object. Maps to EMV 3DS field
+ * `deviceInfo`.
+ */
+ device_info?: string | null;
+
+ /**
+ * IP address of the device.
+ */
+ ip?: string;
+
+ /**
+ * Latitude coordinate of current device location.
+ */
+ latitude?: number | null;
+
+ /**
+ * Device locale: e.g. "en-US".
+ */
+ locale?: string | null;
+
+ /**
+ * Longitude coordinate of current device location.
+ */
+ longitude?: number | null;
+
+ /**
+ * Operating System: e.g. "Android 12", "iOS 17.1".
+ */
+ os?: string | null;
+
+ /**
+ * Device platform: Android, iOS, Windows, etc.
+ */
+ platform?: string | null;
+
+ /**
+ * Screen height in pixels.
+ */
+ screen_height?: number | null;
+
+ /**
+ * Screen width in pixels.
+ */
+ screen_width?: number | null;
+
+ /**
+ * Time zone offset in minutes between UTC and device local time.
+ */
+ time_zone?: string | null;
+ }
+
+ /**
+ * Object containing data about the browser used in the e-commerce transaction.
+ * Present if the channel is 'BROWSER'.
+ */
+ export interface Browser {
+ /**
+ * Content of the HTTP accept headers as sent from the cardholder's browser to the
+ * 3DS requestor (e.g., merchant or digital wallet).
+ */
+ accept_header?: string | null;
+
+ /**
+ * IP address of the browser as returned by the HTTP headers to the 3DS requestor
+ * (e.g., merchant or digital wallet). Maps to EMV 3DS field `browserIP`.
+ */
+ ip?: string | null;
+
+ /**
+ * Indicates whether the cardholder's browser has the ability to execute Java. Maps
+ * to EMV 3DS field `browserJavaEnabled`.
+ */
+ java_enabled?: boolean | null;
+
+ /**
+ * Indicates whether the cardholder's browser has the ability to execute
+ * JavaScript. Maps to EMV 3DS field `browserJavascriptEnabled`.
+ */
+ javascript_enabled?: boolean | null;
+
+ /**
+ * Language of the cardholder's browser as defined in IETF BCP47. Maps to EMV 3DS
+ * field `browserLanguage`.
+ */
+ language?: string | null;
+
+ /**
+ * Time zone offset in minutes between UTC and browser local time. Maps to EMV 3DS
+ * field `browserTz`.
+ */
+ time_zone?: string | null;
+
+ /**
+ * Content of the HTTP user-agent header. Maps to EMV 3DS field `browserUserAgent`.
+ */
+ user_agent?: string | null;
+ }
+
+ /**
+ * Metadata about the challenge method and delivery. Only present when a challenge
+ * is triggered.
+ */
+ export interface ChallengeMetadata {
+ /**
+ * The type of challenge method used for authentication.
+ */
+ method_type: 'SMS_OTP' | 'OUT_OF_BAND';
+
+ /**
+ * Indicates the status of the challenge
+ *
+ * - SUCCESS - Cardholder completed the challenge successfully
+ * - PENDING - Challenge was issued to the cardholder and was not completed yet
+ * - SMS_DELIVERY_FAILED - Lithic confirmed undeliverability of the SMS to the
+ * provided phone number. Relevant only for SMS_OTP method
+ * - CARDHOLDER_TIMEOUT - Cardholder failed to complete the challenge within the
+ * given challenge TTL
+ * - CANCELED_VIA_CHALLENGE_UI - Cardholder canceled the challenge by selecting
+ * "cancel" on the challenge UI
+ * - CANCELED_OOB - Cardholder canceled the challenge out of band
+ * - ATTEMPTS_EXCEEDED - Cardholder failed the challenge by either entering an
+ * incorrect OTP more than the allowed number of times or requesting a new OTP
+ * more than the allowed number of times
+ * - ABORTED - Merchant aborted authentication after a challenge was requested
+ * - ERROR - The challenge failed for a reason different than those documented
+ */
+ status:
+ | 'SUCCESS'
+ | 'PENDING'
+ | 'SMS_DELIVERY_FAILED'
+ | 'CARDHOLDER_TIMEOUT'
+ | 'CANCELED_VIA_CHALLENGE_UI'
+ | 'CANCELED_OOB'
+ | 'ATTEMPTS_EXCEEDED'
+ | 'ABORTED'
+ | 'ERROR';
+
+ /**
+ * The phone number used for delivering the OTP. Relevant only for SMS_OTP method.
+ */
+ phone_number?: string | null;
+ }
+
+ /**
+ * Object containing data about the e-commerce transaction for which the merchant
+ * is requesting authentication.
+ */
+ export interface Transaction {
+ /**
+ * Amount of the purchase in minor units of currency with all punctuation removed.
+ * Maps to EMV 3DS field `purchaseAmount`.
+ */
+ amount: number;
+
+ /**
+ * Approximate amount of the purchase in minor units of cardholder currency.
+ * Derived from `amount` using a daily conversion rate.
+ */
+ cardholder_amount: number | null;
+
+ /**
+ * Currency of the purchase. Maps to EMV 3DS field `purchaseCurrency`. Permitted
+ * values: ISO 4217 three-character currency code (e.g., USD).
+ */
+ currency: string;
+
+ /**
+ * Minor units of currency, as specified in ISO 4217 currency exponent. Maps to EMV
+ * 3DS field `purchaseExponent`.
+ */
+ currency_exponent: number;
+
+ /**
+ * Date and time when the authentication was generated by the merchant/acquirer's
+ * 3DS server. Maps to EMV 3DS field `purchaseDate`. Permitted values: Date string
+ * in the ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ.
+ */
+ date_time: string;
+
+ /**
+ * Type of the transaction for which a 3DS authentication request is occurring.
+ * Maps to EMV 3DS field `transType`.
+ */
+ type:
+ | 'ACCOUNT_FUNDING'
+ | 'CHECK_ACCEPTANCE'
+ | 'GOODS_SERVICE_PURCHASE'
+ | 'PREPAID_ACTIVATION_AND_LOAD'
+ | 'QUASI_CASH_TRANSACTION'
+ | null;
+ }
+}
+
ThreeDS.Authentication = Authentication;
ThreeDS.Decisioning = Decisioning;
export declare namespace ThreeDS {
+ export { type ThreeDSAuthentication as ThreeDSAuthentication };
+
export {
Authentication as Authentication,
- type AuthenticationRetrieveResponse as AuthenticationRetrieveResponse,
type AuthenticationSimulateResponse as AuthenticationSimulateResponse,
type AuthenticationSimulateParams as AuthenticationSimulateParams,
type AuthenticationSimulateOtpEntryParams as AuthenticationSimulateOtpEntryParams,
diff --git a/src/resources/tokenizations.ts b/src/resources/tokenizations.ts
index 4ca14e5f..12e9312b 100644
--- a/src/resources/tokenizations.ts
+++ b/src/resources/tokenizations.ts
@@ -1,6 +1,7 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
+import * as TokenizationsAPI from './tokenizations';
import { APIPromise } from '../core/api-promise';
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
import { RequestOptions } from '../internal/request-options';
@@ -207,6 +208,110 @@ export class Tokenizations extends APIResource {
export type TokenizationsCursorPage = CursorPage;
+export interface Device {
+ /**
+ * The IMEI number of the device being provisioned. For Amex, this field contains
+ * device ID instead as IMEI is not provided
+ */
+ imei: string | null;
+
+ /**
+ * The IP address of the device initiating the request
+ */
+ ip_address: string | null;
+
+ /**
+ * Latitude and longitude where the device is located during the authorization
+ * attempt
+ */
+ location: string | null;
+}
+
+/**
+ * Contains the metadata for the digital wallet being tokenized.
+ */
+export interface DigitalWalletTokenMetadata {
+ /**
+ * Contains the information of the account responsible for the payment.
+ */
+ payment_account_info: DigitalWalletTokenMetadata.PaymentAccountInfo;
+
+ /**
+ * The current status of the digital wallet token. Pending or declined.
+ */
+ status: string;
+
+ /**
+ * The identifier of the Payment App instance within a device that will be
+ * provisioned with a token
+ */
+ payment_app_instance_id?: string | null;
+
+ /**
+ * The party that requested the digitization
+ */
+ token_requestor_id?: string;
+
+ /**
+ * Human-readable name of the wallet that the token_requestor_id maps to.
+ */
+ token_requestor_name?:
+ | 'AMAZON_ONE'
+ | 'ANDROID_PAY'
+ | 'APPLE_PAY'
+ | 'FACEBOOK'
+ | 'FITBIT_PAY'
+ | 'GARMIN_PAY'
+ | 'MICROSOFT_PAY'
+ | 'NETFLIX'
+ | 'SAMSUNG_PAY'
+ | 'UNKNOWN'
+ | 'VISA_CHECKOUT';
+}
+
+export namespace DigitalWalletTokenMetadata {
+ /**
+ * Contains the information of the account responsible for the payment.
+ */
+ export interface PaymentAccountInfo {
+ /**
+ * Additional information that can be used to identify the account holder, such as
+ * name, address, etc
+ */
+ account_holder_data: PaymentAccountInfo.AccountHolderData;
+
+ /**
+ * Reference to the PAN that is unique per Wallet Provider
+ */
+ pan_unique_reference?: string | null;
+
+ /**
+ * The unique account reference assigned to the PAN
+ */
+ payment_account_reference?: string | null;
+
+ /**
+ * A unique reference assigned following the allocation of a token used to identify
+ * the token for the duration of its lifetime.
+ */
+ token_unique_reference?: string | null;
+ }
+
+ export namespace PaymentAccountInfo {
+ /**
+ * Additional information that can be used to identify the account holder, such as
+ * name, address, etc
+ */
+ export interface AccountHolderData {
+ /**
+ * The phone number, may contain country code along with phone number when
+ * countryDialInCode is not present
+ */
+ phone_number?: string | null;
+ }
+ }
+}
+
export interface Tokenization {
/**
* Globally unique identifier for a Tokenization
@@ -329,47 +434,17 @@ export namespace Tokenization {
/**
* Results from rules that were evaluated for this tokenization
*/
- rule_results?: Array;
+ rule_results?: Array;
/**
* List of reasons why the tokenization was declined
*/
- tokenization_decline_reasons?: Array<
- | 'ACCOUNT_SCORE_1'
- | 'DEVICE_SCORE_1'
- | 'ALL_WALLET_DECLINE_REASONS_PRESENT'
- | 'WALLET_RECOMMENDED_DECISION_RED'
- | 'CVC_MISMATCH'
- | 'CARD_EXPIRY_MONTH_MISMATCH'
- | 'CARD_EXPIRY_YEAR_MISMATCH'
- | 'CARD_INVALID_STATE'
- | 'CUSTOMER_RED_PATH'
- | 'INVALID_CUSTOMER_RESPONSE'
- | 'NETWORK_FAILURE'
- | 'GENERIC_DECLINE'
- | 'DIGITAL_CARD_ART_REQUIRED'
- >;
+ tokenization_decline_reasons?: Array;
/**
* List of reasons why two-factor authentication was required
*/
- tokenization_tfa_reasons?: Array<
- | 'WALLET_RECOMMENDED_TFA'
- | 'SUSPICIOUS_ACTIVITY'
- | 'DEVICE_RECENTLY_LOST'
- | 'TOO_MANY_RECENT_ATTEMPTS'
- | 'TOO_MANY_RECENT_TOKENS'
- | 'TOO_MANY_DIFFERENT_CARDHOLDERS'
- | 'OUTSIDE_HOME_TERRITORY'
- | 'HAS_SUSPENDED_TOKENS'
- | 'HIGH_RISK'
- | 'ACCOUNT_SCORE_LOW'
- | 'DEVICE_SCORE_LOW'
- | 'CARD_STATE_TFA'
- | 'HARDCODED_TFA'
- | 'CUSTOMER_RULE_TFA'
- | 'DEVICE_HOST_CARD_EMULATION'
- >;
+ tokenization_tfa_reasons?: Array;
/**
* Enum representing the type of tokenization event that occurred
@@ -381,33 +456,92 @@ export namespace Tokenization {
| 'TOKENIZATION_ELIGIBILITY_CHECK'
| 'TOKENIZATION_UPDATED';
}
+}
- export namespace Event {
- export interface RuleResult {
- /**
- * The Auth Rule Token associated with the rule. If this is set to null, then the
- * result was not associated with a customer-configured rule. This may happen in
- * cases where a tokenization is declined or requires TFA due to a
- * Lithic-configured security or compliance rule, for example.
- */
- auth_rule_token: string | null;
+/**
+ * Reason code for why a tokenization was declined
+ */
+export type TokenizationDeclineReason =
+ | 'ACCOUNT_SCORE_1'
+ | 'DEVICE_SCORE_1'
+ | 'ALL_WALLET_DECLINE_REASONS_PRESENT'
+ | 'WALLET_RECOMMENDED_DECISION_RED'
+ | 'CVC_MISMATCH'
+ | 'CARD_EXPIRY_MONTH_MISMATCH'
+ | 'CARD_EXPIRY_YEAR_MISMATCH'
+ | 'CARD_INVALID_STATE'
+ | 'CUSTOMER_RED_PATH'
+ | 'INVALID_CUSTOMER_RESPONSE'
+ | 'NETWORK_FAILURE'
+ | 'GENERIC_DECLINE'
+ | 'DIGITAL_CARD_ART_REQUIRED';
- /**
- * A human-readable explanation outlining the motivation for the rule's result
- */
- explanation: string | null;
+export interface TokenizationRuleResult {
+ /**
+ * The Auth Rule Token associated with the rule. If this is set to null, then the
+ * result was not associated with a customer-configured rule. This may happen in
+ * cases where a tokenization is declined or requires TFA due to a
+ * Lithic-configured security or compliance rule, for example.
+ */
+ auth_rule_token: string | null;
- /**
- * The name for the rule, if any was configured
- */
- name: string | null;
+ /**
+ * A human-readable explanation outlining the motivation for the rule's result
+ */
+ explanation: string | null;
- /**
- * The result associated with this rule
- */
- result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR';
- }
- }
+ /**
+ * The name for the rule, if any was configured
+ */
+ name: string | null;
+
+ /**
+ * The result associated with this rule
+ */
+ result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR';
+}
+
+/**
+ * Reason code for why a tokenization required two-factor authentication
+ */
+export type TokenizationTfaReason =
+ | 'WALLET_RECOMMENDED_TFA'
+ | 'SUSPICIOUS_ACTIVITY'
+ | 'DEVICE_RECENTLY_LOST'
+ | 'TOO_MANY_RECENT_ATTEMPTS'
+ | 'TOO_MANY_RECENT_TOKENS'
+ | 'TOO_MANY_DIFFERENT_CARDHOLDERS'
+ | 'OUTSIDE_HOME_TERRITORY'
+ | 'HAS_SUSPENDED_TOKENS'
+ | 'HIGH_RISK'
+ | 'ACCOUNT_SCORE_LOW'
+ | 'DEVICE_SCORE_LOW'
+ | 'CARD_STATE_TFA'
+ | 'HARDCODED_TFA'
+ | 'CUSTOMER_RULE_TFA'
+ | 'DEVICE_HOST_CARD_EMULATION';
+
+export interface WalletDecisioningInfo {
+ /**
+ * Score given to the account by the Wallet Provider
+ */
+ account_score: string | null;
+
+ /**
+ * Score given to the device by the Wallet Provider
+ */
+ device_score: string | null;
+
+ /**
+ * The decision recommended by the Wallet Provider
+ */
+ recommended_decision: string | null;
+
+ /**
+ * Reasons provided to the Wallet Provider on how the recommended decision was
+ * reached
+ */
+ recommendation_reasons?: Array | null;
}
export interface TokenizationListParams extends CursorPageParams {
@@ -504,7 +638,13 @@ export interface TokenizationUpdateDigitalCardArtParams {
export declare namespace Tokenizations {
export {
+ type Device as Device,
+ type DigitalWalletTokenMetadata as DigitalWalletTokenMetadata,
type Tokenization as Tokenization,
+ type TokenizationDeclineReason as TokenizationDeclineReason,
+ type TokenizationRuleResult as TokenizationRuleResult,
+ type TokenizationTfaReason as TokenizationTfaReason,
+ type WalletDecisioningInfo as WalletDecisioningInfo,
type TokenizationsCursorPage as TokenizationsCursorPage,
type TokenizationListParams as TokenizationListParams,
type TokenizationResendActivationCodeParams as TokenizationResendActivationCodeParams,
diff --git a/src/resources/transactions/index.ts b/src/resources/transactions/index.ts
index 4e35f7e3..f8c618a3 100644
--- a/src/resources/transactions/index.ts
+++ b/src/resources/transactions/index.ts
@@ -7,6 +7,8 @@ export {
export { Events } from './events/index';
export {
Transactions,
+ type CardholderAuthentication,
+ type TokenInfo,
type Transaction,
type TransactionSimulateAuthorizationResponse,
type TransactionSimulateAuthorizationAdviceResponse,
diff --git a/src/resources/transactions/transactions.ts b/src/resources/transactions/transactions.ts
index 0b6762dc..39f025ea 100644
--- a/src/resources/transactions/transactions.ts
+++ b/src/resources/transactions/transactions.ts
@@ -237,6 +237,61 @@ export class Transactions extends APIResource {
export type TransactionsCursorPage = CursorPage;
+export interface CardholderAuthentication {
+ /**
+ * Indicates the method used to authenticate the cardholder.
+ */
+ authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE';
+
+ /**
+ * Indicates the outcome of the 3DS authentication process.
+ */
+ authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS';
+
+ /**
+ * Indicates which party made the 3DS authentication decision.
+ */
+ decision_made_by:
+ | 'CUSTOMER_RULES'
+ | 'CUSTOMER_ENDPOINT'
+ | 'LITHIC_DEFAULT'
+ | 'LITHIC_RULES'
+ | 'NETWORK'
+ | 'UNKNOWN';
+
+ /**
+ * Indicates whether chargeback liability shift applies to the transaction.
+ * Possible enum values:
+ *
+ * - `3DS_AUTHENTICATED`: The transaction was fully authenticated through a 3-D
+ * Secure flow, chargeback liability shift applies.
+ * - `NONE`: Chargeback liability shift has not shifted to the issuer, i.e. the
+ * merchant is liable.
+ * - `TOKEN_AUTHENTICATED`: The transaction was a tokenized payment with validated
+ * cryptography, possibly recurring. Chargeback liability shift to the issuer
+ * applies.
+ */
+ liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE';
+
+ /**
+ * Unique identifier you can use to match a given 3DS authentication (available via
+ * the three_ds_authentication.created event webhook) and the transaction. Note
+ * that in cases where liability shift does not occur, this token is matched to the
+ * transaction on a best-effort basis.
+ */
+ three_ds_authentication_token: string | null;
+}
+
+export interface TokenInfo {
+ /**
+ * The wallet_type field will indicate the source of the token. Possible token
+ * sources include digital wallets (Apple, Google, or Samsung Pay), merchant
+ * tokenization, and “other” sources like in-flight commerce. Masterpass is not
+ * currently supported and is included for future use.
+ */
+ wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY';
+}
+
export interface Transaction {
/**
* Globally unique identifier.
@@ -292,7 +347,7 @@ export interface Transaction {
*/
card_token: string;
- cardholder_authentication: Transaction.CardholderAuthentication | null;
+ cardholder_authentication: CardholderAuthentication | null;
/**
* Date and time when the transaction first occurred. UTC time zone.
@@ -374,7 +429,7 @@ export interface Transaction {
*/
status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED';
- token_info: Transaction.TokenInfo | null;
+ token_info: TokenInfo | null;
/**
* Date and time when the transaction last updated. UTC time zone.
@@ -464,51 +519,6 @@ export namespace Transaction {
zipcode: string;
}
- export interface CardholderAuthentication {
- /**
- * Indicates the method used to authenticate the cardholder.
- */
- authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE';
-
- /**
- * Indicates the outcome of the 3DS authentication process.
- */
- authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS';
-
- /**
- * Indicates which party made the 3DS authentication decision.
- */
- decision_made_by:
- | 'CUSTOMER_RULES'
- | 'CUSTOMER_ENDPOINT'
- | 'LITHIC_DEFAULT'
- | 'LITHIC_RULES'
- | 'NETWORK'
- | 'UNKNOWN';
-
- /**
- * Indicates whether chargeback liability shift applies to the transaction.
- * Possible enum values:
- *
- * - `3DS_AUTHENTICATED`: The transaction was fully authenticated through a 3-D
- * Secure flow, chargeback liability shift applies.
- * - `NONE`: Chargeback liability shift has not shifted to the issuer, i.e. the
- * merchant is liable.
- * - `TOKEN_AUTHENTICATED`: The transaction was a tokenized payment with validated
- * cryptography, possibly recurring. Chargeback liability shift to the issuer
- * applies.
- */
- liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE';
-
- /**
- * Unique identifier you can use to match a given 3DS authentication (available via
- * the three_ds_authentication.created event webhook) and the transaction. Note
- * that in cases where liability shift does not occur, this token is matched to the
- * transaction on a best-effort basis.
- */
- three_ds_authentication_token: string | null;
- }
-
export interface Pos {
entry_mode: Pos.EntryMode;
@@ -635,16 +645,6 @@ export namespace Transaction {
}
}
- export interface TokenInfo {
- /**
- * The wallet_type field will indicate the source of the token. Possible token
- * sources include digital wallets (Apple, Google, or Samsung Pay), merchant
- * tokenization, and “other” sources like in-flight commerce. Masterpass is not
- * currently supported and is included for future use.
- */
- wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY';
- }
-
export interface Event {
/**
* Transaction event identifier.
@@ -1444,6 +1444,8 @@ Transactions.Events = Events;
export declare namespace Transactions {
export {
+ type CardholderAuthentication as CardholderAuthentication,
+ type TokenInfo as TokenInfo,
type Transaction as Transaction,
type TransactionSimulateAuthorizationResponse as TransactionSimulateAuthorizationResponse,
type TransactionSimulateAuthorizationAdviceResponse as TransactionSimulateAuthorizationAdviceResponse,
diff --git a/tests/api-resources/card-bulk-orders.test.ts b/tests/api-resources/card-bulk-orders.test.ts
new file mode 100644
index 00000000..fde31df8
--- /dev/null
+++ b/tests/api-resources/card-bulk-orders.test.ts
@@ -0,0 +1,106 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import Lithic from 'lithic';
+
+const client = new Lithic({
+ apiKey: 'My Lithic API Key',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+describe('resource cardBulkOrders', () => {
+ test('create: only required params', async () => {
+ const responsePromise = client.cardBulkOrders.create({
+ customer_product_id: 'custom-card-design-123',
+ shipping_address: {
+ address1: '123 Main Street',
+ city: 'NEW YORK',
+ country: 'USA',
+ first_name: 'Johnny',
+ last_name: 'Appleseed',
+ postal_code: '10001',
+ state: 'NY',
+ },
+ shipping_method: 'BULK_EXPEDITED',
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ test('create: required and optional params', async () => {
+ const response = await client.cardBulkOrders.create({
+ customer_product_id: 'custom-card-design-123',
+ shipping_address: {
+ address1: '123 Main Street',
+ city: 'NEW YORK',
+ country: 'USA',
+ first_name: 'Johnny',
+ last_name: 'Appleseed',
+ postal_code: '10001',
+ state: 'NY',
+ },
+ shipping_method: 'BULK_EXPEDITED',
+ });
+ });
+
+ test('retrieve', async () => {
+ const responsePromise = client.cardBulkOrders.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ test('update: only required params', async () => {
+ const responsePromise = client.cardBulkOrders.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
+ status: 'LOCKED',
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ test('update: required and optional params', async () => {
+ const response = await client.cardBulkOrders.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
+ status: 'LOCKED',
+ });
+ });
+
+ test('list', async () => {
+ const responsePromise = client.cardBulkOrders.list();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ test('list: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.cardBulkOrders.list(
+ {
+ begin: '2019-12-27T18:11:19.117Z',
+ end: '2019-12-27T18:11:19.117Z',
+ ending_before: 'ending_before',
+ page_size: 1,
+ starting_after: 'starting_after',
+ },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(Lithic.NotFoundError);
+ });
+});
diff --git a/tests/api-resources/cards/cards.test.ts b/tests/api-resources/cards/cards.test.ts
index 617c1f84..24375c14 100644
--- a/tests/api-resources/cards/cards.test.ts
+++ b/tests/api-resources/cards/cards.test.ts
@@ -23,6 +23,7 @@ describe('resource cards', () => {
const response = await client.cards.create({
type: 'VIRTUAL',
account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ bulk_order_token: '5e9483eb-8103-4e16-9794-2106111b2eca',
card_program_token: '5e9483eb-8103-4e16-9794-2106111b2eca',
carrier: { qr_code_url: 'qr_code_url' },
digital_card_art_token: '5e9483eb-8103-4e16-9794-2106111b2eca',
From ee744e3c2f84fc53b220a483334f7e4c7914f286 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 5 Dec 2025 20:42:51 +0000
Subject: [PATCH 04/11] fix(mcp): return correct lines on typescript errors
---
.devcontainer/Dockerfile | 23 +++++++++++++++++++++++
.eslintrc.js | 10 ++++++++++
jest.setup.ts | 0
src/internal/polyfill/file.node.d.ts | 14 ++++++++++++++
src/internal/polyfill/file.node.mjs | 9 +++++++++
tests/responses.test.ts | 24 ++++++++++++++++++++++++
6 files changed, 80 insertions(+)
create mode 100644 .devcontainer/Dockerfile
create mode 100644 .eslintrc.js
create mode 100644 jest.setup.ts
create mode 100644 src/internal/polyfill/file.node.d.ts
create mode 100644 src/internal/polyfill/file.node.mjs
create mode 100644 tests/responses.test.ts
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 00000000..8ea34be9
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,23 @@
+# syntax=docker/dockerfile:1
+FROM debian:bookworm-slim AS stainless
+
+RUN apt-get update && apt-get install -y \
+ nodejs \
+ npm \
+ yarnpkg \
+ && apt-get clean autoclean
+
+# Ensure UTF-8 encoding
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
+
+# Yarn
+RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn
+
+WORKDIR /workspace
+
+COPY package.json yarn.lock /workspace/
+
+RUN yarn install
+
+COPY . /workspace
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 00000000..60f0e7a3
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,10 @@
+module.exports = {
+ parser: '@typescript-eslint/parser',
+ plugins: ['@typescript-eslint', 'unused-imports', 'prettier'],
+ rules: {
+ 'no-unused-vars': 'off',
+ 'prettier/prettier': 'error',
+ 'unused-imports/no-unused-imports': 'error',
+ },
+ root: true,
+};
diff --git a/jest.setup.ts b/jest.setup.ts
new file mode 100644
index 00000000..e69de29b
diff --git a/src/internal/polyfill/file.node.d.ts b/src/internal/polyfill/file.node.d.ts
new file mode 100644
index 00000000..c95276d8
--- /dev/null
+++ b/src/internal/polyfill/file.node.d.ts
@@ -0,0 +1,14 @@
+/**
+ * This file polyfills the global `File` object for you if it's not already defined
+ * when running on Node.js
+ *
+ * This is only needed on Node.js v18 & v19. Newer versions already define `File`
+ * as a global.
+ */
+
+// @ts-ignore
+type nodeBuffer = typeof import('node:buffer');
+declare const File: typeof globalThis extends { File: unknown } ? (typeof globalThis)['File']
+: nodeBuffer extends { File: unknown } ? nodeBuffer['File']
+: any;
+export {};
diff --git a/src/internal/polyfill/file.node.mjs b/src/internal/polyfill/file.node.mjs
new file mode 100644
index 00000000..520dcb84
--- /dev/null
+++ b/src/internal/polyfill/file.node.mjs
@@ -0,0 +1,9 @@
+/**
+ * This file polyfills the global `File` object for you if it's not already defined
+ * when running on Node.js
+ *
+ * This is only needed on Node.js v18 & v19. Newer versions already define `File`
+ * as a global.
+ */
+
+import './file.node.js';
diff --git a/tests/responses.test.ts b/tests/responses.test.ts
new file mode 100644
index 00000000..2b65b3f3
--- /dev/null
+++ b/tests/responses.test.ts
@@ -0,0 +1,24 @@
+import { createResponseHeaders } from 'lithic/internal/headers';
+
+describe('response parsing', () => {
+ // TODO: test unicode characters
+ test('headers are case agnostic', async () => {
+ const headers = createResponseHeaders(new Headers({ 'Content-Type': 'foo', Accept: 'text/plain' }));
+ expect(headers['content-type']).toEqual('foo');
+ expect(headers['Content-type']).toEqual('foo');
+ expect(headers['Content-Type']).toEqual('foo');
+ expect(headers['accept']).toEqual('text/plain');
+ expect(headers['Accept']).toEqual('text/plain');
+ expect(headers['Hello-World']).toBeUndefined();
+ });
+
+ test('duplicate headers are concatenated', () => {
+ const headers = createResponseHeaders(
+ new Headers([
+ ['Content-Type', 'text/xml'],
+ ['Content-Type', 'application/json'],
+ ]),
+ );
+ expect(headers['content-type']).toBe('text/xml, application/json');
+ });
+});
From 29cac7024024a9761e9b16d73a6d758184b2d8d1 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 5 Dec 2025 21:17:32 +0000
Subject: [PATCH 05/11] chore(internal): codegen related update
---
.devcontainer/Dockerfile | 23 -----------------------
.eslintrc.js | 10 ----------
jest.setup.ts | 0
src/internal/polyfill/file.node.d.ts | 14 --------------
src/internal/polyfill/file.node.mjs | 9 ---------
tests/responses.test.ts | 24 ------------------------
6 files changed, 80 deletions(-)
delete mode 100644 .devcontainer/Dockerfile
delete mode 100644 .eslintrc.js
delete mode 100644 jest.setup.ts
delete mode 100644 src/internal/polyfill/file.node.d.ts
delete mode 100644 src/internal/polyfill/file.node.mjs
delete mode 100644 tests/responses.test.ts
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
deleted file mode 100644
index 8ea34be9..00000000
--- a/.devcontainer/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-# syntax=docker/dockerfile:1
-FROM debian:bookworm-slim AS stainless
-
-RUN apt-get update && apt-get install -y \
- nodejs \
- npm \
- yarnpkg \
- && apt-get clean autoclean
-
-# Ensure UTF-8 encoding
-ENV LANG=C.UTF-8
-ENV LC_ALL=C.UTF-8
-
-# Yarn
-RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn
-
-WORKDIR /workspace
-
-COPY package.json yarn.lock /workspace/
-
-RUN yarn install
-
-COPY . /workspace
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index 60f0e7a3..00000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,10 +0,0 @@
-module.exports = {
- parser: '@typescript-eslint/parser',
- plugins: ['@typescript-eslint', 'unused-imports', 'prettier'],
- rules: {
- 'no-unused-vars': 'off',
- 'prettier/prettier': 'error',
- 'unused-imports/no-unused-imports': 'error',
- },
- root: true,
-};
diff --git a/jest.setup.ts b/jest.setup.ts
deleted file mode 100644
index e69de29b..00000000
diff --git a/src/internal/polyfill/file.node.d.ts b/src/internal/polyfill/file.node.d.ts
deleted file mode 100644
index c95276d8..00000000
--- a/src/internal/polyfill/file.node.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * This file polyfills the global `File` object for you if it's not already defined
- * when running on Node.js
- *
- * This is only needed on Node.js v18 & v19. Newer versions already define `File`
- * as a global.
- */
-
-// @ts-ignore
-type nodeBuffer = typeof import('node:buffer');
-declare const File: typeof globalThis extends { File: unknown } ? (typeof globalThis)['File']
-: nodeBuffer extends { File: unknown } ? nodeBuffer['File']
-: any;
-export {};
diff --git a/src/internal/polyfill/file.node.mjs b/src/internal/polyfill/file.node.mjs
deleted file mode 100644
index 520dcb84..00000000
--- a/src/internal/polyfill/file.node.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * This file polyfills the global `File` object for you if it's not already defined
- * when running on Node.js
- *
- * This is only needed on Node.js v18 & v19. Newer versions already define `File`
- * as a global.
- */
-
-import './file.node.js';
diff --git a/tests/responses.test.ts b/tests/responses.test.ts
deleted file mode 100644
index 2b65b3f3..00000000
--- a/tests/responses.test.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { createResponseHeaders } from 'lithic/internal/headers';
-
-describe('response parsing', () => {
- // TODO: test unicode characters
- test('headers are case agnostic', async () => {
- const headers = createResponseHeaders(new Headers({ 'Content-Type': 'foo', Accept: 'text/plain' }));
- expect(headers['content-type']).toEqual('foo');
- expect(headers['Content-type']).toEqual('foo');
- expect(headers['Content-Type']).toEqual('foo');
- expect(headers['accept']).toEqual('text/plain');
- expect(headers['Accept']).toEqual('text/plain');
- expect(headers['Hello-World']).toBeUndefined();
- });
-
- test('duplicate headers are concatenated', () => {
- const headers = createResponseHeaders(
- new Headers([
- ['Content-Type', 'text/xml'],
- ['Content-Type', 'application/json'],
- ]),
- );
- expect(headers['content-type']).toBe('text/xml, application/json');
- });
-});
From 01caa79422659c90e274b449ee882fdd7c04cef2 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 5 Dec 2025 23:37:58 +0000
Subject: [PATCH 06/11] fix(mcp): correct code tool API endpoint
---
.devcontainer/Dockerfile | 23 +++++++++++++++++++++++
.eslintrc.js | 10 ++++++++++
jest.setup.ts | 0
src/internal/polyfill/file.node.d.ts | 14 ++++++++++++++
src/internal/polyfill/file.node.mjs | 9 +++++++++
tests/responses.test.ts | 24 ++++++++++++++++++++++++
6 files changed, 80 insertions(+)
create mode 100644 .devcontainer/Dockerfile
create mode 100644 .eslintrc.js
create mode 100644 jest.setup.ts
create mode 100644 src/internal/polyfill/file.node.d.ts
create mode 100644 src/internal/polyfill/file.node.mjs
create mode 100644 tests/responses.test.ts
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 00000000..8ea34be9
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,23 @@
+# syntax=docker/dockerfile:1
+FROM debian:bookworm-slim AS stainless
+
+RUN apt-get update && apt-get install -y \
+ nodejs \
+ npm \
+ yarnpkg \
+ && apt-get clean autoclean
+
+# Ensure UTF-8 encoding
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
+
+# Yarn
+RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn
+
+WORKDIR /workspace
+
+COPY package.json yarn.lock /workspace/
+
+RUN yarn install
+
+COPY . /workspace
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 00000000..60f0e7a3
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,10 @@
+module.exports = {
+ parser: '@typescript-eslint/parser',
+ plugins: ['@typescript-eslint', 'unused-imports', 'prettier'],
+ rules: {
+ 'no-unused-vars': 'off',
+ 'prettier/prettier': 'error',
+ 'unused-imports/no-unused-imports': 'error',
+ },
+ root: true,
+};
diff --git a/jest.setup.ts b/jest.setup.ts
new file mode 100644
index 00000000..e69de29b
diff --git a/src/internal/polyfill/file.node.d.ts b/src/internal/polyfill/file.node.d.ts
new file mode 100644
index 00000000..c95276d8
--- /dev/null
+++ b/src/internal/polyfill/file.node.d.ts
@@ -0,0 +1,14 @@
+/**
+ * This file polyfills the global `File` object for you if it's not already defined
+ * when running on Node.js
+ *
+ * This is only needed on Node.js v18 & v19. Newer versions already define `File`
+ * as a global.
+ */
+
+// @ts-ignore
+type nodeBuffer = typeof import('node:buffer');
+declare const File: typeof globalThis extends { File: unknown } ? (typeof globalThis)['File']
+: nodeBuffer extends { File: unknown } ? nodeBuffer['File']
+: any;
+export {};
diff --git a/src/internal/polyfill/file.node.mjs b/src/internal/polyfill/file.node.mjs
new file mode 100644
index 00000000..520dcb84
--- /dev/null
+++ b/src/internal/polyfill/file.node.mjs
@@ -0,0 +1,9 @@
+/**
+ * This file polyfills the global `File` object for you if it's not already defined
+ * when running on Node.js
+ *
+ * This is only needed on Node.js v18 & v19. Newer versions already define `File`
+ * as a global.
+ */
+
+import './file.node.js';
diff --git a/tests/responses.test.ts b/tests/responses.test.ts
new file mode 100644
index 00000000..2b65b3f3
--- /dev/null
+++ b/tests/responses.test.ts
@@ -0,0 +1,24 @@
+import { createResponseHeaders } from 'lithic/internal/headers';
+
+describe('response parsing', () => {
+ // TODO: test unicode characters
+ test('headers are case agnostic', async () => {
+ const headers = createResponseHeaders(new Headers({ 'Content-Type': 'foo', Accept: 'text/plain' }));
+ expect(headers['content-type']).toEqual('foo');
+ expect(headers['Content-type']).toEqual('foo');
+ expect(headers['Content-Type']).toEqual('foo');
+ expect(headers['accept']).toEqual('text/plain');
+ expect(headers['Accept']).toEqual('text/plain');
+ expect(headers['Hello-World']).toBeUndefined();
+ });
+
+ test('duplicate headers are concatenated', () => {
+ const headers = createResponseHeaders(
+ new Headers([
+ ['Content-Type', 'text/xml'],
+ ['Content-Type', 'application/json'],
+ ]),
+ );
+ expect(headers['content-type']).toBe('text/xml, application/json');
+ });
+});
From c904aa8b4ad89daf3435b02b52c1e10f56d534fa Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 5 Dec 2025 23:48:46 +0000
Subject: [PATCH 07/11] chore(internal): codegen related update
---
.devcontainer/Dockerfile | 23 -----------------------
.eslintrc.js | 10 ----------
jest.setup.ts | 0
src/internal/polyfill/file.node.d.ts | 14 --------------
src/internal/polyfill/file.node.mjs | 9 ---------
tests/responses.test.ts | 24 ------------------------
6 files changed, 80 deletions(-)
delete mode 100644 .devcontainer/Dockerfile
delete mode 100644 .eslintrc.js
delete mode 100644 jest.setup.ts
delete mode 100644 src/internal/polyfill/file.node.d.ts
delete mode 100644 src/internal/polyfill/file.node.mjs
delete mode 100644 tests/responses.test.ts
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
deleted file mode 100644
index 8ea34be9..00000000
--- a/.devcontainer/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-# syntax=docker/dockerfile:1
-FROM debian:bookworm-slim AS stainless
-
-RUN apt-get update && apt-get install -y \
- nodejs \
- npm \
- yarnpkg \
- && apt-get clean autoclean
-
-# Ensure UTF-8 encoding
-ENV LANG=C.UTF-8
-ENV LC_ALL=C.UTF-8
-
-# Yarn
-RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn
-
-WORKDIR /workspace
-
-COPY package.json yarn.lock /workspace/
-
-RUN yarn install
-
-COPY . /workspace
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index 60f0e7a3..00000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,10 +0,0 @@
-module.exports = {
- parser: '@typescript-eslint/parser',
- plugins: ['@typescript-eslint', 'unused-imports', 'prettier'],
- rules: {
- 'no-unused-vars': 'off',
- 'prettier/prettier': 'error',
- 'unused-imports/no-unused-imports': 'error',
- },
- root: true,
-};
diff --git a/jest.setup.ts b/jest.setup.ts
deleted file mode 100644
index e69de29b..00000000
diff --git a/src/internal/polyfill/file.node.d.ts b/src/internal/polyfill/file.node.d.ts
deleted file mode 100644
index c95276d8..00000000
--- a/src/internal/polyfill/file.node.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * This file polyfills the global `File` object for you if it's not already defined
- * when running on Node.js
- *
- * This is only needed on Node.js v18 & v19. Newer versions already define `File`
- * as a global.
- */
-
-// @ts-ignore
-type nodeBuffer = typeof import('node:buffer');
-declare const File: typeof globalThis extends { File: unknown } ? (typeof globalThis)['File']
-: nodeBuffer extends { File: unknown } ? nodeBuffer['File']
-: any;
-export {};
diff --git a/src/internal/polyfill/file.node.mjs b/src/internal/polyfill/file.node.mjs
deleted file mode 100644
index 520dcb84..00000000
--- a/src/internal/polyfill/file.node.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * This file polyfills the global `File` object for you if it's not already defined
- * when running on Node.js
- *
- * This is only needed on Node.js v18 & v19. Newer versions already define `File`
- * as a global.
- */
-
-import './file.node.js';
diff --git a/tests/responses.test.ts b/tests/responses.test.ts
deleted file mode 100644
index 2b65b3f3..00000000
--- a/tests/responses.test.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { createResponseHeaders } from 'lithic/internal/headers';
-
-describe('response parsing', () => {
- // TODO: test unicode characters
- test('headers are case agnostic', async () => {
- const headers = createResponseHeaders(new Headers({ 'Content-Type': 'foo', Accept: 'text/plain' }));
- expect(headers['content-type']).toEqual('foo');
- expect(headers['Content-type']).toEqual('foo');
- expect(headers['Content-Type']).toEqual('foo');
- expect(headers['accept']).toEqual('text/plain');
- expect(headers['Accept']).toEqual('text/plain');
- expect(headers['Hello-World']).toBeUndefined();
- });
-
- test('duplicate headers are concatenated', () => {
- const headers = createResponseHeaders(
- new Headers([
- ['Content-Type', 'text/xml'],
- ['Content-Type', 'application/json'],
- ]),
- );
- expect(headers['content-type']).toBe('text/xml, application/json');
- });
-});
From 26629d1c35f425be70379cbab4d398bc7aaf5fdb Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 8 Dec 2025 09:38:30 +0000
Subject: [PATCH 08/11] feat(api): Add new fee types feat(api): Add optional
ach_hold_period feat(api): Add event_streams to auth rules APIs
---
.stats.yml | 4 +--
src/resources/account-activity.ts | 6 ++++
src/resources/auth-rules/v2/v2.ts | 12 ++++++-
src/resources/external-payments.ts | 36 ++++++++++++++++---
.../statements/line-items.ts | 20 ++++++++++-
src/resources/management-operations.ts | 16 +++++++--
src/resources/payments.ts | 12 +++++++
src/resources/shared.ts | 18 +++++++++-
tests/api-resources/auth-rules/v2/v2.test.ts | 1 +
tests/api-resources/payments.test.ts | 2 +-
10 files changed, 115 insertions(+), 12 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 284673ed..225dcbad 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 176
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6d54fb5bba49d761acf9d62a7e105443a80a0d34dda61932ff1d1cb8fe214393.yml
-openapi_spec_hash: 20da53572fec9742df4a6d403464521b
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-3e50857d2b8f4c85922abf83df7b3c6894f5bd500d6226ff589476029bbb258b.yml
+openapi_spec_hash: 6bef8b283eb7292ad6f3f62d40fda699
config_hash: ba3fbfc99a1b8635d9e79e9e49d12952
diff --git a/src/resources/account-activity.ts b/src/resources/account-activity.ts
index e1ff5ed1..fba9ee6e 100644
--- a/src/resources/account-activity.ts
+++ b/src/resources/account-activity.ts
@@ -100,6 +100,8 @@ export namespace AccountActivityListResponse {
| 'CARD'
| 'EXTERNAL_ACH'
| 'EXTERNAL_CHECK'
+ | 'EXTERNAL_FEDNOW'
+ | 'EXTERNAL_RTP'
| 'EXTERNAL_TRANSFER'
| 'EXTERNAL_WIRE'
| 'MANAGEMENT_ADJUSTMENT'
@@ -235,6 +237,8 @@ export namespace AccountActivityRetrieveTransactionResponse {
| 'CARD'
| 'EXTERNAL_ACH'
| 'EXTERNAL_CHECK'
+ | 'EXTERNAL_FEDNOW'
+ | 'EXTERNAL_RTP'
| 'EXTERNAL_TRANSFER'
| 'EXTERNAL_WIRE'
| 'MANAGEMENT_ADJUSTMENT'
@@ -362,6 +366,8 @@ export interface AccountActivityListParams extends CursorPageParams {
| 'CARD'
| 'EXTERNAL_ACH'
| 'EXTERNAL_CHECK'
+ | 'EXTERNAL_FEDNOW'
+ | 'EXTERNAL_RTP'
| 'EXTERNAL_TRANSFER'
| 'EXTERNAL_WIRE'
| 'MANAGEMENT_ADJUSTMENT'
diff --git a/src/resources/auth-rules/v2/v2.ts b/src/resources/auth-rules/v2/v2.ts
index 30df67b8..6466386c 100644
--- a/src/resources/auth-rules/v2/v2.ts
+++ b/src/resources/auth-rules/v2/v2.ts
@@ -1475,7 +1475,8 @@ export interface V2ListParams extends CursorPageParams {
card_token?: string;
/**
- * Only return Auth rules that are executed during the provided event stream.
+ * Deprecated: Use event_streams instead. Only return Auth rules that are executed
+ * during the provided event stream.
*/
event_stream?:
| 'AUTHORIZATION'
@@ -1484,6 +1485,15 @@ export interface V2ListParams extends CursorPageParams {
| 'ACH_CREDIT_RECEIPT'
| 'ACH_DEBIT_RECEIPT';
+ /**
+ * Only return Auth rules that are executed during any of the provided event
+ * streams. If event_streams and event_stream are specified, the values will be
+ * combined.
+ */
+ event_streams?: Array<
+ 'AUTHORIZATION' | 'THREE_DS_AUTHENTICATION' | 'TOKENIZATION' | 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'
+ >;
+
/**
* Only return Auth Rules that are bound to the provided scope.
*/
diff --git a/src/resources/external-payments.ts b/src/resources/external-payments.ts
index 72494d8b..20c6aed7 100644
--- a/src/resources/external-payments.ts
+++ b/src/resources/external-payments.ts
@@ -114,7 +114,13 @@ export interface ExternalPayment {
*/
updated: string;
- category?: 'EXTERNAL_WIRE' | 'EXTERNAL_ACH' | 'EXTERNAL_CHECK' | 'EXTERNAL_TRANSFER';
+ category?:
+ | 'EXTERNAL_WIRE'
+ | 'EXTERNAL_ACH'
+ | 'EXTERNAL_CHECK'
+ | 'EXTERNAL_FEDNOW'
+ | 'EXTERNAL_RTP'
+ | 'EXTERNAL_TRANSFER';
currency?: string;
@@ -174,14 +180,30 @@ export namespace ExternalPayment {
| 'EXTERNAL_CHECK_CANCELED'
| 'EXTERNAL_CHECK_SETTLED'
| 'EXTERNAL_CHECK_REVERSED'
- | 'EXTERNAL_CHECK_RELEASED';
+ | 'EXTERNAL_CHECK_RELEASED'
+ | 'EXTERNAL_FEDNOW_INITIATED'
+ | 'EXTERNAL_FEDNOW_CANCELED'
+ | 'EXTERNAL_FEDNOW_SETTLED'
+ | 'EXTERNAL_FEDNOW_REVERSED'
+ | 'EXTERNAL_FEDNOW_RELEASED'
+ | 'EXTERNAL_RTP_INITIATED'
+ | 'EXTERNAL_RTP_CANCELED'
+ | 'EXTERNAL_RTP_SETTLED'
+ | 'EXTERNAL_RTP_REVERSED'
+ | 'EXTERNAL_RTP_RELEASED';
}
}
export interface ExternalPaymentCreateParams {
amount: number;
- category: 'EXTERNAL_WIRE' | 'EXTERNAL_ACH' | 'EXTERNAL_CHECK' | 'EXTERNAL_TRANSFER';
+ category:
+ | 'EXTERNAL_WIRE'
+ | 'EXTERNAL_ACH'
+ | 'EXTERNAL_CHECK'
+ | 'EXTERNAL_FEDNOW'
+ | 'EXTERNAL_RTP'
+ | 'EXTERNAL_TRANSFER';
effective_date: string;
@@ -210,7 +232,13 @@ export interface ExternalPaymentListParams extends CursorPageParams {
/**
* External Payment category to be returned.
*/
- category?: 'EXTERNAL_WIRE' | 'EXTERNAL_ACH' | 'EXTERNAL_CHECK' | 'EXTERNAL_TRANSFER';
+ category?:
+ | 'EXTERNAL_WIRE'
+ | 'EXTERNAL_ACH'
+ | 'EXTERNAL_CHECK'
+ | 'EXTERNAL_FEDNOW'
+ | 'EXTERNAL_RTP'
+ | 'EXTERNAL_TRANSFER';
/**
* Date string in RFC 3339 format. Only entries created before the specified time
diff --git a/src/resources/financial-accounts/statements/line-items.ts b/src/resources/financial-accounts/statements/line-items.ts
index 36f24155..4ed54677 100644
--- a/src/resources/financial-accounts/statements/line-items.ts
+++ b/src/resources/financial-accounts/statements/line-items.ts
@@ -70,6 +70,8 @@ export namespace StatementLineItems {
| 'CARD'
| 'EXTERNAL_ACH'
| 'EXTERNAL_CHECK'
+ | 'EXTERNAL_FEDNOW'
+ | 'EXTERNAL_RTP'
| 'EXTERNAL_TRANSFER'
| 'EXTERNAL_WIRE'
| 'MANAGEMENT_ADJUSTMENT'
@@ -139,6 +141,16 @@ export namespace StatementLineItems {
| 'EXTERNAL_CHECK_RELEASED'
| 'EXTERNAL_CHECK_REVERSED'
| 'EXTERNAL_CHECK_SETTLED'
+ | 'EXTERNAL_FEDNOW_CANCELED'
+ | 'EXTERNAL_FEDNOW_INITIATED'
+ | 'EXTERNAL_FEDNOW_RELEASED'
+ | 'EXTERNAL_FEDNOW_REVERSED'
+ | 'EXTERNAL_FEDNOW_SETTLED'
+ | 'EXTERNAL_RTP_CANCELED'
+ | 'EXTERNAL_RTP_INITIATED'
+ | 'EXTERNAL_RTP_RELEASED'
+ | 'EXTERNAL_RTP_REVERSED'
+ | 'EXTERNAL_RTP_SETTLED'
| 'EXTERNAL_TRANSFER_CANCELED'
| 'EXTERNAL_TRANSFER_INITIATED'
| 'EXTERNAL_TRANSFER_RELEASED'
@@ -166,7 +178,13 @@ export namespace StatementLineItems {
| 'TRANSFER_INSUFFICIENT_FUNDS'
| 'RETURNED_PAYMENT'
| 'RETURNED_PAYMENT_REVERSAL'
- | 'LITHIC_NETWORK_PAYMENT';
+ | 'LITHIC_NETWORK_PAYMENT'
+ | 'ANNUAL'
+ | 'ANNUAL_REVERSAL'
+ | 'QUARTERLY'
+ | 'QUARTERLY_REVERSAL'
+ | 'MONTHLY'
+ | 'MONTHLY_REVERSAL';
/**
* Globally unique identifier for a financial account
diff --git a/src/resources/management-operations.ts b/src/resources/management-operations.ts
index e5894521..a7f0e833 100644
--- a/src/resources/management-operations.ts
+++ b/src/resources/management-operations.ts
@@ -174,7 +174,13 @@ export namespace ManagementOperationTransaction {
| 'DISPUTE_WON'
| 'DISPUTE_WON_REVERSAL'
| 'DISBURSE'
- | 'DISBURSE_REVERSAL';
+ | 'DISBURSE_REVERSAL'
+ | 'ANNUAL'
+ | 'ANNUAL_REVERSAL'
+ | 'QUARTERLY'
+ | 'QUARTERLY_REVERSAL'
+ | 'MONTHLY'
+ | 'MONTHLY_REVERSAL';
subtype?: string | null;
}
@@ -221,7 +227,13 @@ export interface ManagementOperationCreateParams {
| 'DISPUTE_WON'
| 'DISPUTE_WON_REVERSAL'
| 'DISBURSE'
- | 'DISBURSE_REVERSAL';
+ | 'DISBURSE_REVERSAL'
+ | 'ANNUAL'
+ | 'ANNUAL_REVERSAL'
+ | 'QUARTERLY'
+ | 'QUARTERLY_REVERSAL'
+ | 'MONTHLY'
+ | 'MONTHLY_REVERSAL';
financial_account_token: string;
diff --git a/src/resources/payments.ts b/src/resources/payments.ts
index 09513d53..4ab96af0 100644
--- a/src/resources/payments.ts
+++ b/src/resources/payments.ts
@@ -208,6 +208,8 @@ export interface Payment {
| 'CARD'
| 'EXTERNAL_ACH'
| 'EXTERNAL_CHECK'
+ | 'EXTERNAL_FEDNOW'
+ | 'EXTERNAL_RTP'
| 'EXTERNAL_TRANSFER'
| 'EXTERNAL_WIRE'
| 'MANAGEMENT_ADJUSTMENT'
@@ -412,6 +414,11 @@ export namespace Payment {
*/
sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX';
+ /**
+ * Number of days the ACH transaction is on hold
+ */
+ ach_hold_period?: number | null;
+
/**
* Addenda information
*/
@@ -602,6 +609,11 @@ export namespace PaymentCreateParams {
export interface MethodAttributes {
sec_code: 'CCD' | 'PPD' | 'WEB';
+ /**
+ * Number of days to hold the ACH payment
+ */
+ ach_hold__period?: number;
+
addenda?: string | null;
}
}
diff --git a/src/resources/shared.ts b/src/resources/shared.ts
index 7f6f4441..63e5d681 100644
--- a/src/resources/shared.ts
+++ b/src/resources/shared.ts
@@ -244,6 +244,16 @@ export interface FinancialEvent {
| 'EXTERNAL_CHECK_RELEASED'
| 'EXTERNAL_CHECK_REVERSED'
| 'EXTERNAL_CHECK_SETTLED'
+ | 'EXTERNAL_FEDNOW_CANCELED'
+ | 'EXTERNAL_FEDNOW_INITIATED'
+ | 'EXTERNAL_FEDNOW_RELEASED'
+ | 'EXTERNAL_FEDNOW_REVERSED'
+ | 'EXTERNAL_FEDNOW_SETTLED'
+ | 'EXTERNAL_RTP_CANCELED'
+ | 'EXTERNAL_RTP_INITIATED'
+ | 'EXTERNAL_RTP_RELEASED'
+ | 'EXTERNAL_RTP_REVERSED'
+ | 'EXTERNAL_RTP_SETTLED'
| 'EXTERNAL_TRANSFER_CANCELED'
| 'EXTERNAL_TRANSFER_INITIATED'
| 'EXTERNAL_TRANSFER_RELEASED'
@@ -271,7 +281,13 @@ export interface FinancialEvent {
| 'TRANSFER_INSUFFICIENT_FUNDS'
| 'RETURNED_PAYMENT'
| 'RETURNED_PAYMENT_REVERSAL'
- | 'LITHIC_NETWORK_PAYMENT';
+ | 'LITHIC_NETWORK_PAYMENT'
+ | 'ANNUAL'
+ | 'ANNUAL_REVERSAL'
+ | 'QUARTERLY'
+ | 'QUARTERLY_REVERSAL'
+ | 'MONTHLY'
+ | 'MONTHLY_REVERSAL';
}
/**
diff --git a/tests/api-resources/auth-rules/v2/v2.test.ts b/tests/api-resources/auth-rules/v2/v2.test.ts
index 84c5cab7..3742e4e9 100644
--- a/tests/api-resources/auth-rules/v2/v2.test.ts
+++ b/tests/api-resources/auth-rules/v2/v2.test.ts
@@ -76,6 +76,7 @@ describe('resource v2', () => {
card_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
ending_before: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
event_stream: 'AUTHORIZATION',
+ event_streams: ['AUTHORIZATION'],
page_size: 1,
scope: 'PROGRAM',
starting_after: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
diff --git a/tests/api-resources/payments.test.ts b/tests/api-resources/payments.test.ts
index 8c7f0d16..6591cc97 100644
--- a/tests/api-resources/payments.test.ts
+++ b/tests/api-resources/payments.test.ts
@@ -32,7 +32,7 @@ describe('resource payments', () => {
external_bank_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
method: 'ACH_NEXT_DAY',
- method_attributes: { sec_code: 'CCD', addenda: 'addenda' },
+ method_attributes: { sec_code: 'CCD', ach_hold__period: 0, addenda: 'addenda' },
type: 'COLLECTION',
token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
memo: 'memo',
From 7fd2c611c7d496a0bdab898bf1b7d2ce9bde0342 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 9 Dec 2025 08:37:11 +0000
Subject: [PATCH 09/11] feat(api): add Google WPP to SDKs docs(api): clarify
error 422 for 3DS challenge response feat(api): add IS_AFTER / IS_BEFORE
operators to Auth Rule APIs
---
.stats.yml | 4 +-
src/resources/auth-rules/v2/v2.ts | 4 +-
src/resources/cards/cards.ts | 110 ++++++++++++++++++++----------
3 files changed, 79 insertions(+), 39 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 225dcbad..f9b50185 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 176
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-3e50857d2b8f4c85922abf83df7b3c6894f5bd500d6226ff589476029bbb258b.yml
-openapi_spec_hash: 6bef8b283eb7292ad6f3f62d40fda699
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-abe6a4f82f696099fa8ecb1cc44f08979e17d56578ae7ea68b0e9182e21df508.yml
+openapi_spec_hash: d2ce51592a9a234c6f34a1168a31f91f
config_hash: ba3fbfc99a1b8635d9e79e9e49d12952
diff --git a/src/resources/auth-rules/v2/v2.ts b/src/resources/auth-rules/v2/v2.ts
index 6466386c..cc1fa6e9 100644
--- a/src/resources/auth-rules/v2/v2.ts
+++ b/src/resources/auth-rules/v2/v2.ts
@@ -689,6 +689,8 @@ export type ConditionalOperation =
| 'IS_GREATER_THAN_OR_EQUAL_TO'
| 'IS_LESS_THAN'
| 'IS_LESS_THAN_OR_EQUAL_TO'
+ | 'IS_AFTER'
+ | 'IS_BEFORE'
| 'CONTAINS_ANY'
| 'CONTAINS_ALL'
| 'CONTAINS_NONE';
@@ -819,7 +821,7 @@ export namespace ConditionalTokenizationActionParameters {
/**
* A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
*/
-export type ConditionalValue = string | number | Array;
+export type ConditionalValue = string | number | Array | (string & {});
export interface MerchantLockParameters {
/**
diff --git a/src/resources/cards/cards.ts b/src/resources/cards/cards.ts
index 093bdd73..4eb4bdda 100644
--- a/src/resources/cards/cards.ts
+++ b/src/resources/cards/cards.ts
@@ -785,57 +785,77 @@ export interface CardProvisionResponse {
provisioning_payload?: string | ProvisionResponse;
}
-export interface CardWebProvisionResponse {
- /**
- * JWS object required for handoff to Apple's script.
- */
- jws?: CardWebProvisionResponse.Jws;
-
- /**
- * A unique identifier for the JWS object.
- */
- state?: string;
-}
+export type CardWebProvisionResponse =
+ | CardWebProvisionResponse.AppleWebPushProvisioningResponse
+ | CardWebProvisionResponse.GoogleWebPushProvisioningResponse;
export namespace CardWebProvisionResponse {
- /**
- * JWS object required for handoff to Apple's script.
- */
- export interface Jws {
+ export interface AppleWebPushProvisioningResponse {
/**
- * JWS unprotected headers containing header parameters that aren't
- * integrity-protected by the JWS signature.
+ * JWS object required for handoff to Apple's script.
*/
- header?: Jws.Header;
+ jws?: AppleWebPushProvisioningResponse.Jws;
/**
- * Base64url encoded JSON object containing the provisioning payload.
+ * A unique identifier for the JWS object.
*/
- payload?: string;
+ state?: string;
+ }
+ export namespace AppleWebPushProvisioningResponse {
/**
- * Base64url encoded JWS protected headers containing the header parameters that
- * are integrity-protected by the JWS signature.
+ * JWS object required for handoff to Apple's script.
*/
- protected?: string;
+ export interface Jws {
+ /**
+ * JWS unprotected headers containing header parameters that aren't
+ * integrity-protected by the JWS signature.
+ */
+ header?: Jws.Header;
+
+ /**
+ * Base64url encoded JSON object containing the provisioning payload.
+ */
+ payload?: string;
+
+ /**
+ * Base64url encoded JWS protected headers containing the header parameters that
+ * are integrity-protected by the JWS signature.
+ */
+ protected?: string;
+
+ /**
+ * Base64url encoded signature of the JWS object.
+ */
+ signature?: string;
+ }
+ export namespace Jws {
+ /**
+ * JWS unprotected headers containing header parameters that aren't
+ * integrity-protected by the JWS signature.
+ */
+ export interface Header {
+ /**
+ * The ID for the JWS Public Key of the key pair used to generate the signature.
+ */
+ kid?: string;
+ }
+ }
+ }
+
+ export interface GoogleWebPushProvisioningResponse {
/**
- * Base64url encoded signature of the JWS object.
+ * A base64 encoded and encrypted payload representing card data for the Google Pay
+ * UWPP FPAN flow.
*/
- signature?: string;
- }
+ google_opc?: string;
- export namespace Jws {
/**
- * JWS unprotected headers containing header parameters that aren't
- * integrity-protected by the JWS signature.
+ * A base64 encoded and encrypted payload representing card data for the Google Pay
+ * UWPP tokenization flow.
*/
- export interface Header {
- /**
- * The ID for the JWS Public Key of the key pair used to generate the signature.
- */
- kid?: string;
- }
+ tsp_opc?: string;
}
}
@@ -1479,10 +1499,28 @@ export interface CardSearchByPanParams {
}
export interface CardWebProvisionParams {
+ /**
+ * Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push
+ * Provisioning device identifier required for the tokenization flow
+ */
+ client_device_id?: string;
+
+ /**
+ * Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push
+ * Provisioning wallet account identifier required for the tokenization flow
+ */
+ client_wallet_account_id?: string;
+
/**
* Name of digital wallet provider.
*/
- digital_wallet?: 'APPLE_PAY';
+ digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY';
+
+ /**
+ * Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push
+ * Provisioning session identifier required for the FPAN flow.
+ */
+ server_session_id?: string;
}
Cards.AggregateBalances = AggregateBalances;
From 7b396543652adc2a8138a39be7043824bbc6ac85 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 9 Dec 2025 09:14:01 +0000
Subject: [PATCH 10/11] feat(api): support event_streams in auth_rules list
endpoint
---
.stats.yml | 2 +-
api.md | 1 +
src/resources/auth-rules/auth-rules.ts | 2 ++
src/resources/auth-rules/index.ts | 1 +
src/resources/auth-rules/v2/index.ts | 1 +
src/resources/auth-rules/v2/v2.ts | 50 +++++++++-----------------
6 files changed, 23 insertions(+), 34 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index f9b50185..3f808b06 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 176
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-abe6a4f82f696099fa8ecb1cc44f08979e17d56578ae7ea68b0e9182e21df508.yml
openapi_spec_hash: d2ce51592a9a234c6f34a1168a31f91f
-config_hash: ba3fbfc99a1b8635d9e79e9e49d12952
+config_hash: 739714a3fead0b26ee3a3b7bc51081f6
diff --git a/api.md b/api.md
index d29cc520..3d009e5d 100644
--- a/api.md
+++ b/api.md
@@ -80,6 +80,7 @@ Types:
- ConditionalOperation
- ConditionalTokenizationActionParameters
- ConditionalValue
+- EventStream
- MerchantLockParameters
- RuleStats
- VelocityLimitParams
diff --git a/src/resources/auth-rules/auth-rules.ts b/src/resources/auth-rules/auth-rules.ts
index 7a9c977a..bb46629b 100644
--- a/src/resources/auth-rules/auth-rules.ts
+++ b/src/resources/auth-rules/auth-rules.ts
@@ -14,6 +14,7 @@ import {
ConditionalOperation,
ConditionalTokenizationActionParameters,
ConditionalValue,
+ EventStream,
MerchantLockParameters,
RuleStats,
V2,
@@ -48,6 +49,7 @@ export declare namespace AuthRules {
type ConditionalOperation as ConditionalOperation,
type ConditionalTokenizationActionParameters as ConditionalTokenizationActionParameters,
type ConditionalValue as ConditionalValue,
+ type EventStream as EventStream,
type MerchantLockParameters as MerchantLockParameters,
type RuleStats as RuleStats,
type VelocityLimitParams as VelocityLimitParams,
diff --git a/src/resources/auth-rules/index.ts b/src/resources/auth-rules/index.ts
index c3a79d29..1b27cc39 100644
--- a/src/resources/auth-rules/index.ts
+++ b/src/resources/auth-rules/index.ts
@@ -13,6 +13,7 @@ export {
type ConditionalOperation,
type ConditionalTokenizationActionParameters,
type ConditionalValue,
+ type EventStream,
type MerchantLockParameters,
type RuleStats,
type VelocityLimitParams,
diff --git a/src/resources/auth-rules/v2/index.ts b/src/resources/auth-rules/v2/index.ts
index 64760192..63468a99 100644
--- a/src/resources/auth-rules/v2/index.ts
+++ b/src/resources/auth-rules/v2/index.ts
@@ -19,6 +19,7 @@ export {
type ConditionalOperation,
type ConditionalTokenizationActionParameters,
type ConditionalValue,
+ type EventStream,
type MerchantLockParameters,
type RuleStats,
type VelocityLimitParams,
diff --git a/src/resources/auth-rules/v2/v2.ts b/src/resources/auth-rules/v2/v2.ts
index cc1fa6e9..e077ddfd 100644
--- a/src/resources/auth-rules/v2/v2.ts
+++ b/src/resources/auth-rules/v2/v2.ts
@@ -151,12 +151,7 @@ export interface AuthRule {
/**
* The event stream during which the rule will be evaluated.
*/
- event_stream:
- | 'AUTHORIZATION'
- | 'THREE_DS_AUTHENTICATION'
- | 'TOKENIZATION'
- | 'ACH_CREDIT_RECEIPT'
- | 'ACH_DEBIT_RECEIPT';
+ event_stream: EventStream;
/**
* Indicates whether this auth rule is managed by Lithic. If true, the rule cannot
@@ -823,6 +818,16 @@ export namespace ConditionalTokenizationActionParameters {
*/
export type ConditionalValue = string | number | Array | (string & {});
+/**
+ * The event stream during which the rule will be evaluated.
+ */
+export type EventStream =
+ | 'AUTHORIZATION'
+ | 'THREE_DS_AUTHENTICATION'
+ | 'TOKENIZATION'
+ | 'ACH_CREDIT_RECEIPT'
+ | 'ACH_DEBIT_RECEIPT';
+
export interface MerchantLockParameters {
/**
* A list of merchant locks defining specific merchants or groups of merchants
@@ -1265,12 +1270,7 @@ export declare namespace V2CreateParams {
/**
* The event stream during which the rule will be evaluated.
*/
- event_stream?:
- | 'AUTHORIZATION'
- | 'THREE_DS_AUTHENTICATION'
- | 'TOKENIZATION'
- | 'ACH_CREDIT_RECEIPT'
- | 'ACH_DEBIT_RECEIPT';
+ event_stream?: EventStream;
/**
* Auth Rule Name
@@ -1313,12 +1313,7 @@ export declare namespace V2CreateParams {
/**
* The event stream during which the rule will be evaluated.
*/
- event_stream?:
- | 'AUTHORIZATION'
- | 'THREE_DS_AUTHENTICATION'
- | 'TOKENIZATION'
- | 'ACH_CREDIT_RECEIPT'
- | 'ACH_DEBIT_RECEIPT';
+ event_stream?: EventStream;
/**
* Auth Rule Name
@@ -1361,12 +1356,7 @@ export declare namespace V2CreateParams {
/**
* The event stream during which the rule will be evaluated.
*/
- event_stream?:
- | 'AUTHORIZATION'
- | 'THREE_DS_AUTHENTICATION'
- | 'TOKENIZATION'
- | 'ACH_CREDIT_RECEIPT'
- | 'ACH_DEBIT_RECEIPT';
+ event_stream?: EventStream;
/**
* Card tokens to which the Auth Rule does not apply.
@@ -1480,21 +1470,14 @@ export interface V2ListParams extends CursorPageParams {
* Deprecated: Use event_streams instead. Only return Auth rules that are executed
* during the provided event stream.
*/
- event_stream?:
- | 'AUTHORIZATION'
- | 'THREE_DS_AUTHENTICATION'
- | 'TOKENIZATION'
- | 'ACH_CREDIT_RECEIPT'
- | 'ACH_DEBIT_RECEIPT';
+ event_stream?: EventStream;
/**
* Only return Auth rules that are executed during any of the provided event
* streams. If event_streams and event_stream are specified, the values will be
* combined.
*/
- event_streams?: Array<
- 'AUTHORIZATION' | 'THREE_DS_AUTHENTICATION' | 'TOKENIZATION' | 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'
- >;
+ event_streams?: Array;
/**
* Only return Auth Rules that are bound to the provided scope.
@@ -1549,6 +1532,7 @@ export declare namespace V2 {
type ConditionalOperation as ConditionalOperation,
type ConditionalTokenizationActionParameters as ConditionalTokenizationActionParameters,
type ConditionalValue as ConditionalValue,
+ type EventStream as EventStream,
type MerchantLockParameters as MerchantLockParameters,
type RuleStats as RuleStats,
type VelocityLimitParams as VelocityLimitParams,
From 21f1c625d8e099b365235f05ad8213f6253ffd89 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 9 Dec 2025 09:14:23 +0000
Subject: [PATCH 11/11] release: 0.125.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++
package.json | 2 +-
src/version.ts | 2 +-
4 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index af43dc96..b55f19e9 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.124.0"
+ ".": "0.125.0"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 323264cc..c322e9ab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,39 @@
# Changelog
+## 0.125.0 (2025-12-09)
+
+Full Changelog: [v0.124.0...v0.125.0](https://github.com/lithic-com/lithic-node/compare/v0.124.0...v0.125.0)
+
+### Features
+
+* **api:** add bulk card creation APIs ([cbe8285](https://github.com/lithic-com/lithic-node/commit/cbe82854fa79d7b47a32b94fd75c37e51b347d40))
+* **api:** Add event_streams to auth rules APIs ([26629d1](https://github.com/lithic-com/lithic-node/commit/26629d1c35f425be70379cbab4d398bc7aaf5fdb))
+* **api:** add Google WPP to SDKs ([7fd2c61](https://github.com/lithic-com/lithic-node/commit/7fd2c611c7d496a0bdab898bf1b7d2ce9bde0342))
+* **api:** add IS_AFTER / IS_BEFORE operators to Auth Rule APIs ([7fd2c61](https://github.com/lithic-com/lithic-node/commit/7fd2c611c7d496a0bdab898bf1b7d2ce9bde0342))
+* **api:** Add new fee types ([26629d1](https://github.com/lithic-com/lithic-node/commit/26629d1c35f425be70379cbab4d398bc7aaf5fdb))
+* **api:** Add optional ach_hold_period ([26629d1](https://github.com/lithic-com/lithic-node/commit/26629d1c35f425be70379cbab4d398bc7aaf5fdb))
+* **api:** support event_streams in auth_rules list endpoint ([7b39654](https://github.com/lithic-com/lithic-node/commit/7b396543652adc2a8138a39be7043824bbc6ac85))
+
+
+### Bug Fixes
+
+* **api:** extract several common types to reduce duplication ([cbe8285](https://github.com/lithic-com/lithic-node/commit/cbe82854fa79d7b47a32b94fd75c37e51b347d40))
+* **mcp:** correct code tool API endpoint ([01caa79](https://github.com/lithic-com/lithic-node/commit/01caa79422659c90e274b449ee882fdd7c04cef2))
+* **mcp:** return correct lines on typescript errors ([ee744e3](https://github.com/lithic-com/lithic-node/commit/ee744e3c2f84fc53b220a483334f7e4c7914f286))
+
+
+### Chores
+
+* **client:** fix logger property type ([fdcf76c](https://github.com/lithic-com/lithic-node/commit/fdcf76c889a05ef505a61380814da7ec7b18080b))
+* **internal:** codegen related update ([c904aa8](https://github.com/lithic-com/lithic-node/commit/c904aa8b4ad89daf3435b02b52c1e10f56d534fa))
+* **internal:** codegen related update ([29cac70](https://github.com/lithic-com/lithic-node/commit/29cac7024024a9761e9b16d73a6d758184b2d8d1))
+* **internal:** upgrade eslint ([4350d98](https://github.com/lithic-com/lithic-node/commit/4350d987faf057810107110ce2fb4d8dfaa7e59a))
+
+
+### Documentation
+
+* **api:** clarify error 422 for 3DS challenge response ([7fd2c61](https://github.com/lithic-com/lithic-node/commit/7fd2c611c7d496a0bdab898bf1b7d2ce9bde0342))
+
## 0.124.0 (2025-11-24)
Full Changelog: [v0.112.1...v0.124.0](https://github.com/lithic-com/lithic-node/compare/v0.112.1...v0.124.0)
diff --git a/package.json b/package.json
index 09927ecf..7a58681f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "lithic",
- "version": "0.124.0",
+ "version": "0.125.0",
"description": "The official TypeScript library for the Lithic API",
"author": "Lithic ",
"types": "dist/index.d.ts",
diff --git a/src/version.ts b/src/version.ts
index f8a5815b..671589e3 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.124.0'; // x-release-please-version
+export const VERSION = '0.125.0'; // x-release-please-version