Skip to content
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ This release changes the pinned API version to 2026-05-27.private.
* Add support for new value `chaps` on enum `V2.FinancialAddressCreditSimulationCreditParams.network`
* Add support for error codes `payment_method_microdeposit_processing_error` and `siret_invalid` on `QuotePreviewInvoice.last_finalization_error`

## 22.2.3 - 2026-06-22
* [#2761](https://github.com/stripe/stripe-node/pull/2761) Encode URI path params in `accounts.retrieve`

## 22.2.2 - 2026-06-18
* [#2725](https://github.com/stripe/stripe-node/pull/2725) Fixes CJS type exports for stripe package (reported in [#2683](https://github.com/stripe/stripe-node/issues/2683))
* [#2758](https://github.com/stripe/stripe-node/pull/2758) Fix `Stripe.ErrorType.StripeError` incorrectly being usable as a runtime class (reported in [#2661](https://github.com/stripe/stripe-node/issues/2661))
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ prettier *args: install
prettier "{src,examples,scripts,test,types}/**/*.{ts,js}" {{ args }}

# ⭐ format all files
format: (prettier "--write --loglevel silent")
format: (prettier "--write --loglevel error")

# verify formatting of files (without changes)
format-check: (prettier "--check")
Expand Down
2 changes: 1 addition & 1 deletion src/resources/Accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class AccountResource extends StripeResource {
if (typeof id === 'string') {
return this._makeRequest(
'GET',
`/v1/accounts/${id}`,
`/v1/accounts/${encodeURIComponent(id)}`,
params,
options
) as any;
Expand Down
30 changes: 14 additions & 16 deletions src/resources/Apps/Secrets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,23 @@ export interface Secret {
*/
payload?: string | null;

scope: Apps.Secret.Scope;
scope: Secret.Scope;
}
export namespace Apps {
export namespace Secret {
export interface Scope {
/**
* The secret scope type.
*/
type: Scope.Type;
export namespace Secret {
export interface Scope {
/**
* The secret scope type.
*/
type: Scope.Type;

/**
* The user ID, if type is set to "user"
*/
user?: string;
}
/**
* The user ID, if type is set to "user"
*/
user?: string;
}

export namespace Scope {
export type Type = 'account' | 'user';
}
export namespace Scope {
export type Type = 'account' | 'user';
}
}
export namespace Apps {
Expand Down
58 changes: 28 additions & 30 deletions src/resources/Billing/Alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export interface Alert {
/**
* Status of the alert. This can be active, inactive or archived.
*/
status: Billing.Alert.Status | null;
status: Alert.Status | null;

/**
* Title of the alert.
Expand All @@ -127,43 +127,41 @@ export interface Alert {
/**
* Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://docs.stripe.com/api/billing/meter).
*/
usage_threshold: Billing.Alert.UsageThreshold | null;
usage_threshold: Alert.UsageThreshold | null;
}
export namespace Billing {
export namespace Alert {
export type Status = 'active' | 'archived' | 'inactive';
export namespace Alert {
export type Status = 'active' | 'archived' | 'inactive';

export interface UsageThreshold {
/**
* The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
*/
filters: Array<UsageThreshold.Filter> | null;
export interface UsageThreshold {
/**
* The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
*/
filters: Array<UsageThreshold.Filter> | null;

/**
* The value at which this alert will trigger.
*/
gte: number;
/**
* The value at which this alert will trigger.
*/
gte: number;

/**
* The [Billing Meter](https://docs.stripe.com/api/billing/meter) ID whose usage is monitored.
*/
meter: string | Meter;
/**
* The [Billing Meter](https://docs.stripe.com/api/billing/meter) ID whose usage is monitored.
*/
meter: string | Meter;

/**
* Defines how the alert will behave.
*/
recurrence: 'one_time';
}

export namespace UsageThreshold {
export interface Filter {
/**
* Defines how the alert will behave.
* Limit the scope of the alert to this customer ID
*/
recurrence: 'one_time';
}
customer: string | Customer | null;

export namespace UsageThreshold {
export interface Filter {
/**
* Limit the scope of the alert to this customer ID
*/
customer: string | Customer | null;

type: 'customer';
}
type: 'customer';
}
}
}
Expand Down
88 changes: 43 additions & 45 deletions src/resources/Billing/CreditBalanceSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface CreditBalanceSummary {
/**
* The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry.
*/
balances: Array<Billing.CreditBalanceSummary.Balance>;
balances: Array<CreditBalanceSummary.Balance>;

/**
* The customer the balance is for.
Expand All @@ -46,65 +46,63 @@ export interface CreditBalanceSummary {
*/
livemode: boolean;
}
export namespace Billing {
export namespace CreditBalanceSummary {
export interface Balance {
available_balance: Balance.AvailableBalance;
export namespace CreditBalanceSummary {
export interface Balance {
available_balance: Balance.AvailableBalance;

ledger_balance: Balance.LedgerBalance;
}

export namespace Balance {
export interface AvailableBalance {
/**
* The monetary amount.
*/
monetary: AvailableBalance.Monetary | null;

/**
* The type of this amount. We currently only support `monetary` billing credits.
*/
type: 'monetary';
}

export interface LedgerBalance {
/**
* The monetary amount.
*/
monetary: LedgerBalance.Monetary | null;

ledger_balance: Balance.LedgerBalance;
/**
* The type of this amount. We currently only support `monetary` billing credits.
*/
type: 'monetary';
}

export namespace Balance {
export interface AvailableBalance {
export namespace AvailableBalance {
export interface Monetary {
/**
* The monetary amount.
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
monetary: AvailableBalance.Monetary | null;
currency: string;

/**
* The type of this amount. We currently only support `monetary` billing credits.
* A positive integer representing the amount.
*/
type: 'monetary';
value: number;
}
}

export interface LedgerBalance {
export namespace LedgerBalance {
export interface Monetary {
/**
* The monetary amount.
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
monetary: LedgerBalance.Monetary | null;
currency: string;

/**
* The type of this amount. We currently only support `monetary` billing credits.
* A positive integer representing the amount.
*/
type: 'monetary';
}

export namespace AvailableBalance {
export interface Monetary {
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency: string;

/**
* A positive integer representing the amount.
*/
value: number;
}
}

export namespace LedgerBalance {
export interface Monetary {
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency: string;

/**
* A positive integer representing the amount.
*/
value: number;
}
value: number;
}
}
}
Expand Down
Loading
Loading