Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.127.0"
".": "0.128.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 176
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4ecc06edca2cfad4eaf11573611e89823fda5f56370bac5cd02a498a6b277d09.yml
openapi_spec_hash: 8f4a30bec4348cbde85b1e65bef9189a
config_hash: 9dddee5f7af579864599849cb28a0770
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6e80e52c9f20d95780f2cf4869f80ee2c4b270ff9470941dc057e79d15bda1a.yml
openapi_spec_hash: f2bb7084cd5225769302589cd1563241
config_hash: 31d71922d7838f34ae0875c9b8026d99
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## 0.128.0 (2026-01-16)

Full Changelog: [v0.127.0...v0.128.0](https://github.com/lithic-com/lithic-node/compare/v0.127.0...v0.128.0)

### Features

* **api:** Add idempotency key to cards POST and PATCH endpoints ([98afb05](https://github.com/lithic-com/lithic-node/commit/98afb051ae43204a74957b83edbc1b91bb89d6d1))
* **api:** make filter optional for Spend Velocity Auth Rules ([ef79410](https://github.com/lithic-com/lithic-node/commit/ef79410ccbc6a8c6409f80ec94704cd2fe138253))


### Bug Fixes

* **api:** Correct field name from ach_hold__period to ach_hold_period ([ead10f3](https://github.com/lithic-com/lithic-node/commit/ead10f32c6352afe9af48fb91d7573cd4f7ab00f))
* **api:** mark AppleWebPushProvisioningResponse fields required ([3bb4fc1](https://github.com/lithic-com/lithic-node/commit/3bb4fc1d5d202fb0b04da2fd3940a67578618580))
* **api:** rename WIRE_DRAWDOWN_REQUEST to WIRE_INBOUND_DRAWDOWN_REQUEST ([ef79410](https://github.com/lithic-com/lithic-node/commit/ef79410ccbc6a8c6409f80ec94704cd2fe138253))


### Chores

* configure new SDK language ([19ac828](https://github.com/lithic-com/lithic-node/commit/19ac828b81e7c57de8ccd7ead0839b0e47d909b9))
* fix typo in descriptions ([79ba3d6](https://github.com/lithic-com/lithic-node/commit/79ba3d6e33009523bb7cec77e96dca6ca94d3c7d))
* **internal:** codegen related update ([9468191](https://github.com/lithic-com/lithic-node/commit/94681910790a2cc3db84c31cb4dd4fe9f4e36cad))
* **internal:** configure MCP Server hosting ([4bda069](https://github.com/lithic-com/lithic-node/commit/4bda069ffdcb973684b39afa14aa4124eb9bf764))
* **internal:** upgrade babel, qs, js-yaml ([5940b21](https://github.com/lithic-com/lithic-node/commit/5940b21506bacce1935195f6752b4b5293803c4e))
* Rework event type generation to support spec splitting ([0466f6a](https://github.com/lithic-com/lithic-node/commit/0466f6abc05e245b96a3f7ea4e77917c0ceb2b0f))

## 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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lithic",
"version": "0.127.0",
"version": "0.128.0",
"description": "The official TypeScript library for the Lithic API",
"author": "Lithic <sdk-feedback@lithic.com>",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/resources/auth-rules/v2/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,6 @@ export namespace RuleStats {
}

export interface VelocityLimitParams {
filters: VelocityLimitParams.Filters;

/**
* Velocity over the current day since 00:00 / 12 AM in Eastern Time
*/
Expand All @@ -940,6 +938,8 @@ export interface VelocityLimitParams {
*/
scope: 'CARD' | 'ACCOUNT';

filters?: VelocityLimitParams.Filters;

/**
* The maximum amount of spend velocity allowed in the period in minor units (the
* smallest unit of a currency, e.g. cents for USD). Transactions exceeding this
Expand Down
114 changes: 67 additions & 47 deletions src/resources/cards/cards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,16 @@ export class Cards extends APIResource {
* });
* ```
*/
create(body: CardCreateParams, options?: RequestOptions): APIPromise<Card> {
return this._client.post('/v1/cards', { body, ...options });
create(params: CardCreateParams, options?: RequestOptions): APIPromise<Card> {
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
return this._client.post('/v1/cards', {
body,
...options,
headers: buildHeaders([
{ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
options?.headers,
]),
});
}

/**
Expand Down Expand Up @@ -784,12 +792,12 @@ export namespace CardWebProvisionResponse {
/**
* JWS object required for handoff to Apple's script.
*/
jws?: AppleWebPushProvisioningResponse.Jws;
jws: AppleWebPushProvisioningResponse.Jws;

/**
* A unique identifier for the JWS object.
*/
state?: string;
state: string;
}

export namespace AppleWebPushProvisioningResponse {
Expand Down Expand Up @@ -851,7 +859,7 @@ export namespace CardWebProvisionResponse {

export interface CardCreateParams {
/**
* Card types:
* Body param: Card types:
*
* - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital
* wallet like Apple Pay or Google Pay (if the card program is digital
Expand All @@ -871,95 +879,99 @@ export interface CardCreateParams {
type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET';

/**
* Globally unique identifier for the account that the card will be associated
* with. Required for programs enrolling users using the
* Body param: Globally unique identifier for the account that the card will be
* associated with. Required for programs enrolling users using the
* [/account_holders endpoint](https://docs.lithic.com/docs/account-holders-kyc).
* See [Managing Your Program](doc:managing-your-program) for more information.
*/
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
* Body param: 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
* the card. If omitted, will utilize the program's default `card_program_token`.
* In Sandbox, use 00000000-0000-0000-1000-000000000000 and
* Body param: 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 the card. If omitted, will utilize the program's default
* `card_program_token`. In Sandbox, use 00000000-0000-0000-1000-000000000000 and
* 00000000-0000-0000-2000-000000000000 to test creating cards on specific card
* programs.
*/
card_program_token?: string;

/**
* Body param
*/
carrier?: Shared.Carrier;

/**
* Specifies the digital card art to be displayed in the user’s digital wallet
* after tokenization. This artwork must be approved by Mastercard and configured
* by Lithic to use. See
* Body param: Specifies the digital card art to be displayed in the user’s digital
* wallet after tokenization. This artwork must be approved by Mastercard and
* configured by Lithic to use. See
* [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).
*/
digital_card_art_token?: string;

/**
* Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
* an expiration date will be generated.
* Body param: Two digit (MM) expiry month. If neither `exp_month` nor `exp_year`
* is provided, an expiration date will be generated.
*/
exp_month?: string;

/**
* Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
* provided, an expiration date will be generated.
* Body param: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year`
* is provided, an expiration date will be generated.
*/
exp_year?: string;

/**
* Friendly name to identify the card.
* Body param: Friendly name to identify the card.
*/
memo?: string;

/**
* Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` and
* `VIRTUAL`. See
* Body param: Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL`
* and `VIRTUAL`. See
* [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block).
*/
pin?: string;

/**
* Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic
* before use. Specifies the configuration (i.e., physical card art) that the card
* should be manufactured with.
* Body param: Only applicable to cards of type `PHYSICAL`. This must be configured
* with Lithic before use. Specifies the configuration (i.e., physical card art)
* that the card should be manufactured with.
*/
product_id?: string;

/**
* Restricted field limited to select use cases. Lithic will reach out directly if
* this field should be used. Globally unique identifier for the replacement card's
* account. If this field is specified, `replacement_for` must also be specified.
* If `replacement_for` is specified and this field is omitted, the replacement
* card's account will be inferred from the card being replaced.
* Body param: Restricted field limited to select use cases. Lithic will reach out
* directly if this field should be used. Globally unique identifier for the
* replacement card's account. If this field is specified, `replacement_for` must
* also be specified. If `replacement_for` is specified and this field is omitted,
* the replacement card's account will be inferred from the card being replaced.
*/
replacement_account_token?: string;

/**
* Additional context or information related to the card that this card will
* replace.
* Body param: Additional context or information related to the card that this card
* will replace.
*/
replacement_comment?: string;

/**
* Globally unique identifier for the card that this card will replace. If the card
* type is `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the card type is
* `VIRTUAL` it will be replaced by a `VIRTUAL` card.
* Body param: Globally unique identifier for the card that this card will replace.
* If the card type is `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the
* card type is `VIRTUAL` it will be replaced by a `VIRTUAL` card.
*/
replacement_for?: string;

/**
* Card state substatus values for the card that this card will replace:
* Body param: Card state substatus values for the card that this card will
* replace:
*
* - `LOST` - The physical card is no longer in the cardholder's possession due to
* being lost or never received by the cardholder.
Expand Down Expand Up @@ -1000,11 +1012,14 @@ export interface CardCreateParams {
| 'UNDELIVERABLE'
| 'OTHER';

/**
* Body param
*/
shipping_address?: Shared.ShippingAddress;

/**
* Shipping method for the card. Only applies to cards of type PHYSICAL. Use of
* options besides `STANDARD` require additional permissions.
* Body param: Shipping method for the card. Only applies to cards of type
* PHYSICAL. Use of options besides `STANDARD` require additional permissions.
*
* - `STANDARD` - USPS regular mail or similar international option, with no
* tracking
Expand All @@ -1029,16 +1044,16 @@ export interface CardCreateParams {
| 'STANDARD_WITH_TRACKING';

/**
* Amount (in cents) to limit approved authorizations (e.g. 100000 would be a
* $1,000 limit). Transaction requests above the spend limit will be declined. Note
* that a spend limit of 0 is effectively no limit, and should only be used to
* reset or remove a prior limit. Only a limit of 1 or above will result in
* declined transactions due to checks against the card limit.
* Body param: Amount (in cents) to limit approved authorizations (e.g. 100000
* would be a $1,000 limit). Transaction requests above the spend limit will be
* declined. Note that a spend limit of 0 is effectively no limit, and should only
* be used to reset or remove a prior limit. Only a limit of 1 or above will result
* in declined transactions due to checks against the card limit.
*/
spend_limit?: number;

/**
* Spend limit duration values:
* Body param: Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the
* trailing year.
Expand All @@ -1054,14 +1069,19 @@ export interface CardCreateParams {
spend_limit_duration?: SpendLimitDuration;

/**
* Card state values:
* Body param: Card state values:
*
* - `OPEN` - Card will approve authorizations (if they match card and account
* parameters).
* - `PAUSED` - Card will decline authorizations, but can be resumed at a later
* time.
*/
state?: 'OPEN' | 'PAUSED';

/**
* Header param: Idempotency key for the request
*/
'Idempotency-Key'?: string;
}

export interface CardUpdateParams {
Expand Down
10 changes: 5 additions & 5 deletions src/resources/financial-accounts/financial-accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,27 +472,27 @@ export interface StatementTotals {

export interface FinancialAccountCreateParams {
/**
* Body param:
* Body param
*/
nickname: string;

/**
* Body param:
* Body param
*/
type: 'OPERATING';

/**
* Body param:
* Body param
*/
account_token?: string;

/**
* Body param:
* Body param
*/
is_for_benefit_of?: boolean;

/**
* Header param:
* Header param: Idempotency key for the request
*/
'Idempotency-Key'?: string;
}
Expand Down
4 changes: 2 additions & 2 deletions src/resources/payments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export interface Payment {
| 'WIRE_INBOUND_ADMIN'
| 'WIRE_OUTBOUND_PAYMENT'
| 'WIRE_OUTBOUND_ADMIN'
| 'WIRE_DRAWDOWN_REQUEST';
| 'WIRE_INBOUND_DRAWDOWN_REQUEST';

/**
* User-defined identifier
Expand Down Expand Up @@ -618,7 +618,7 @@ export namespace PaymentCreateParams {
/**
* Number of days to hold the ACH payment
*/
ach_hold__period?: number;
ach_hold_period?: number;

addenda?: string | null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.127.0'; // x-release-please-version
export const VERSION = '0.128.0'; // x-release-please-version
1 change: 1 addition & 0 deletions tests/api-resources/cards/cards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ describe('resource cards', () => {
spend_limit: 1000,
spend_limit_duration: 'TRANSACTION',
state: 'OPEN',
'Idempotency-Key': '65a9dad4-1b60-4686-83fd-65b25078a4b4',
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('resource financialAccounts', () => {
type: 'OPERATING',
account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
is_for_benefit_of: true,
'Idempotency-Key': '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'Idempotency-Key': '65a9dad4-1b60-4686-83fd-65b25078a4b4',
});
});

Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/payments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('resource payments', () => {
method: 'ACH_NEXT_DAY',
method_attributes: {
sec_code: 'CCD',
ach_hold__period: 0,
ach_hold_period: 0,
addenda: 'addenda',
},
type: 'COLLECTION',
Expand Down
Loading