diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index ab38d227..f8e50efc 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -19,4 +19,3 @@ jobs:
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.LITHIC_NPM_TOKEN || secrets.NPM_TOKEN }}
-
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 0ad84350..88624072 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.126.0"
+ ".": "0.127.0"
}
diff --git a/.stats.yml b/.stats.yml
index 315b0f37..ddb484b7 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: 2b2786c821f62db49cc630ba45329336
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4ecc06edca2cfad4eaf11573611e89823fda5f56370bac5cd02a498a6b277d09.yml
+openapi_spec_hash: 8f4a30bec4348cbde85b1e65bef9189a
+config_hash: 9dddee5f7af579864599849cb28a0770
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d30a0ce5..a8e73e43 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,41 @@
# Changelog
+## 0.127.0 (2026-01-08)
+
+Full Changelog: [v0.126.0...v0.127.0](https://github.com/lithic-com/lithic-node/compare/v0.126.0...v0.127.0)
+
+### Features
+
+* **api:** Add card state attribute to tokenization rules ([0a56f6a](https://github.com/lithic-com/lithic-node/commit/0a56f6a01d6965c24dde06bdc1e56f252235a575))
+* **api:** Add event_type to ASA request and 3DS decisioning request ([0a56f6a](https://github.com/lithic-com/lithic-node/commit/0a56f6a01d6965c24dde06bdc1e56f252235a575))
+* **api:** add external_id to payment_event ([538d96e](https://github.com/lithic-com/lithic-node/commit/538d96e5eba1b99e56839f5b0aac87496b681279))
+* **api:** add get /v1/transfer_limits endpoint ([538d96e](https://github.com/lithic-com/lithic-node/commit/538d96e5eba1b99e56839f5b0aac87496b681279))
+* **api:** add post /v1/book_transfers/{book_transfer_token}/retry endpoint ([538d96e](https://github.com/lithic-com/lithic-node/commit/538d96e5eba1b99e56839f5b0aac87496b681279))
+* **api:** Add user defined status to ledger accounts ([0a56f6a](https://github.com/lithic-com/lithic-node/commit/0a56f6a01d6965c24dde06bdc1e56f252235a575))
+* **api:** add WIRE_DRAWDOWN_REQUEST transfer type ([e7c375b](https://github.com/lithic-com/lithic-node/commit/e7c375bf328756a708d54e8a33e2ed154ebfeb93))
+* **api:** Expose Payment Allocation Details ([0a56f6a](https://github.com/lithic-com/lithic-node/commit/0a56f6a01d6965c24dde06bdc1e56f252235a575))
+* **api:** remove unnecessary X-Lithic-Pagination header ([e7c375b](https://github.com/lithic-com/lithic-node/commit/e7c375bf328756a708d54e8a33e2ed154ebfeb93))
+* **api:** remove v1/aggregate_balances and related models ([0078e74](https://github.com/lithic-com/lithic-node/commit/0078e74adc26ff15a7340684c1b07b662e500e01))
+
+
+### Bug Fixes
+
+* **docs:** remove extraneous example object fields ([3ba95e6](https://github.com/lithic-com/lithic-node/commit/3ba95e64b6eea6893359d17a21d66eab3a93219b))
+
+
+### Chores
+
+* break long lines in snippets into multiline ([5e9608e](https://github.com/lithic-com/lithic-node/commit/5e9608eda7596bc4d7d621013feb6900f4caae98))
+* formatting ([0b4c11e](https://github.com/lithic-com/lithic-node/commit/0b4c11edeffb476c403be5b84c1e310fd5dfc063))
+* **internal:** codegen related update ([a06ac86](https://github.com/lithic-com/lithic-node/commit/a06ac867f0c60f77fd92dfe6a7eac8e9c4967cd5))
+* update code formatting ([0a56f6a](https://github.com/lithic-com/lithic-node/commit/0a56f6a01d6965c24dde06bdc1e56f252235a575))
+
+
+### Documentation
+
+* **api:** clarify description of token / retry_token when it serves as idempotency key ([e7c375b](https://github.com/lithic-com/lithic-node/commit/e7c375bf328756a708d54e8a33e2ed154ebfeb93))
+* Update language for Google Web Push Provisioning docs ([0a56f6a](https://github.com/lithic-com/lithic-node/commit/0a56f6a01d6965c24dde06bdc1e56f252235a575))
+
## 0.126.0 (2025-12-11)
Full Changelog: [v0.125.0...v0.126.0](https://github.com/lithic-com/lithic-node/compare/v0.125.0...v0.126.0)
diff --git a/LICENSE b/LICENSE
index 06eee64e..9410347b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright 2025 Lithic
+ Copyright 2026 Lithic
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/MIGRATION.md b/MIGRATION.md
index b79795e2..4ed0a385 100644
--- a/MIGRATION.md
+++ b/MIGRATION.md
@@ -104,12 +104,10 @@ client.example.list(undefined, { headers: { ... } });
- `client.tokenizations.resendActivationCode()`
- `client.tokenizations.updateDigitalCardArt()`
- `client.cards.list()`
-- `client.cards.aggregateBalances.list()`
- `client.cards.balances.list()`
- `client.cards.financialTransactions.list()`
- `client.cardBulkOrders.list()`
- `client.balances.list()`
-- `client.aggregateBalances.list()`
- `client.disputes.list()`
- `client.disputes.initiateEvidenceUpload()`
- `client.disputes.listEvidences()`
@@ -144,27 +142,10 @@ client.example.list(undefined, { headers: { ... } });
- `client.fundingEvents.list()`
- `client.networkPrograms.list()`
- `client.accountActivity.list()`
+- `client.transferLimits.list()`
-### HTTP method naming
-
-Previously some methods could not be named intuitively due to an internal naming conflict. This has been fixed and the affected methods are now correctly named.
-
-```ts
-// Before
-client.authRules.v2.del();
-client.disputes.del();
-client.events.subscriptions.del();
-client.responderEndpoints.del();
-
-// After
-client.authRules.v2.delete();
-client.disputes.delete();
-client.events.subscriptions.delete();
-client.responderEndpoints.delete();
-```
-
### Removed `httpAgent` in favor of `fetchOptions`
The `httpAgent` client option has been removed in favor of a [platform-specific `fetchOptions` property](https://github.com/lithic-com/lithic-node#fetch-options).
diff --git a/README.md b/README.md
index 082b77a9..92adf748 100644
--- a/README.md
+++ b/README.md
@@ -156,23 +156,6 @@ while (page.hasNextPage()) {
}
```
-## Default Headers
-
-We automatically send the `X-Lithic-Pagination` header set to `cursor`.
-
-If you need to, you can override it by setting default headers on a per-request basis.
-
-```ts
-import Lithic from 'lithic';
-
-const client = new Lithic();
-
-const card = await client.cards.create(
- { type: 'SINGLE_USE' },
- { headers: { 'X-Lithic-Pagination': 'My-Custom-Value' } },
-);
-```
-
## Webhooks
Lithic uses webhooks to notify your application when events happen. The library provides signature verification via the `standardwebhooks` package.
@@ -201,7 +184,7 @@ switch (event.event_type) {
```ts
// Verify signature without parsing the event
-lithic.webhooks.verifySignature(body, headers)
+lithic.webhooks.verifySignature(body, headers);
// Parse only - skips signature verification
const event = lithic.webhooks.parseUnsafe(body);
@@ -231,7 +214,6 @@ export default async function POST(req: Request) {
> [!NOTE]
> If you're using the pages router, you will need [this trick](https://vancelucas.com/blog/how-to-access-raw-body-data-with-next-js/) to get the raw body.
-
## Advanced Usage
### Accessing raw Response data (e.g., headers)
@@ -250,7 +232,9 @@ const response = await client.cards.create({ type: 'SINGLE_USE' }).asResponse();
console.log(response.headers.get('X-My-Header'));
console.log(response.statusText); // access the underlying Response object
-const { data: card, response: raw } = await client.cards.create({ type: 'SINGLE_USE' }).withResponse();
+const { data: card, response: raw } = await client.cards
+ .create({ type: 'SINGLE_USE' })
+ .withResponse();
console.log(raw.headers.get('X-My-Header'));
console.log(card.token);
```
diff --git a/api.md b/api.md
index 63c36ec3..8b6e677b 100644
--- a/api.md
+++ b/api.md
@@ -189,16 +189,6 @@ Methods:
- client.cards.getEmbedHTML(...args) -> Promise<string>
- client.cards.getEmbedURL(...args) -> string
-## AggregateBalances
-
-Types:
-
-- AggregateBalanceListResponse
-
-Methods:
-
-- client.cards.aggregateBalances.list({ ...params }) -> AggregateBalanceListResponsesSinglePage
-
## Balances
Methods:
@@ -235,16 +225,6 @@ Methods:
- client.balances.list({ ...params }) -> BalancesSinglePage
-# AggregateBalances
-
-Types:
-
-- AggregateBalance
-
-Methods:
-
-- client.aggregateBalances.list({ ...params }) -> AggregateBalancesSinglePage
-
# Disputes
Types:
@@ -624,6 +604,7 @@ Methods:
- client.bookTransfers.create({ ...params }) -> BookTransferResponse
- client.bookTransfers.retrieve(bookTransferToken) -> BookTransferResponse
- client.bookTransfers.list({ ...params }) -> BookTransferResponsesCursorPage
+- client.bookTransfers.retry(bookTransferToken, { ...params }) -> BookTransferResponse
- client.bookTransfers.reverse(bookTransferToken, { ...params }) -> BookTransferResponse
# CreditProducts
@@ -737,6 +718,16 @@ Methods:
- client.accountActivity.list({ ...params }) -> AccountActivityListResponsesCursorPage
- client.accountActivity.retrieveTransaction(transactionToken) -> AccountActivityRetrieveTransactionResponse
+# TransferLimits
+
+Types:
+
+- TransferLimitsResponse
+
+Methods:
+
+- client.transferLimits.list({ ...params }) -> TransferLimitsResponseDataSinglePage
+
# Webhooks
Types:
@@ -745,7 +736,7 @@ Types:
- AccountHolderUpdatedWebhookEvent
- AccountHolderVerificationWebhookEvent
- AccountHolderDocumentUpdatedWebhookEvent
-- AsaRequestWebhookEvent
+- CardAuthorizationApprovalRequestWebhookEvent
- TokenizationDecisioningRequestWebhookEvent
- AuthRulesBacktestReportCreatedWebhookEvent
- BalanceUpdatedWebhookEvent
@@ -793,6 +784,7 @@ Types:
- TokenizationTwoFactorAuthenticationCodeWebhookEvent
- TokenizationTwoFactorAuthenticationCodeSentWebhookEvent
- TokenizationUpdatedWebhookEvent
+- ThreeDSAuthenticationApprovalRequestWebhookEvent
- DisputeTransactionCreatedWebhookEvent
- DisputeTransactionUpdatedWebhookEvent
- ParsedWebhookEvent
diff --git a/bin/cli b/bin/cli
index 21b41a9a..8f314993 100755
--- a/bin/cli
+++ b/bin/cli
@@ -8,15 +8,21 @@ const commands = {
fn: () => {
const result = spawnSync(
'npx',
- ['-y', 'https://github.com/stainless-api/migrate-ts/releases/download/0.0.2/stainless-api-migrate-0.0.2-6.tgz', '--migrationConfig', require.resolve('./migration-config.json'), ...process.argv.slice(3)],
+ [
+ '-y',
+ 'https://github.com/stainless-api/migrate-ts/releases/download/0.0.2/stainless-api-migrate-0.0.2-6.tgz',
+ '--migrationConfig',
+ require.resolve('./migration-config.json'),
+ ...process.argv.slice(3),
+ ],
{ stdio: 'inherit' },
);
if (result.status !== 0) {
process.exit(result.status);
}
- }
- }
-}
+ },
+ },
+};
function exitWithHelp() {
console.log(`Usage: lithic `);
diff --git a/bin/migration-config.json b/bin/migration-config.json
index 094f7b96..802f17f5 100644
--- a/bin/migration-config.json
+++ b/bin/migration-config.json
@@ -36,11 +36,6 @@
}
]
},
- {
- "base": "authRules.v2",
- "name": "delete",
- "oldName": "del"
- },
{
"base": "authRules.v2.backtests",
"name": "retrieve",
@@ -107,11 +102,6 @@
}
]
},
- {
- "base": "disputes",
- "name": "delete",
- "oldName": "del"
- },
{
"base": "disputes",
"name": "deleteEvidence",
@@ -178,11 +168,6 @@
}
]
},
- {
- "base": "events.subscriptions",
- "name": "delete",
- "oldName": "del"
- },
{
"base": "events.eventSubscriptions",
"name": "resend",
@@ -351,11 +336,6 @@
"type": "options"
}
]
- },
- {
- "base": "responderEndpoints",
- "name": "delete",
- "oldName": "del"
}
]
}
diff --git a/package.json b/package.json
index 701cf9b0..ab8bebb0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "lithic",
- "version": "0.126.0",
+ "version": "0.127.0",
"description": "The official TypeScript library for the Lithic API",
"author": "Lithic ",
"types": "dist/index.d.ts",
diff --git a/src/client.ts b/src/client.ts
index 18d2201e..31a0d811 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -64,12 +64,6 @@ import {
Accounts,
AccountsCursorPage,
} from './resources/accounts';
-import {
- AggregateBalance,
- AggregateBalanceListParams,
- AggregateBalances,
- AggregateBalancesSinglePage,
-} from './resources/aggregate-balances';
import { AuthStreamEnrollment, AuthStreamSecret } from './resources/auth-stream-enrollment';
import { Balance, BalanceListParams, Balances, BalancesSinglePage } from './resources/balances';
import {
@@ -77,6 +71,7 @@ import {
BookTransferListParams,
BookTransferResponse,
BookTransferResponsesCursorPage,
+ BookTransferRetryParams,
BookTransferReverseParams,
BookTransfers,
} from './resources/book-transfers';
@@ -196,17 +191,23 @@ import {
TokenizationsCursorPage,
WalletDecisioningInfo,
} from './resources/tokenizations';
+import {
+ TransferLimitListParams,
+ TransferLimits,
+ TransferLimitsResponse,
+ TransferLimitsResponseDataSinglePage,
+} from './resources/transfer-limits';
import { Transfer, TransferCreateParams, Transfers } from './resources/transfers';
import {
AccountHolderCreatedWebhookEvent,
AccountHolderDocumentUpdatedWebhookEvent,
AccountHolderUpdatedWebhookEvent,
AccountHolderVerificationWebhookEvent,
- AsaRequestWebhookEvent,
AuthRulesBacktestReportCreatedWebhookEvent,
BalanceUpdatedWebhookEvent,
BookTransferTransactionCreatedWebhookEvent,
BookTransferTransactionUpdatedWebhookEvent,
+ CardAuthorizationApprovalRequestWebhookEvent,
CardConvertedWebhookEvent,
CardCreatedWebhookEvent,
CardReissuedWebhookEvent,
@@ -244,6 +245,7 @@ import {
PaymentTransactionUpdatedWebhookEvent,
SettlementReportUpdatedWebhookEvent,
StatementsCreatedWebhookEvent,
+ ThreeDSAuthenticationApprovalRequestWebhookEvent,
ThreeDSAuthenticationChallengeWebhookEvent,
ThreeDSAuthenticationCreatedWebhookEvent,
ThreeDSAuthenticationUpdatedWebhookEvent,
@@ -1028,7 +1030,6 @@ export class Lithic {
'X-Stainless-Retry-Count': String(retryCount),
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
...getPlatformHeaders(),
- 'X-Lithic-Pagination': 'cursor',
},
await this.authHeaders(options),
this._options.defaultHeaders,
@@ -1106,7 +1107,6 @@ export class Lithic {
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);
disputesV2: API.DisputesV2 = new API.DisputesV2(this);
events: API.Events = new API.Events(this);
@@ -1129,6 +1129,7 @@ export class Lithic {
fraud: API.Fraud = new API.Fraud(this);
networkPrograms: API.NetworkPrograms = new API.NetworkPrograms(this);
accountActivity: API.AccountActivity = new API.AccountActivity(this);
+ transferLimits: API.TransferLimits = new API.TransferLimits(this);
webhooks: API.Webhooks = new API.Webhooks(this);
}
@@ -1141,7 +1142,6 @@ Lithic.Tokenizations = Tokenizations;
Lithic.Cards = Cards;
Lithic.CardBulkOrders = CardBulkOrders;
Lithic.Balances = Balances;
-Lithic.AggregateBalances = AggregateBalances;
Lithic.Disputes = Disputes;
Lithic.DisputesV2 = DisputesV2;
Lithic.Events = Events;
@@ -1164,6 +1164,7 @@ Lithic.FundingEvents = FundingEvents;
Lithic.Fraud = Fraud;
Lithic.NetworkPrograms = NetworkPrograms;
Lithic.AccountActivity = AccountActivity;
+Lithic.TransferLimits = TransferLimits;
Lithic.Webhooks = Webhooks;
export declare namespace Lithic {
@@ -1274,13 +1275,6 @@ export declare namespace Lithic {
type BalanceListParams as BalanceListParams,
};
- export {
- AggregateBalances as AggregateBalances,
- type AggregateBalance as AggregateBalance,
- type AggregateBalancesSinglePage as AggregateBalancesSinglePage,
- type AggregateBalanceListParams as AggregateBalanceListParams,
- };
-
export {
Disputes as Disputes,
type Dispute as Dispute,
@@ -1437,6 +1431,7 @@ export declare namespace Lithic {
type BookTransferResponsesCursorPage as BookTransferResponsesCursorPage,
type BookTransferCreateParams as BookTransferCreateParams,
type BookTransferListParams as BookTransferListParams,
+ type BookTransferRetryParams as BookTransferRetryParams,
type BookTransferReverseParams as BookTransferReverseParams,
};
@@ -1496,13 +1491,20 @@ export declare namespace Lithic {
type AccountActivityListParams as AccountActivityListParams,
};
+ export {
+ TransferLimits as TransferLimits,
+ type TransferLimitsResponse as TransferLimitsResponse,
+ type TransferLimitsResponseDataSinglePage as TransferLimitsResponseDataSinglePage,
+ type TransferLimitListParams as TransferLimitListParams,
+ };
+
export {
Webhooks as Webhooks,
type AccountHolderCreatedWebhookEvent as AccountHolderCreatedWebhookEvent,
type AccountHolderUpdatedWebhookEvent as AccountHolderUpdatedWebhookEvent,
type AccountHolderVerificationWebhookEvent as AccountHolderVerificationWebhookEvent,
type AccountHolderDocumentUpdatedWebhookEvent as AccountHolderDocumentUpdatedWebhookEvent,
- type AsaRequestWebhookEvent as AsaRequestWebhookEvent,
+ type CardAuthorizationApprovalRequestWebhookEvent as CardAuthorizationApprovalRequestWebhookEvent,
type TokenizationDecisioningRequestWebhookEvent as TokenizationDecisioningRequestWebhookEvent,
type AuthRulesBacktestReportCreatedWebhookEvent as AuthRulesBacktestReportCreatedWebhookEvent,
type BalanceUpdatedWebhookEvent as BalanceUpdatedWebhookEvent,
@@ -1550,6 +1552,7 @@ export declare namespace Lithic {
type TokenizationTwoFactorAuthenticationCodeWebhookEvent as TokenizationTwoFactorAuthenticationCodeWebhookEvent,
type TokenizationTwoFactorAuthenticationCodeSentWebhookEvent as TokenizationTwoFactorAuthenticationCodeSentWebhookEvent,
type TokenizationUpdatedWebhookEvent as TokenizationUpdatedWebhookEvent,
+ type ThreeDSAuthenticationApprovalRequestWebhookEvent as ThreeDSAuthenticationApprovalRequestWebhookEvent,
type DisputeTransactionCreatedWebhookEvent as DisputeTransactionCreatedWebhookEvent,
type DisputeTransactionUpdatedWebhookEvent as DisputeTransactionUpdatedWebhookEvent,
type ParsedWebhookEvent as ParsedWebhookEvent,
diff --git a/src/resources/account-holders.ts b/src/resources/account-holders.ts
index 8809aa58..950a5fd3 100644
--- a/src/resources/account-holders.ts
+++ b/src/resources/account-holders.ts
@@ -42,7 +42,6 @@ export class AccountHolders extends APIResource {
* },
* control_person: {
* address: { ... },
- * birthdate: '1980-04-12',
* dob: '1991-03-08T08:00:00Z',
* email: 'tom@middle-pluto.com',
* first_name: 'Tom',
diff --git a/src/resources/aggregate-balances.ts b/src/resources/aggregate-balances.ts
deleted file mode 100644
index cc5094dc..00000000
--- a/src/resources/aggregate-balances.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-import { APIResource } from '../core/resource';
-import { PagePromise, SinglePage } from '../core/pagination';
-import { RequestOptions } from '../internal/request-options';
-
-export class AggregateBalances extends APIResource {
- /**
- * Get the aggregated balance across all end-user accounts by financial account
- * type
- */
- list(
- query: AggregateBalanceListParams | null | undefined = {},
- options?: RequestOptions,
- ): PagePromise {
- return this._client.getAPIList('/v1/aggregate_balances', SinglePage, {
- query,
- ...options,
- });
- }
-}
-
-export type AggregateBalancesSinglePage = SinglePage;
-
-/**
- * Aggregate Balance across all end-user accounts
- */
-export interface AggregateBalance {
- /**
- * 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;
-
- /**
- * Type of financial account
- */
- financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY';
-
- /**
- * Globally unique identifier for the financial account that had its balance
- * updated most recently
- */
- last_financial_account_token: string;
-
- /**
- * Globally unique identifier for the last transaction event that impacted this
- * balance
- */
- last_transaction_event_token: string;
-
- /**
- * Globally unique identifier for the last 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;
-
- /**
- * Date and time for when the balance was last updated.
- */
- updated: string;
-}
-
-export interface AggregateBalanceListParams {
- /**
- * Get the aggregate balance for a given Financial Account type.
- */
- financial_account_type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY';
-}
-
-export declare namespace AggregateBalances {
- export {
- type AggregateBalance as AggregateBalance,
- type AggregateBalancesSinglePage as AggregateBalancesSinglePage,
- type AggregateBalanceListParams as AggregateBalanceListParams,
- };
-}
diff --git a/src/resources/auth-rules/v2/v2.ts b/src/resources/auth-rules/v2/v2.ts
index e077ddfd..be5854d9 100644
--- a/src/resources/auth-rules/v2/v2.ts
+++ b/src/resources/auth-rules/v2/v2.ts
@@ -788,6 +788,8 @@ export namespace ConditionalTokenizationActionParameters {
* `TOO_MANY_RECENT_TOKENS`, `UNABLE_TO_ASSESS`.
* - `TOKEN_REQUESTOR_ID`: Unique identifier for the entity requesting the token.
* - `WALLET_TOKEN_STATUS`: The current status of the wallet token.
+ * - `CARD_STATE`: The state of the card being tokenized. Valid values are
+ * `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
*/
attribute:
| 'TIMESTAMP'
@@ -799,7 +801,8 @@ export namespace ConditionalTokenizationActionParameters {
| 'WALLET_RECOMMENDED_DECISION'
| 'WALLET_RECOMMENDATION_REASONS'
| 'TOKEN_REQUESTOR_ID'
- | 'WALLET_TOKEN_STATUS';
+ | 'WALLET_TOKEN_STATUS'
+ | 'CARD_STATE';
/**
* The operation to apply to the attribute
diff --git a/src/resources/book-transfers.ts b/src/resources/book-transfers.ts
index 2fd73ae3..93880beb 100644
--- a/src/resources/book-transfers.ts
+++ b/src/resources/book-transfers.ts
@@ -36,6 +36,17 @@ export class BookTransfers extends APIResource {
});
}
+ /**
+ * Retry a book transfer that has been declined
+ */
+ retry(
+ bookTransferToken: string,
+ body: BookTransferRetryParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.post(path`/v1/book_transfers/${bookTransferToken}/retry`, { body, ...options });
+ }
+
/**
* Reverse a book transfer
*/
@@ -383,6 +394,14 @@ export interface BookTransferListParams extends CursorPageParams {
status?: 'DECLINED' | 'SETTLED';
}
+export interface BookTransferRetryParams {
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will
+ * become the transaction token.
+ */
+ retry_token: string;
+}
+
export interface BookTransferReverseParams {
/**
* Optional descriptor for the reversal.
@@ -396,6 +415,7 @@ export declare namespace BookTransfers {
type BookTransferResponsesCursorPage as BookTransferResponsesCursorPage,
type BookTransferCreateParams as BookTransferCreateParams,
type BookTransferListParams as BookTransferListParams,
+ type BookTransferRetryParams as BookTransferRetryParams,
type BookTransferReverseParams as BookTransferReverseParams,
};
}
diff --git a/src/resources/cards/aggregate-balances.ts b/src/resources/cards/aggregate-balances.ts
deleted file mode 100644
index 1b1da61d..00000000
--- a/src/resources/cards/aggregate-balances.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-import { APIResource } from '../../core/resource';
-import { PagePromise, SinglePage } from '../../core/pagination';
-import { RequestOptions } from '../../internal/request-options';
-
-export class AggregateBalances extends APIResource {
- /**
- * Get the aggregated card balance across all end-user accounts.
- *
- * @example
- * ```ts
- * // Automatically fetches more pages as needed.
- * for await (const aggregateBalanceListResponse of client.cards.aggregateBalances.list()) {
- * // ...
- * }
- * ```
- */
- list(
- query: AggregateBalanceListParams | null | undefined = {},
- options?: RequestOptions,
- ): PagePromise {
- return this._client.getAPIList('/v1/cards/aggregate_balances', SinglePage, {
- query,
- ...options,
- });
- }
-}
-
-export type AggregateBalanceListResponsesSinglePage = SinglePage;
-
-/**
- * Card Aggregate Balance across all end-user accounts
- */
-export interface AggregateBalanceListResponse {
- /**
- * 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 card that had its balance updated most
- * recently
- */
- last_card_token: string;
-
- /**
- * Globally unique identifier for the last transaction event that impacted this
- * balance
- */
- last_transaction_event_token: string;
-
- /**
- * Globally unique identifier for the last 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;
-
- /**
- * Date and time for when the balance was last updated.
- */
- updated: string;
-}
-
-export interface AggregateBalanceListParams {
- /**
- * Cardholder to retrieve aggregate balances for.
- */
- account_token?: string;
-
- /**
- * Business to retrieve aggregate balances for.
- */
- business_account_token?: string;
-}
-
-export declare namespace AggregateBalances {
- export {
- type AggregateBalanceListResponse as AggregateBalanceListResponse,
- type AggregateBalanceListResponsesSinglePage as AggregateBalanceListResponsesSinglePage,
- type AggregateBalanceListParams as AggregateBalanceListParams,
- };
-}
diff --git a/src/resources/cards/cards.ts b/src/resources/cards/cards.ts
index 4eb4bdda..e121f9d2 100644
--- a/src/resources/cards/cards.ts
+++ b/src/resources/cards/cards.ts
@@ -2,13 +2,6 @@
import { APIResource } from '../../core/resource';
import * as Shared from '../shared';
-import * as AggregateBalancesAPI from './aggregate-balances';
-import {
- AggregateBalanceListParams,
- AggregateBalanceListResponse,
- AggregateBalanceListResponsesSinglePage,
- AggregateBalances,
-} from './aggregate-balances';
import * as BalancesAPI from './balances';
import { BalanceListParams, Balances } from './balances';
import * as FinancialTransactionsAPI from './financial-transactions';
@@ -25,9 +18,6 @@ import { path } from '../../internal/utils/path';
import { createHmac } from 'crypto';
export class Cards extends APIResource {
- aggregateBalances: AggregateBalancesAPI.AggregateBalances = new AggregateBalancesAPI.AggregateBalances(
- this._client,
- );
balances: BalancesAPI.Balances = new BalancesAPI.Balances(this._client);
financialTransactions: FinancialTransactionsAPI.FinancialTransactions =
new FinancialTransactionsAPI.FinancialTransactions(this._client);
@@ -392,7 +382,7 @@ export class Cards extends APIResource {
/**
* Allow your cardholders to directly add payment cards to the device's digital
- * wallet from a browser on the web. Currently only suported for Apple Pay.
+ * wallet from a browser on the web.
*
* This requires some additional setup and configuration. Please
* [Contact Us](https://lithic.com/contact) or your Customer Success representative
@@ -1523,7 +1513,6 @@ export interface CardWebProvisionParams {
server_session_id?: string;
}
-Cards.AggregateBalances = AggregateBalances;
Cards.Balances = Balances;
Cards.FinancialTransactions = FinancialTransactions;
@@ -1552,13 +1541,6 @@ export declare namespace Cards {
type CardWebProvisionParams as CardWebProvisionParams,
};
- export {
- AggregateBalances as AggregateBalances,
- type AggregateBalanceListResponse as AggregateBalanceListResponse,
- type AggregateBalanceListResponsesSinglePage as AggregateBalanceListResponsesSinglePage,
- type AggregateBalanceListParams as AggregateBalanceListParams,
- };
-
export { Balances as Balances, type BalanceListParams as BalanceListParams };
export {
diff --git a/src/resources/cards/index.ts b/src/resources/cards/index.ts
index 2ff2f8af..c857978c 100644
--- a/src/resources/cards/index.ts
+++ b/src/resources/cards/index.ts
@@ -1,11 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-export {
- AggregateBalances,
- type AggregateBalanceListResponse,
- type AggregateBalanceListParams,
- type AggregateBalanceListResponsesSinglePage,
-} from './aggregate-balances';
export { Balances, type BalanceListParams } from './balances';
export {
Cards,
diff --git a/src/resources/external-payments.ts b/src/resources/external-payments.ts
index 20c6aed7..c51ffd83 100644
--- a/src/resources/external-payments.ts
+++ b/src/resources/external-payments.ts
@@ -211,6 +211,10 @@ export interface ExternalPaymentCreateParams {
payment_type: 'DEPOSIT' | 'WITHDRAWAL';
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will
+ * become the transaction token.
+ */
token?: string;
memo?: string;
diff --git a/src/resources/financial-accounts/financial-accounts.ts b/src/resources/financial-accounts/financial-accounts.ts
index 7cf811c9..b7f1ef43 100644
--- a/src/resources/financial-accounts/financial-accounts.ts
+++ b/src/resources/financial-accounts/financial-accounts.ts
@@ -212,6 +212,17 @@ export interface FinancialAccount {
*/
status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING';
+ /**
+ * Substatus for the financial account
+ */
+ substatus:
+ | 'CHARGED_OFF_DELINQUENT'
+ | 'CHARGED_OFF_FRAUD'
+ | 'END_USER_REQUEST'
+ | 'BANK_REQUEST'
+ | 'DELINQUENT'
+ | null;
+
type:
| 'ISSUING'
| 'RESERVE'
@@ -226,20 +237,14 @@ export interface FinancialAccount {
updated: string;
+ /**
+ * User-defined status for the financial account
+ */
+ user_defined_status: string | null;
+
account_number?: string | null;
routing_number?: string | null;
-
- /**
- * Substatus for the financial account
- */
- substatus?:
- | 'CHARGED_OFF_DELINQUENT'
- | 'CHARGED_OFF_FRAUD'
- | 'END_USER_REQUEST'
- | 'BANK_REQUEST'
- | 'DELINQUENT'
- | null;
}
export namespace FinancialAccount {
@@ -527,6 +532,11 @@ export interface FinancialAccountUpdateStatusParams {
* Substatus for the financial account
*/
substatus: 'CHARGED_OFF_FRAUD' | 'END_USER_REQUEST' | 'BANK_REQUEST' | 'CHARGED_OFF_DELINQUENT' | null;
+
+ /**
+ * User-defined status for the financial account
+ */
+ user_defined_status?: string;
}
FinancialAccounts.Balances = Balances;
diff --git a/src/resources/financial-accounts/loan-tapes.ts b/src/resources/financial-accounts/loan-tapes.ts
index 7c94d2a9..a03e61cd 100644
--- a/src/resources/financial-accounts/loan-tapes.ts
+++ b/src/resources/financial-accounts/loan-tapes.ts
@@ -132,7 +132,7 @@ export interface LoanTape {
minimum_payment_balance: LoanTape.MinimumPaymentBalance;
- payment_allocation: CategoryBalances;
+ payment_allocation: LoanTape.PaymentAllocation;
period_totals: FinancialAccountsAPI.StatementTotals;
@@ -271,6 +271,29 @@ export namespace LoanTape {
remaining: number;
}
+ export interface PaymentAllocation {
+ fee_details: FinancialAccountsAPI.CategoryDetails | null;
+
+ /**
+ * Amount allocated to fees in cents
+ */
+ fees: number;
+
+ /**
+ * Amount allocated to interest in cents
+ */
+ interest: number;
+
+ interest_details: FinancialAccountsAPI.CategoryDetails | null;
+
+ /**
+ * Amount allocated to principal in cents
+ */
+ principal: number;
+
+ principal_details: FinancialAccountsAPI.CategoryDetails | null;
+ }
+
export interface PreviousStatementBalance {
amount: number;
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 416017d6..67bd1297 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -39,12 +39,6 @@ export {
type AccountListParams,
type AccountsCursorPage,
} from './accounts';
-export {
- AggregateBalances,
- type AggregateBalance,
- type AggregateBalanceListParams,
- type AggregateBalancesSinglePage,
-} from './aggregate-balances';
export { AuthRules } from './auth-rules/auth-rules';
export { AuthStreamEnrollment, type AuthStreamSecret } from './auth-stream-enrollment';
export { Balances, type Balance, type BalanceListParams, type BalancesSinglePage } from './balances';
@@ -53,6 +47,7 @@ export {
type BookTransferResponse,
type BookTransferCreateParams,
type BookTransferListParams,
+ type BookTransferRetryParams,
type BookTransferReverseParams,
type BookTransferResponsesCursorPage,
} from './book-transfers';
@@ -280,6 +275,12 @@ export {
type TransactionSimulateVoidParams,
type TransactionsCursorPage,
} from './transactions/transactions';
+export {
+ TransferLimits,
+ type TransferLimitsResponse,
+ type TransferLimitListParams,
+ type TransferLimitsResponseDataSinglePage,
+} from './transfer-limits';
export { Transfers, type Transfer, type TransferCreateParams } from './transfers';
export {
Webhooks,
@@ -287,7 +288,7 @@ export {
type AccountHolderUpdatedWebhookEvent,
type AccountHolderVerificationWebhookEvent,
type AccountHolderDocumentUpdatedWebhookEvent,
- type AsaRequestWebhookEvent,
+ type CardAuthorizationApprovalRequestWebhookEvent,
type TokenizationDecisioningRequestWebhookEvent,
type AuthRulesBacktestReportCreatedWebhookEvent,
type BalanceUpdatedWebhookEvent,
@@ -335,6 +336,7 @@ export {
type TokenizationTwoFactorAuthenticationCodeWebhookEvent,
type TokenizationTwoFactorAuthenticationCodeSentWebhookEvent,
type TokenizationUpdatedWebhookEvent,
+ type ThreeDSAuthenticationApprovalRequestWebhookEvent,
type DisputeTransactionCreatedWebhookEvent,
type DisputeTransactionUpdatedWebhookEvent,
type ParsedWebhookEvent,
diff --git a/src/resources/management-operations.ts b/src/resources/management-operations.ts
index a7f0e833..b4ee63b2 100644
--- a/src/resources/management-operations.ts
+++ b/src/resources/management-operations.ts
@@ -237,6 +237,10 @@ export interface ManagementOperationCreateParams {
financial_account_token: string;
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will
+ * become the transaction token.
+ */
token?: string;
memo?: string;
diff --git a/src/resources/payments.ts b/src/resources/payments.ts
index 4ab96af0..aba57c65 100644
--- a/src/resources/payments.ts
+++ b/src/resources/payments.ts
@@ -317,7 +317,8 @@ export interface Payment {
| 'WIRE_INBOUND_PAYMENT'
| 'WIRE_INBOUND_ADMIN'
| 'WIRE_OUTBOUND_PAYMENT'
- | 'WIRE_OUTBOUND_ADMIN';
+ | 'WIRE_OUTBOUND_ADMIN'
+ | 'WIRE_DRAWDOWN_REQUEST';
/**
* User-defined identifier
@@ -406,6 +407,11 @@ export namespace Payment {
| 'PROGRAM_DAILY_LIMIT_EXCEEDED'
| 'PROGRAM_MONTHLY_LIMIT_EXCEEDED'
>;
+
+ /**
+ * Payment event external ID, for example, ACH trace number.
+ */
+ external_id?: string | null;
}
export interface ACHMethodAttributes {
diff --git a/src/resources/transactions/transactions.ts b/src/resources/transactions/transactions.ts
index 39f025ea..88dcf933 100644
--- a/src/resources/transactions/transactions.ts
+++ b/src/resources/transactions/transactions.ts
@@ -677,6 +677,7 @@ export namespace Transaction {
| 'AUTH_RULE_ALLOWED_MCC'
| 'AUTH_RULE_BLOCKED_COUNTRY'
| 'AUTH_RULE_BLOCKED_MCC'
+ | 'AUTH_RULE'
| 'CARD_CLOSED'
| 'CARD_CRYPTOGRAM_VALIDATION_FAILURE'
| 'CARD_EXPIRED'
@@ -997,6 +998,7 @@ export namespace Transaction {
| 'AUTH_RULE_ALLOWED_MCC'
| 'AUTH_RULE_BLOCKED_COUNTRY'
| 'AUTH_RULE_BLOCKED_MCC'
+ | 'AUTH_RULE'
| 'CARD_CLOSED'
| 'CARD_CRYPTOGRAM_VALIDATION_FAILURE'
| 'CARD_EXPIRED'
diff --git a/src/resources/transfer-limits.ts b/src/resources/transfer-limits.ts
new file mode 100644
index 00000000..0dc70708
--- /dev/null
+++ b/src/resources/transfer-limits.ts
@@ -0,0 +1,226 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../core/resource';
+import { PagePromise, SinglePage } from '../core/pagination';
+import { RequestOptions } from '../internal/request-options';
+
+export class TransferLimits extends APIResource {
+ /**
+ * Get transfer limits for a specified date
+ */
+ list(
+ query: TransferLimitListParams | null | undefined = {},
+ options?: RequestOptions,
+ ): PagePromise {
+ return this._client.getAPIList('/v1/transfer_limits', SinglePage, {
+ query,
+ ...options,
+ });
+ }
+}
+
+export type TransferLimitsResponseDataSinglePage = SinglePage;
+
+export interface TransferLimitsResponse {
+ /**
+ * List of transfer limits
+ */
+ data: Array;
+
+ /**
+ * Whether there are more transfer limits
+ */
+ has_more: boolean;
+}
+
+export namespace TransferLimitsResponse {
+ export interface Data {
+ /**
+ * Company ID
+ */
+ company_id: string;
+
+ /**
+ * Daily limits with progress
+ */
+ daily_limit: Data.DailyLimit;
+
+ /**
+ * The date for the limit view (ISO format)
+ */
+ date: string;
+
+ /**
+ * Whether the company is a FBO; based on the company ID prefix
+ */
+ is_fbo: boolean;
+
+ /**
+ * Monthly limits with progress
+ */
+ monthly_limit: Data.MonthlyLimit;
+
+ /**
+ * Program transaction limits
+ */
+ program_limit_per_transaction: Data.ProgramLimitPerTransaction;
+ }
+
+ export namespace Data {
+ /**
+ * Daily limits with progress
+ */
+ export interface DailyLimit {
+ /**
+ * Credit limits
+ */
+ credit: DailyLimit.Credit;
+
+ /**
+ * Debit limits
+ */
+ debit: DailyLimit.Debit;
+ }
+
+ export namespace DailyLimit {
+ /**
+ * Credit limits
+ */
+ export interface Credit {
+ /**
+ * The limit amount
+ */
+ limit: number;
+
+ /**
+ * Amount originated towards limit
+ */
+ amount_originated?: number;
+ }
+
+ /**
+ * Debit limits
+ */
+ export interface Debit {
+ /**
+ * The limit amount
+ */
+ limit: number;
+
+ /**
+ * Amount originated towards limit
+ */
+ amount_originated?: number;
+ }
+ }
+
+ /**
+ * Monthly limits with progress
+ */
+ export interface MonthlyLimit {
+ /**
+ * Credit limits
+ */
+ credit: MonthlyLimit.Credit;
+
+ /**
+ * Debit limits
+ */
+ debit: MonthlyLimit.Debit;
+ }
+
+ export namespace MonthlyLimit {
+ /**
+ * Credit limits
+ */
+ export interface Credit {
+ /**
+ * The limit amount
+ */
+ limit: number;
+
+ /**
+ * Amount originated towards limit
+ */
+ amount_originated?: number;
+ }
+
+ /**
+ * Debit limits
+ */
+ export interface Debit {
+ /**
+ * The limit amount
+ */
+ limit: number;
+
+ /**
+ * Amount originated towards limit
+ */
+ amount_originated?: number;
+ }
+ }
+
+ /**
+ * Program transaction limits
+ */
+ export interface ProgramLimitPerTransaction {
+ /**
+ * Credit limits
+ */
+ credit: ProgramLimitPerTransaction.Credit;
+
+ /**
+ * Debit limits
+ */
+ debit: ProgramLimitPerTransaction.Debit;
+ }
+
+ export namespace ProgramLimitPerTransaction {
+ /**
+ * Credit limits
+ */
+ export interface Credit {
+ /**
+ * The limit amount
+ */
+ limit: number;
+
+ /**
+ * Amount originated towards limit
+ */
+ amount_originated?: number;
+ }
+
+ /**
+ * Debit limits
+ */
+ export interface Debit {
+ /**
+ * The limit amount
+ */
+ limit: number;
+
+ /**
+ * Amount originated towards limit
+ */
+ amount_originated?: number;
+ }
+ }
+ }
+}
+
+export interface TransferLimitListParams {
+ /**
+ * Date for which to retrieve transfer limits (ISO 8601 format)
+ */
+ date?: string;
+}
+
+export declare namespace TransferLimits {
+ export {
+ type TransferLimitsResponse as TransferLimitsResponse,
+ type TransferLimitsResponseDataSinglePage as TransferLimitsResponseDataSinglePage,
+ type TransferLimitListParams as TransferLimitListParams,
+ };
+}
diff --git a/src/resources/webhooks.ts b/src/resources/webhooks.ts
index 5c354bbc..7ced6edd 100644
--- a/src/resources/webhooks.ts
+++ b/src/resources/webhooks.ts
@@ -665,10 +665,7 @@ export namespace AccountHolderDocumentUpdatedWebhookEvent {
}
}
-/**
- * The Auth Stream Access request payload that was sent to the ASA responder.
- */
-export interface AsaRequestWebhookEvent {
+export interface CardAuthorizationApprovalRequestWebhookEvent {
/**
* The provisional transaction group uuid associated with the authorization
*/
@@ -694,12 +691,12 @@ export interface AsaRequestWebhookEvent {
*/
authorization_amount: number;
- avs: AsaRequestWebhookEvent.Avs;
+ avs: CardAuthorizationApprovalRequestWebhookEvent.Avs;
/**
* Card object in ASA
*/
- card: AsaRequestWebhookEvent.Card;
+ card: CardAuthorizationApprovalRequestWebhookEvent.Card;
/**
* 3-character alphabetic ISO 4217 code for cardholder's billing currency.
@@ -721,6 +718,8 @@ export interface AsaRequestWebhookEvent {
*/
created: string;
+ event_type: 'card_authorization.approval_request';
+
merchant: Shared.Merchant;
/**
@@ -788,13 +787,13 @@ export interface AsaRequestWebhookEvent {
* Optional Object containing information if the Card is a part of a Fleet managed
* program
*/
- fleet_info?: AsaRequestWebhookEvent.FleetInfo | null;
+ fleet_info?: CardAuthorizationApprovalRequestWebhookEvent.FleetInfo | null;
/**
* The latest Authorization Challenge that was issued to the cardholder for this
* merchant.
*/
- latest_challenge?: AsaRequestWebhookEvent.LatestChallenge;
+ latest_challenge?: CardAuthorizationApprovalRequestWebhookEvent.LatestChallenge;
/**
* Card network of the authorization.
@@ -818,9 +817,9 @@ export interface AsaRequestWebhookEvent {
* values and how to use them. This object is only available to certain programs-
* contact your Customer Success Manager to discuss enabling access.
*/
- network_specific_data?: AsaRequestWebhookEvent.NetworkSpecificData | null;
+ network_specific_data?: CardAuthorizationApprovalRequestWebhookEvent.NetworkSpecificData | null;
- pos?: AsaRequestWebhookEvent.Pos;
+ pos?: CardAuthorizationApprovalRequestWebhookEvent.Pos;
token_info?: TransactionsAPI.TokenInfo | null;
@@ -830,7 +829,7 @@ export interface AsaRequestWebhookEvent {
ttl?: string;
}
-export namespace AsaRequestWebhookEvent {
+export namespace CardAuthorizationApprovalRequestWebhookEvent {
export interface Avs {
/**
* Cardholder address
@@ -2249,6 +2248,13 @@ export interface TokenizationUpdatedWebhookEvent {
tokenization: TokenizationsAPI.Tokenization;
}
+/**
+ * Represents a 3DS authentication
+ */
+export interface ThreeDSAuthenticationApprovalRequestWebhookEvent extends ThreeDSAPI.ThreeDSAuthentication {
+ event_type: 'three_ds_authentication.approval_request';
+}
+
/**
* The Dispute object tracks the progression of a dispute throughout its lifecycle.
*/
@@ -2279,7 +2285,7 @@ export type ParsedWebhookEvent =
| ParsedWebhookEvent.LegacyPayload
| AccountHolderVerificationWebhookEvent
| AccountHolderDocumentUpdatedWebhookEvent
- | AsaRequestWebhookEvent
+ | CardAuthorizationApprovalRequestWebhookEvent
| TokenizationDecisioningRequestWebhookEvent
| AuthRulesBacktestReportCreatedWebhookEvent
| BalanceUpdatedWebhookEvent
@@ -2327,7 +2333,7 @@ export type ParsedWebhookEvent =
| TokenizationTwoFactorAuthenticationCodeWebhookEvent
| TokenizationTwoFactorAuthenticationCodeSentWebhookEvent
| TokenizationUpdatedWebhookEvent
- | ThreeDSAPI.ThreeDSAuthentication
+ | ThreeDSAuthenticationApprovalRequestWebhookEvent
| DisputeTransactionCreatedWebhookEvent
| DisputeTransactionUpdatedWebhookEvent;
@@ -2756,7 +2762,7 @@ export declare namespace Webhooks {
type AccountHolderUpdatedWebhookEvent as AccountHolderUpdatedWebhookEvent,
type AccountHolderVerificationWebhookEvent as AccountHolderVerificationWebhookEvent,
type AccountHolderDocumentUpdatedWebhookEvent as AccountHolderDocumentUpdatedWebhookEvent,
- type AsaRequestWebhookEvent as AsaRequestWebhookEvent,
+ type CardAuthorizationApprovalRequestWebhookEvent as CardAuthorizationApprovalRequestWebhookEvent,
type TokenizationDecisioningRequestWebhookEvent as TokenizationDecisioningRequestWebhookEvent,
type AuthRulesBacktestReportCreatedWebhookEvent as AuthRulesBacktestReportCreatedWebhookEvent,
type BalanceUpdatedWebhookEvent as BalanceUpdatedWebhookEvent,
@@ -2804,6 +2810,7 @@ export declare namespace Webhooks {
type TokenizationTwoFactorAuthenticationCodeWebhookEvent as TokenizationTwoFactorAuthenticationCodeWebhookEvent,
type TokenizationTwoFactorAuthenticationCodeSentWebhookEvent as TokenizationTwoFactorAuthenticationCodeSentWebhookEvent,
type TokenizationUpdatedWebhookEvent as TokenizationUpdatedWebhookEvent,
+ type ThreeDSAuthenticationApprovalRequestWebhookEvent as ThreeDSAuthenticationApprovalRequestWebhookEvent,
type DisputeTransactionCreatedWebhookEvent as DisputeTransactionCreatedWebhookEvent,
type DisputeTransactionUpdatedWebhookEvent as DisputeTransactionUpdatedWebhookEvent,
type ParsedWebhookEvent as ParsedWebhookEvent,
diff --git a/src/version.ts b/src/version.ts
index dc70112b..d6d8f1ad 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.126.0'; // x-release-please-version
+export const VERSION = '0.127.0'; // x-release-please-version
diff --git a/tests/api-resources/auth-rules/v2/v2.test.ts b/tests/api-resources/auth-rules/v2/v2.test.ts
index 3742e4e9..535f275f 100644
--- a/tests/api-resources/auth-rules/v2/v2.test.ts
+++ b/tests/api-resources/auth-rules/v2/v2.test.ts
@@ -10,7 +10,15 @@ const client = new Lithic({
describe('resource v2', () => {
test('create: only required params', async () => {
const responsePromise = client.authRules.v2.create({
- parameters: { conditions: [{ attribute: 'MCC', operation: 'IS_ONE_OF', value: 'string' }] },
+ parameters: {
+ conditions: [
+ {
+ attribute: 'MCC',
+ operation: 'IS_ONE_OF',
+ value: 'string',
+ },
+ ],
+ },
type: 'CONDITIONAL_BLOCK',
});
const rawResponse = await responsePromise.asResponse();
@@ -24,7 +32,15 @@ describe('resource v2', () => {
test('create: required and optional params', async () => {
const response = await client.authRules.v2.create({
- parameters: { conditions: [{ attribute: 'MCC', operation: 'IS_ONE_OF', value: 'string' }] },
+ parameters: {
+ conditions: [
+ {
+ attribute: 'MCC',
+ operation: 'IS_ONE_OF',
+ value: 'string',
+ },
+ ],
+ },
type: 'CONDITIONAL_BLOCK',
account_tokens: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
business_account_tokens: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
diff --git a/tests/api-resources/book-transfers.test.ts b/tests/api-resources/book-transfers.test.ts
index aae73ccc..2b9a0f5d 100644
--- a/tests/api-resources/book-transfers.test.ts
+++ b/tests/api-resources/book-transfers.test.ts
@@ -85,6 +85,25 @@ describe('resource bookTransfers', () => {
).rejects.toThrow(Lithic.NotFoundError);
});
+ test('retry: only required params', async () => {
+ const responsePromise = client.bookTransfers.retry('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
+ retry_token: '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('retry: required and optional params', async () => {
+ const response = await client.bookTransfers.retry('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
+ retry_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ });
+ });
+
test('reverse', async () => {
const responsePromise = client.bookTransfers.reverse('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {});
const rawResponse = await responsePromise.asResponse();
diff --git a/tests/api-resources/card-programs.test.ts b/tests/api-resources/card-programs.test.ts
index 85b9a3c7..0566e060 100644
--- a/tests/api-resources/card-programs.test.ts
+++ b/tests/api-resources/card-programs.test.ts
@@ -34,7 +34,11 @@ describe('resource cardPrograms', () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.cardPrograms.list(
- { ending_before: 'ending_before', page_size: 1, starting_after: 'starting_after' },
+ {
+ 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/aggregate-balances.test.ts b/tests/api-resources/cards/aggregate-balances.test.ts
deleted file mode 100644
index e911373e..00000000
--- a/tests/api-resources/cards/aggregate-balances.test.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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 aggregateBalances', () => {
- test('list', async () => {
- const responsePromise = client.cards.aggregateBalances.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.cards.aggregateBalances.list(
- { account_token: 'account_token', business_account_token: 'business_account_token' },
- { path: '/_stainless_unknown_path' },
- ),
- ).rejects.toThrow(Lithic.NotFoundError);
- });
-});
diff --git a/tests/api-resources/digital-card-art.test.ts b/tests/api-resources/digital-card-art.test.ts
index 9c6c2465..b557fbf9 100644
--- a/tests/api-resources/digital-card-art.test.ts
+++ b/tests/api-resources/digital-card-art.test.ts
@@ -34,7 +34,11 @@ describe('resource digitalCardArt', () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.digitalCardArt.list(
- { ending_before: 'ending_before', page_size: 1, starting_after: 'starting_after' },
+ {
+ 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/events/subscriptions.test.ts b/tests/api-resources/events/subscriptions.test.ts
index 15999197..3b8457b6 100644
--- a/tests/api-resources/events/subscriptions.test.ts
+++ b/tests/api-resources/events/subscriptions.test.ts
@@ -76,7 +76,11 @@ describe('resource subscriptions', () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.events.subscriptions.list(
- { ending_before: 'ending_before', page_size: 1, starting_after: 'starting_after' },
+ {
+ 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/external-bank-accounts/external-bank-accounts.test.ts b/tests/api-resources/external-bank-accounts/external-bank-accounts.test.ts
index 970bedc4..eb647c27 100644
--- a/tests/api-resources/external-bank-accounts/external-bank-accounts.test.ts
+++ b/tests/api-resources/external-bank-accounts/external-bank-accounts.test.ts
@@ -41,7 +41,14 @@ describe('resource externalBankAccounts', () => {
type: 'CHECKING',
verification_method: 'MANUAL',
account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
- address: { address1: 'x', city: 'x', country: 'USD', postal_code: '11201', state: 'xx', address2: 'x' },
+ address: {
+ address1: 'x',
+ city: 'x',
+ country: 'USD',
+ postal_code: '11201',
+ state: 'xx',
+ address2: 'x',
+ },
company_id: 'sq',
dob: '2019-12-27',
doing_business_as: 'x',
diff --git a/tests/api-resources/financial-accounts/financial-accounts.test.ts b/tests/api-resources/financial-accounts/financial-accounts.test.ts
index bd239951..4b13f9b8 100644
--- a/tests/api-resources/financial-accounts/financial-accounts.test.ts
+++ b/tests/api-resources/financial-accounts/financial-accounts.test.ts
@@ -126,6 +126,7 @@ describe('resource financialAccounts', () => {
const response = await client.financialAccounts.updateStatus('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
status: 'OPEN',
substatus: 'CHARGED_OFF_FRAUD',
+ user_defined_status: '26',
});
});
});
diff --git a/tests/api-resources/network-programs.test.ts b/tests/api-resources/network-programs.test.ts
index e01eccef..ad769dae 100644
--- a/tests/api-resources/network-programs.test.ts
+++ b/tests/api-resources/network-programs.test.ts
@@ -34,7 +34,11 @@ describe('resource networkPrograms', () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.networkPrograms.list(
- { begin: '2019-12-27T18:11:19.117Z', end: '2019-12-27T18:11:19.117Z', page_size: 1 },
+ {
+ begin: '2019-12-27T18:11:19.117Z',
+ end: '2019-12-27T18:11:19.117Z',
+ page_size: 1,
+ },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Lithic.NotFoundError);
diff --git a/tests/api-resources/payments.test.ts b/tests/api-resources/payments.test.ts
index 6591cc97..618780fa 100644
--- a/tests/api-resources/payments.test.ts
+++ b/tests/api-resources/payments.test.ts
@@ -32,7 +32,11 @@ 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', ach_hold__period: 0, addenda: 'addenda' },
+ method_attributes: {
+ sec_code: 'CCD',
+ ach_hold__period: 0,
+ addenda: 'addenda',
+ },
type: 'COLLECTION',
token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
memo: 'memo',
diff --git a/tests/api-resources/reports/settlement/settlement.test.ts b/tests/api-resources/reports/settlement/settlement.test.ts
index 9ccb6b7e..5ede8cfe 100644
--- a/tests/api-resources/reports/settlement/settlement.test.ts
+++ b/tests/api-resources/reports/settlement/settlement.test.ts
@@ -24,7 +24,11 @@ describe('resource settlement', () => {
await expect(
client.reports.settlement.listDetails(
'2023-09-01',
- { ending_before: 'ending_before', page_size: 1, starting_after: 'starting_after' },
+ {
+ 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/three-ds/authentication.test.ts b/tests/api-resources/three-ds/authentication.test.ts
index 7060179b..df57e75c 100644
--- a/tests/api-resources/three-ds/authentication.test.ts
+++ b/tests/api-resources/three-ds/authentication.test.ts
@@ -21,7 +21,12 @@ describe('resource authentication', () => {
test('simulate: only required params', async () => {
const responsePromise = client.threeDS.authentication.simulate({
- merchant: { id: 'OODKZAPJVN4YS7O', country: 'USA', mcc: '5812', name: 'COFFEE SHOP' },
+ merchant: {
+ id: 'OODKZAPJVN4YS7O',
+ country: 'USA',
+ mcc: '5812',
+ name: 'COFFEE SHOP',
+ },
pan: '4111111289144142',
transaction: { amount: 0, currency: 'GBP' },
});
@@ -36,7 +41,12 @@ describe('resource authentication', () => {
test('simulate: required and optional params', async () => {
const response = await client.threeDS.authentication.simulate({
- merchant: { id: 'OODKZAPJVN4YS7O', country: 'USA', mcc: '5812', name: 'COFFEE SHOP' },
+ merchant: {
+ id: 'OODKZAPJVN4YS7O',
+ country: 'USA',
+ mcc: '5812',
+ name: 'COFFEE SHOP',
+ },
pan: '4111111289144142',
transaction: { amount: 0, currency: 'GBP' },
card_expiry_check: 'MATCH',
diff --git a/tests/api-resources/aggregate-balances.test.ts b/tests/api-resources/transfer-limits.test.ts
similarity index 79%
rename from tests/api-resources/aggregate-balances.test.ts
rename to tests/api-resources/transfer-limits.test.ts
index 4e85cd6c..6c88b03d 100644
--- a/tests/api-resources/aggregate-balances.test.ts
+++ b/tests/api-resources/transfer-limits.test.ts
@@ -7,9 +7,9 @@ const client = new Lithic({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});
-describe('resource aggregateBalances', () => {
+describe('resource transferLimits', () => {
test('list', async () => {
- const responsePromise = client.aggregateBalances.list();
+ const responsePromise = client.transferLimits.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -22,10 +22,7 @@ describe('resource aggregateBalances', () => {
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.aggregateBalances.list(
- { financial_account_type: 'ISSUING' },
- { path: '/_stainless_unknown_path' },
- ),
+ client.transferLimits.list({ date: '2019-12-27' }, { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Lithic.NotFoundError);
});
});
diff --git a/tests/index.test.ts b/tests/index.test.ts
index 9b6b0536..730f5d04 100644
--- a/tests/index.test.ts
+++ b/tests/index.test.ts
@@ -87,7 +87,11 @@ describe('instantiate client', () => {
error: jest.fn(),
};
- const client = new Lithic({ logger: logger, logLevel: 'debug', apiKey: 'My Lithic API Key' });
+ const client = new Lithic({
+ logger: logger,
+ logLevel: 'debug',
+ apiKey: 'My Lithic API Key',
+ });
await forceAPIResponseForClient(client);
expect(debugMock).toHaveBeenCalled();
@@ -107,7 +111,11 @@ describe('instantiate client', () => {
error: jest.fn(),
};
- const client = new Lithic({ logger: logger, logLevel: 'info', apiKey: 'My Lithic API Key' });
+ const client = new Lithic({
+ logger: logger,
+ logLevel: 'info',
+ apiKey: 'My Lithic API Key',
+ });
await forceAPIResponseForClient(client);
expect(debugMock).not.toHaveBeenCalled();
@@ -157,7 +165,11 @@ describe('instantiate client', () => {
};
process.env['LITHIC_LOG'] = 'debug';
- const client = new Lithic({ logger: logger, logLevel: 'off', apiKey: 'My Lithic API Key' });
+ const client = new Lithic({
+ logger: logger,
+ logLevel: 'off',
+ apiKey: 'My Lithic API Key',
+ });
await forceAPIResponseForClient(client);
expect(debugMock).not.toHaveBeenCalled();
@@ -173,7 +185,11 @@ describe('instantiate client', () => {
};
process.env['LITHIC_LOG'] = 'not a log level';
- const client = new Lithic({ logger: logger, logLevel: 'debug', apiKey: 'My Lithic API Key' });
+ const client = new Lithic({
+ logger: logger,
+ logLevel: 'debug',
+ apiKey: 'My Lithic API Key',
+ });
expect(client.logLevel).toBe('debug');
expect(warnMock).not.toHaveBeenCalled();
});
@@ -330,7 +346,11 @@ describe('instantiate client', () => {
`"Ambiguous URL; The \`baseURL\` option (or LITHIC_BASE_URL env var) and the \`environment\` option are given. If you want to use the environment you must pass baseURL: null"`,
);
- const client = new Lithic({ apiKey: 'My Lithic API Key', baseURL: null, environment: 'production' });
+ const client = new Lithic({
+ apiKey: 'My Lithic API Key',
+ baseURL: null,
+ environment: 'production',
+ });
expect(client.baseURL).toEqual('https://api.lithic.com');
});
@@ -562,7 +582,11 @@ describe('retries', () => {
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
- const client = new Lithic({ apiKey: 'My Lithic API Key', timeout: 10, fetch: testFetch });
+ const client = new Lithic({
+ apiKey: 'My Lithic API Key',
+ timeout: 10,
+ fetch: testFetch,
+ });
expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 });
expect(count).toEqual(2);
@@ -592,7 +616,11 @@ describe('retries', () => {
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
- const client = new Lithic({ apiKey: 'My Lithic API Key', fetch: testFetch, maxRetries: 4 });
+ const client = new Lithic({
+ apiKey: 'My Lithic API Key',
+ fetch: testFetch,
+ maxRetries: 4,
+ });
expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 });
@@ -616,7 +644,11 @@ describe('retries', () => {
capturedRequest = init;
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
- const client = new Lithic({ apiKey: 'My Lithic API Key', fetch: testFetch, maxRetries: 4 });
+ const client = new Lithic({
+ apiKey: 'My Lithic API Key',
+ fetch: testFetch,
+ maxRetries: 4,
+ });
expect(
await client.request({
@@ -678,7 +710,11 @@ describe('retries', () => {
capturedRequest = init;
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
- const client = new Lithic({ apiKey: 'My Lithic API Key', fetch: testFetch, maxRetries: 4 });
+ const client = new Lithic({
+ apiKey: 'My Lithic API Key',
+ fetch: testFetch,
+ maxRetries: 4,
+ });
expect(
await client.request({