diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1373ea073f..849d00a97c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v569 \ No newline at end of file +v582 \ No newline at end of file diff --git a/src/resources.ts b/src/resources.ts index 150d4f1685..8301632651 100644 --- a/src/resources.ts +++ b/src/resources.ts @@ -49,6 +49,7 @@ import {Sessions as CheckoutSessions} from './resources/Checkout/Sessions.js'; import {Sessions as FinancialConnectionsSessions} from './resources/FinancialConnections/Sessions.js'; import {Settings as TaxSettings} from './resources/Tax/Settings.js'; import {TestClocks as TestHelpersTestClocks} from './resources/TestHelpers/TestClocks.js'; +import {Tokens as IssuingTokens} from './resources/Issuing/Tokens.js'; import {TransactionEntries as TreasuryTransactionEntries} from './resources/Treasury/TransactionEntries.js'; import {Transactions as TestHelpersIssuingTransactions} from './resources/TestHelpers/Issuing/Transactions.js'; import {Transactions as FinancialConnectionsTransactions} from './resources/FinancialConnections/Transactions.js'; @@ -146,6 +147,7 @@ export const Issuing = resourceNamespace('issuing', { Disputes: IssuingDisputes, PersonalizationDesigns: IssuingPersonalizationDesigns, PhysicalBundles: IssuingPhysicalBundles, + Tokens: IssuingTokens, Transactions: IssuingTransactions, }); export const Radar = resourceNamespace('radar', { diff --git a/src/resources/Issuing/Tokens.ts b/src/resources/Issuing/Tokens.ts new file mode 100644 index 0000000000..b5b3a1f5b8 --- /dev/null +++ b/src/resources/Issuing/Tokens.ts @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const Tokens = StripeResource.extend({ + retrieve: stripeMethod({ + method: 'GET', + fullPath: '/v1/issuing/tokens/{token}', + }), + update: stripeMethod({ + method: 'POST', + fullPath: '/v1/issuing/tokens/{token}', + }), + list: stripeMethod({ + method: 'GET', + fullPath: '/v1/issuing/tokens', + methodType: 'list', + }), +}); diff --git a/src/resources/Quotes.ts b/src/resources/Quotes.ts index 46c45ffeaf..d00baa71f5 100644 --- a/src/resources/Quotes.ts +++ b/src/resources/Quotes.ts @@ -13,10 +13,6 @@ export const Quotes = StripeResource.extend({ }), accept: stripeMethod({method: 'POST', fullPath: '/v1/quotes/{quote}/accept'}), cancel: stripeMethod({method: 'POST', fullPath: '/v1/quotes/{quote}/cancel'}), - draftQuote: stripeMethod({ - method: 'POST', - fullPath: '/v1/quotes/{quote}/mark_draft', - }), finalizeQuote: stripeMethod({ method: 'POST', fullPath: '/v1/quotes/{quote}/finalize', @@ -46,12 +42,16 @@ export const Quotes = StripeResource.extend({ fullPath: '/v1/quotes/{quote}/preview_invoices', methodType: 'list', }), - listPreviewSchedules: stripeMethod({ + listPreviewSubscriptionSchedules: stripeMethod({ method: 'GET', fullPath: '/v1/quotes/{quote}/preview_subscription_schedules', methodType: 'list', }), - markStaleQuote: stripeMethod({ + markDraft: stripeMethod({ + method: 'POST', + fullPath: '/v1/quotes/{quote}/mark_draft', + }), + markStale: stripeMethod({ method: 'POST', fullPath: '/v1/quotes/{quote}/mark_stale', }), diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index f185976c23..f55c16c4ff 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -2948,6 +2948,9 @@ declare module 'stripe' { */ expand?: Array; + /** + * Filter external accounts according to a particular object type. + */ object?: ExternalAccountListParams.Object; } diff --git a/types/BalanceTransactions.d.ts b/types/BalanceTransactions.d.ts index cbf81f972e..edada2d95b 100644 --- a/types/BalanceTransactions.d.ts +++ b/types/BalanceTransactions.d.ts @@ -20,7 +20,7 @@ declare module 'stripe' { object: 'balance_transaction'; /** - * Gross amount of the transaction (in cents (or local equivalent)). + * Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. */ amount: number; @@ -50,7 +50,7 @@ declare module 'stripe' { exchange_rate: number | null; /** - * Fees (in cents (or local equivalent)) paid for this transaction. + * Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. */ fee: number; @@ -60,7 +60,7 @@ declare module 'stripe' { fee_details: Array; /** - * Net amount of the transaction (in cents (or local equivalent)). + * Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` */ net: number; diff --git a/types/Charges.d.ts b/types/Charges.d.ts index 09046a4622..9778cfd0fa 100644 --- a/types/Charges.d.ts +++ b/types/Charges.d.ts @@ -676,6 +676,11 @@ declare module 'stripe' { } interface Card { + /** + * The authorized amount. + */ + amount_authorized?: number | null; + /** * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ @@ -706,6 +711,8 @@ declare module 'stripe' { */ exp_year: number; + extended_authorization?: Card.ExtendedAuthorization; + /** * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. * @@ -723,6 +730,8 @@ declare module 'stripe' { */ iin?: string | null; + incremental_authorization?: Card.IncrementalAuthorization; + /** * Installment details for this payment (Mexico only). * @@ -750,6 +759,8 @@ declare module 'stripe' { */ moto?: boolean | null; + multicapture?: Card.Multicapture; + /** * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ @@ -760,6 +771,8 @@ declare module 'stripe' { */ network_token?: Card.NetworkToken | null; + overcapture?: Card.Overcapture; + /** * Populated if this transaction used 3D Secure authentication. */ @@ -789,6 +802,28 @@ declare module 'stripe' { cvc_check: string | null; } + interface ExtendedAuthorization { + /** + * Indicates whether or not the capture window is extended beyond the standard authorization. + */ + status: ExtendedAuthorization.Status; + } + + namespace ExtendedAuthorization { + type Status = 'disabled' | 'enabled'; + } + + interface IncrementalAuthorization { + /** + * Indicates whether or not the incremental authorization feature is supported. + */ + status: IncrementalAuthorization.Status; + } + + namespace IncrementalAuthorization { + type Status = 'available' | 'unavailable'; + } + interface Installments { /** * Installment plan selected for the payment. @@ -816,6 +851,17 @@ declare module 'stripe' { } } + interface Multicapture { + /** + * Indicates whether or not multiple captures are supported. + */ + status: Multicapture.Status; + } + + namespace Multicapture { + type Status = 'available' | 'unavailable'; + } + interface NetworkToken { /** * Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. @@ -823,6 +869,22 @@ declare module 'stripe' { used: boolean; } + interface Overcapture { + /** + * The maximum amount that can be captured. + */ + maximum_amount_capturable: number; + + /** + * Indicates whether or not the authorized amount can be over-captured. + */ + status: Overcapture.Status; + } + + namespace Overcapture { + type Status = 'available' | 'unavailable'; + } + interface ThreeDSecure { /** * For authenticated transactions: how the customer was authenticated by diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index ea9425257e..97a32096b6 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -316,6 +316,11 @@ declare module 'stripe' { */ enabled: boolean; + /** + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + */ + liability?: AutomaticTax.Liability | null; + /** * The status of the most recent automated tax calculation for this session. */ @@ -323,6 +328,22 @@ declare module 'stripe' { } namespace AutomaticTax { + interface Liability { + /** + * The connected account being referenced when `type` is `account`. + */ + account: string | Stripe.Account | null; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } + type Status = 'complete' | 'failed' | 'requires_location_inputs'; } @@ -692,6 +713,11 @@ declare module 'stripe' { */ footer: string | null; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceData.Issuer | null; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -716,6 +742,22 @@ declare module 'stripe' { value: string; } + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account: string | Stripe.Account | null; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index a724bf1445..f354954a3c 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -261,6 +261,29 @@ declare module 'stripe' { * Set to true to enable automatic taxes. */ enabled: boolean; + + /** + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + */ + liability?: AutomaticTax.Liability; + } + + namespace AutomaticTax { + interface Liability { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string; + + /** + * Type of the account referenced in the request. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } } type BillingAddressCollection = 'auto' | 'required'; @@ -501,6 +524,11 @@ declare module 'stripe' { */ footer?: string; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceData.Issuer; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -525,6 +553,22 @@ declare module 'stripe' { value: string; } + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string; + + /** + * Type of the account referenced in the request. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. @@ -2071,6 +2115,11 @@ declare module 'stripe' { */ description?: string; + /** + * All invoices will be billed using the specified settings. + */ + invoice_settings?: SubscriptionData.InvoiceSettings; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -2111,6 +2160,31 @@ declare module 'stripe' { } namespace SubscriptionData { + interface InvoiceSettings { + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceSettings.Issuer; + } + + namespace InvoiceSettings { + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string; + + /** + * Type of the account referenced in the request. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + } + type ProrationBehavior = 'create_prorations' | 'none'; interface TransferData { diff --git a/types/FinancialConnections/InferredBalances.d.ts b/types/FinancialConnections/AccountInferredBalances.d.ts similarity index 97% rename from types/FinancialConnections/InferredBalances.d.ts rename to types/FinancialConnections/AccountInferredBalances.d.ts index 64d813224c..807caa40b7 100644 --- a/types/FinancialConnections/InferredBalances.d.ts +++ b/types/FinancialConnections/AccountInferredBalances.d.ts @@ -6,7 +6,7 @@ declare module 'stripe' { /** * A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data. */ - interface InferredBalance { + interface AccountInferredBalance { /** * Unique identifier for the object. */ diff --git a/types/FinancialConnections/AccountsResource.d.ts b/types/FinancialConnections/AccountsResource.d.ts index 12d005b450..a094fc9c7f 100644 --- a/types/FinancialConnections/AccountsResource.d.ts +++ b/types/FinancialConnections/AccountsResource.d.ts @@ -60,7 +60,7 @@ declare module 'stripe' { expand?: Array; } - interface InferredBalanceListParams extends PaginationParams { + interface AccountInferredBalanceListParams extends PaginationParams { /** * Specifies which fields in the response should be expanded. */ @@ -171,13 +171,13 @@ declare module 'stripe' { */ listInferredBalances( id: string, - params?: InferredBalanceListParams, + params?: AccountInferredBalanceListParams, options?: RequestOptions - ): ApiListPromise; + ): ApiListPromise; listInferredBalances( id: string, options?: RequestOptions - ): ApiListPromise; + ): ApiListPromise; /** * Refreshes the data associated with a Financial Connections Account. diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index 6c35fe58a9..3303140edf 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -729,25 +729,24 @@ declare module 'stripe' { /** * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. * - * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. - * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. - * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides * you through the setup process. * * Successful SetupIntents result in payment credentials that are optimized for future payments. - * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through - * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection - * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). - * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, - * it will automatically attach the resulting payment method to that Customer. + * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) during payment method collection + * to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). + * If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + * it automatically attaches the resulting payment method to that Customer after successful setup. * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. * - * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, - * even as regulations change over time. + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. * * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents) */ diff --git a/types/Issuing/Authorizations.d.ts b/types/Issuing/Authorizations.d.ts index e06279e15f..0ea34697cc 100644 --- a/types/Issuing/Authorizations.d.ts +++ b/types/Issuing/Authorizations.d.ts @@ -108,6 +108,11 @@ declare module 'stripe' { */ status: Authorization.Status; + /** + * [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. + */ + token?: string | Stripe.Issuing.Token | null; + /** * List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ @@ -267,6 +272,11 @@ declare module 'stripe' { */ approved: boolean; + /** + * A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + */ + authorization_code: string | null; + /** * Time at which the object was created. Measured in seconds since the Unix epoch. */ diff --git a/types/Issuing/CardsResource.d.ts b/types/Issuing/CardsResource.d.ts index 7568a868ec..4955bb59a4 100644 --- a/types/Issuing/CardsResource.d.ts +++ b/types/Issuing/CardsResource.d.ts @@ -2236,6 +2236,8 @@ declare module 'stripe' { */ last4?: string; + personalization_design?: string; + /** * Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. */ diff --git a/types/Issuing/Tokens.d.ts b/types/Issuing/Tokens.d.ts new file mode 100644 index 0000000000..1fca8e09a9 --- /dev/null +++ b/types/Issuing/Tokens.d.ts @@ -0,0 +1,273 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Issuing { + /** + * An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can view and manage these tokens through Stripe. + */ + interface Token { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'issuing.token'; + + /** + * Card associated with this token. + */ + card: string | Stripe.Issuing.Card; + + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + + /** + * The hashed ID derived from the device ID from the card network associated with the token + */ + device_fingerprint: string | null; + + /** + * The last four digits of the token. + */ + last4?: string; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * The token service provider / card network associated with the token. + */ + network: Token.Network; + + network_data?: Token.NetworkData; + + /** + * Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. + */ + network_updated_at: number; + + /** + * The usage state of the token. + */ + status: Token.Status; + + /** + * The digital wallet for this token, if one was used. + */ + wallet_provider?: Token.WalletProvider; + } + + namespace Token { + type Network = 'mastercard' | 'visa'; + + interface NetworkData { + device?: NetworkData.Device; + + mastercard?: NetworkData.Mastercard; + + /** + * The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. + */ + type: NetworkData.Type; + + visa?: NetworkData.Visa; + + wallet_provider?: NetworkData.WalletProvider; + } + + namespace NetworkData { + interface Device { + /** + * An obfuscated ID derived from the device ID. + */ + device_fingerprint?: string; + + /** + * The IP address of the device at provisioning time. + */ + ip_address?: string; + + /** + * The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. + */ + location?: string; + + /** + * The name of the device used for tokenization. + */ + name?: string; + + /** + * The phone number of the device used for tokenization. + */ + phone_number?: string; + + /** + * The type of device used for tokenization. + */ + type?: Device.Type; + } + + namespace Device { + type Type = 'other' | 'phone' | 'watch'; + } + + interface Mastercard { + /** + * A unique reference ID from MasterCard to represent the card account number. + */ + card_reference_id?: string; + + /** + * The network-unique identifier for the token. + */ + token_reference_id: string; + + /** + * The ID of the entity requesting tokenization, specific to MasterCard. + */ + token_requestor_id: string; + + /** + * The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. + */ + token_requestor_name?: string; + } + + type Type = 'mastercard' | 'visa'; + + interface Visa { + /** + * A unique reference ID from Visa to represent the card account number. + */ + card_reference_id: string; + + /** + * The network-unique identifier for the token. + */ + token_reference_id: string; + + /** + * The ID of the entity requesting tokenization, specific to Visa. + */ + token_requestor_id: string; + + /** + * Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. + */ + token_risk_score?: string; + } + + interface WalletProvider { + /** + * The wallet provider-given account ID of the digital wallet the token belongs to. + */ + account_id?: string; + + /** + * An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. + */ + account_trust_score?: number; + + /** + * The method used for tokenizing a card. + */ + card_number_source?: WalletProvider.CardNumberSource; + + cardholder_address?: WalletProvider.CardholderAddress; + + /** + * The name of the cardholder tokenizing the card. + */ + cardholder_name?: string; + + /** + * An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. + */ + device_trust_score?: number; + + /** + * The hashed email address of the cardholder's account with the wallet provider. + */ + hashed_account_email_address?: string; + + /** + * The reasons for suggested tokenization given by the card network. + */ + reason_codes?: Array; + + /** + * The recommendation on responding to the tokenization request. + */ + suggested_decision?: WalletProvider.SuggestedDecision; + + /** + * The version of the standard for mapping reason codes followed by the wallet provider. + */ + suggested_decision_version?: string; + } + + namespace WalletProvider { + interface CardholderAddress { + /** + * The street address of the cardholder tokenizing the card. + */ + line1: string; + + /** + * The postal code of the cardholder tokenizing the card. + */ + postal_code: string; + } + + type CardNumberSource = 'app' | 'manual' | 'on_file' | 'other'; + + type ReasonCode = + | 'account_card_too_new' + | 'account_recently_changed' + | 'account_too_new' + | 'account_too_new_since_launch' + | 'additional_device' + | 'data_expired' + | 'defer_id_v_decision' + | 'device_recently_lost' + | 'good_activity_history' + | 'has_suspended_tokens' + | 'high_risk' + | 'inactive_account' + | 'long_account_tenure' + | 'low_account_score' + | 'low_device_score' + | 'low_phone_number_score' + | 'network_service_error' + | 'outside_home_territory' + | 'provisioning_cardholder_mismatch' + | 'provisioning_device_and_cardholder_mismatch' + | 'provisioning_device_mismatch' + | 'same_device_no_prior_authentication' + | 'same_device_successful_prior_authentication' + | 'software_update' + | 'suspicious_activity' + | 'too_many_different_cardholders' + | 'too_many_recent_attempts' + | 'too_many_recent_tokens'; + + type SuggestedDecision = 'approve' | 'decline' | 'require_auth'; + } + } + + type Status = 'active' | 'deleted' | 'requested' | 'suspended'; + + type WalletProvider = 'apple_pay' | 'google_pay' | 'samsung_pay'; + } + } + } +} diff --git a/types/Issuing/TokensResource.d.ts b/types/Issuing/TokensResource.d.ts new file mode 100644 index 0000000000..374aaccafc --- /dev/null +++ b/types/Issuing/TokensResource.d.ts @@ -0,0 +1,88 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Issuing { + interface TokenRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface TokenUpdateParams { + /** + * Specifies which status the token should be updated to. + */ + status: TokenUpdateParams.Status; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + namespace TokenUpdateParams { + type Status = 'active' | 'deleted' | 'suspended'; + } + + interface TokenListParams extends PaginationParams { + /** + * The Issuing card identifier to list tokens for. + */ + card: string; + + /** + * Select Issuing tokens that were created during the given date interval. + */ + created?: Stripe.RangeQueryParam | number; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Select Issuing tokens with the given status. + */ + status?: TokenListParams.Status; + } + + namespace TokenListParams { + type Status = 'active' | 'deleted' | 'requested' | 'suspended'; + } + + class TokensResource { + /** + * Retrieves an Issuing Token object. + */ + retrieve( + id: string, + params?: TokenRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Attempts to update the specified Issuing Token object to the status specified. + */ + update( + id: string, + params: TokenUpdateParams, + options?: RequestOptions + ): Promise>; + + /** + * Lists all Issuing Token objects for a given card. + */ + list( + params: TokenListParams, + options?: RequestOptions + ): ApiListPromise; + } + } + } +} diff --git a/types/Issuing/Transactions.d.ts b/types/Issuing/Transactions.d.ts index 7db24923ab..6bcc990a44 100644 --- a/types/Issuing/Transactions.d.ts +++ b/types/Issuing/Transactions.d.ts @@ -98,6 +98,11 @@ declare module 'stripe' { */ purchase_details: Transaction.PurchaseDetails | null; + /** + * [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. + */ + token?: string | Stripe.Issuing.Token | null; + /** * [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index 20f0b30f60..85fdae6193 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -347,25 +347,24 @@ declare module 'stripe' { /** * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. * - * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. - * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. - * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides * you through the setup process. * * Successful SetupIntents result in payment credentials that are optimized for future payments. - * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through - * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection - * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). - * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, - * it will automatically attach the resulting payment method to that Customer. + * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) during payment method collection + * to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). + * If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + * it automatically attaches the resulting payment method to that Customer after successful setup. * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. * - * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, - * even as regulations change over time. + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. * * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents) */ @@ -1525,6 +1524,26 @@ declare module 'stripe' { */ network: Card.Network | null; + /** + * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + */ + request_extended_authorization?: Card.RequestExtendedAuthorization; + + /** + * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ + request_incremental_authorization?: Card.RequestIncrementalAuthorization; + + /** + * Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + */ + request_multicapture?: Card.RequestMulticapture; + + /** + * Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + */ + request_overcapture?: Card.RequestOvercapture; + /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. */ @@ -1674,6 +1693,14 @@ declare module 'stripe' { | 'unknown' | 'visa'; + type RequestExtendedAuthorization = 'if_available' | 'never'; + + type RequestIncrementalAuthorization = 'if_available' | 'never'; + + type RequestMulticapture = 'if_available' | 'never'; + + type RequestOvercapture = 'if_available' | 'never'; + type RequestThreeDSecure = 'any' | 'automatic' | 'challenge_only'; type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index 089bb4d867..55e233d02b 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -1518,6 +1518,26 @@ declare module 'stripe' { */ network?: Card.Network; + /** + * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + */ + request_extended_authorization?: Card.RequestExtendedAuthorization; + + /** + * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ + request_incremental_authorization?: Card.RequestIncrementalAuthorization; + + /** + * Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + */ + request_multicapture?: Card.RequestMulticapture; + + /** + * Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + */ + request_overcapture?: Card.RequestOvercapture; + /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. */ @@ -1652,6 +1672,14 @@ declare module 'stripe' { | 'unknown' | 'visa'; + type RequestExtendedAuthorization = 'if_available' | 'never'; + + type RequestIncrementalAuthorization = 'if_available' | 'never'; + + type RequestMulticapture = 'if_available' | 'never'; + + type RequestOvercapture = 'if_available' | 'never'; + type RequestThreeDSecure = 'any' | 'automatic'; type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; @@ -1675,12 +1703,21 @@ declare module 'stripe' { */ request_extended_authorization?: boolean; + /** + * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ + request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; + /** * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; } + namespace CardPresent { + type RequestIncrementalAuthorization = 'if_available' | 'never'; + } + interface Cashapp { /** * Controls when the funds will be captured from the customer's account. @@ -3829,6 +3866,26 @@ declare module 'stripe' { */ network?: Card.Network; + /** + * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + */ + request_extended_authorization?: Card.RequestExtendedAuthorization; + + /** + * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ + request_incremental_authorization?: Card.RequestIncrementalAuthorization; + + /** + * Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + */ + request_multicapture?: Card.RequestMulticapture; + + /** + * Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + */ + request_overcapture?: Card.RequestOvercapture; + /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. */ @@ -3963,6 +4020,14 @@ declare module 'stripe' { | 'unknown' | 'visa'; + type RequestExtendedAuthorization = 'if_available' | 'never'; + + type RequestIncrementalAuthorization = 'if_available' | 'never'; + + type RequestMulticapture = 'if_available' | 'never'; + + type RequestOvercapture = 'if_available' | 'never'; + type RequestThreeDSecure = 'any' | 'automatic'; type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; @@ -3986,12 +4051,21 @@ declare module 'stripe' { */ request_extended_authorization?: boolean; + /** + * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ + request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; + /** * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; } + namespace CardPresent { + type RequestIncrementalAuthorization = 'if_available' | 'never'; + } + interface Cashapp { /** * Controls when the funds will be captured from the customer's account. @@ -4757,6 +4831,11 @@ declare module 'stripe' { */ expand?: Array; + /** + * Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. + */ + final_capture?: boolean; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -6535,6 +6614,26 @@ declare module 'stripe' { */ network?: Card.Network; + /** + * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + */ + request_extended_authorization?: Card.RequestExtendedAuthorization; + + /** + * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ + request_incremental_authorization?: Card.RequestIncrementalAuthorization; + + /** + * Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + */ + request_multicapture?: Card.RequestMulticapture; + + /** + * Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + */ + request_overcapture?: Card.RequestOvercapture; + /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. */ @@ -6669,6 +6768,14 @@ declare module 'stripe' { | 'unknown' | 'visa'; + type RequestExtendedAuthorization = 'if_available' | 'never'; + + type RequestIncrementalAuthorization = 'if_available' | 'never'; + + type RequestMulticapture = 'if_available' | 'never'; + + type RequestOvercapture = 'if_available' | 'never'; + type RequestThreeDSecure = 'any' | 'automatic'; type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; @@ -6692,12 +6799,21 @@ declare module 'stripe' { */ request_extended_authorization?: boolean; + /** + * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ + request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; + /** * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; } + namespace CardPresent { + type RequestIncrementalAuthorization = 'if_available' | 'never'; + } + interface Cashapp { /** * Controls when the funds will be captured from the customer's account. diff --git a/types/PaymentLinks.d.ts b/types/PaymentLinks.d.ts index 10630e3a14..8cafc46961 100644 --- a/types/PaymentLinks.d.ts +++ b/types/PaymentLinks.d.ts @@ -424,10 +424,25 @@ declare module 'stripe' { */ capture_method: PaymentIntentData.CaptureMethod | null; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents] (/docs/api/payment_intents) generated from this payment link. + */ + metadata: Stripe.Metadata; + /** * Indicates that you intend to make future payments with the payment method collected during checkout. */ setup_future_usage: PaymentIntentData.SetupFutureUsage | null; + + /** + * Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. + */ + statement_descriptor: string | null; + + /** + * Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + */ + statement_descriptor_suffix: string | null; } namespace PaymentIntentData { @@ -743,6 +758,11 @@ declare module 'stripe' { */ description: string | null; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions] (/docs/api/subscriptions) generated from this payment link. + */ + metadata: Stripe.Metadata; + /** * Integer representing the number of trial period days before the customer is charged for the first time. */ diff --git a/types/PaymentLinksResource.d.ts b/types/PaymentLinksResource.d.ts index c6eafdaded..c6b953db34 100644 --- a/types/PaymentLinksResource.d.ts +++ b/types/PaymentLinksResource.d.ts @@ -463,6 +463,11 @@ declare module 'stripe' { */ capture_method?: PaymentIntentData.CaptureMethod; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents] (/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + */ + metadata?: Stripe.MetadataParam; + /** * Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. * @@ -477,6 +482,16 @@ declare module 'stripe' { * When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. */ setup_future_usage?: PaymentIntentData.SetupFutureUsage; + + /** + * Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. + */ + statement_descriptor?: string; + + /** + * Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + */ + statement_descriptor_suffix?: string; } namespace PaymentIntentData { @@ -788,6 +803,11 @@ declare module 'stripe' { */ description?: string; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions] (/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + */ + metadata?: Stripe.MetadataParam; + /** * Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. */ @@ -887,6 +907,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + payment_intent_data?: PaymentLinkUpdateParams.PaymentIntentData; + /** * Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. * @@ -909,6 +934,11 @@ declare module 'stripe' { shipping_address_collection?: Stripe.Emptyable< PaymentLinkUpdateParams.ShippingAddressCollection >; + + /** + * When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ + subscription_data?: PaymentLinkUpdateParams.SubscriptionData; } namespace PaymentLinkUpdateParams { @@ -1207,6 +1237,23 @@ declare module 'stripe' { } } + interface PaymentIntentData { + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents] (/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + */ + metadata?: Stripe.Emptyable; + + /** + * Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. + */ + statement_descriptor?: Stripe.Emptyable; + + /** + * Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + */ + statement_descriptor_suffix?: Stripe.Emptyable; + } + type PaymentMethodCollection = 'always' | 'if_required'; type PaymentMethodType = @@ -1487,6 +1534,13 @@ declare module 'stripe' { | 'ZW' | 'ZZ'; } + + interface SubscriptionData { + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions] (/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + */ + metadata?: Stripe.Emptyable; + } } interface PaymentLinkListParams extends PaginationParams { diff --git a/types/PaymentMethodConfigurations.d.ts b/types/PaymentMethodConfigurations.d.ts index da32e6e1a4..db8e9b29ab 100644 --- a/types/PaymentMethodConfigurations.d.ts +++ b/types/PaymentMethodConfigurations.d.ts @@ -3,7 +3,20 @@ declare module 'stripe' { namespace Stripe { /** - * An object detailing payment method configurations. + * PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios. + * + * There are two types of PaymentMethodConfigurations. Which is used depends on the [charge type](https://stripe.com/docs/connect/charges): + * + * **Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect. + * + * **Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter. + * + * Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account's associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API. + * + * Related guides: + * - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) + * - [Multiple payment method configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs) + * - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations) */ interface PaymentMethodConfiguration { /** @@ -32,7 +45,7 @@ declare module 'stripe' { apple_pay?: PaymentMethodConfiguration.ApplePay; /** - * The Connect application associated with this configuration. + * For child configs, the Connect application associated with the configuration. */ application: string | null; @@ -67,7 +80,7 @@ declare module 'stripe' { ideal?: PaymentMethodConfiguration.Ideal; /** - * The default configuration is used whenever no payment method configuration is specified. + * The default configuration is used whenever a payment method configuration is not specified. */ is_default: boolean; @@ -87,7 +100,7 @@ declare module 'stripe' { multibanco?: PaymentMethodConfiguration.Multibanco; /** - * Configuration name. + * The configuration's name. */ name: string; @@ -98,7 +111,7 @@ declare module 'stripe' { p24?: PaymentMethodConfiguration.P24; /** - * The configuration's parent configuration. + * For child configs, the configuration's parent configuration. */ parent: string | null; @@ -134,7 +147,7 @@ declare module 'stripe' { namespace AcssDebit { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -168,7 +181,7 @@ declare module 'stripe' { namespace Affirm { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -202,7 +215,7 @@ declare module 'stripe' { namespace AfterpayClearpay { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -236,7 +249,7 @@ declare module 'stripe' { namespace Alipay { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -270,7 +283,7 @@ declare module 'stripe' { namespace ApplePay { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -304,7 +317,7 @@ declare module 'stripe' { namespace AuBecsDebit { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -338,7 +351,7 @@ declare module 'stripe' { namespace BacsDebit { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -372,7 +385,7 @@ declare module 'stripe' { namespace Bancontact { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -406,7 +419,7 @@ declare module 'stripe' { namespace Blik { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -440,7 +453,7 @@ declare module 'stripe' { namespace Boleto { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -474,7 +487,7 @@ declare module 'stripe' { namespace Card { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -508,7 +521,7 @@ declare module 'stripe' { namespace CartesBancaires { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -542,7 +555,7 @@ declare module 'stripe' { namespace Cashapp { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -576,7 +589,7 @@ declare module 'stripe' { namespace Eps { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -610,7 +623,7 @@ declare module 'stripe' { namespace Fpx { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -644,7 +657,7 @@ declare module 'stripe' { namespace Giropay { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -678,7 +691,7 @@ declare module 'stripe' { namespace GooglePay { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -712,7 +725,7 @@ declare module 'stripe' { namespace Grabpay { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -746,7 +759,7 @@ declare module 'stripe' { namespace IdBankTransfer { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -780,7 +793,7 @@ declare module 'stripe' { namespace Ideal { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -814,7 +827,7 @@ declare module 'stripe' { namespace Jcb { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -848,7 +861,7 @@ declare module 'stripe' { namespace Klarna { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -882,7 +895,7 @@ declare module 'stripe' { namespace Konbini { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -916,7 +929,7 @@ declare module 'stripe' { namespace Link { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -950,7 +963,7 @@ declare module 'stripe' { namespace Multibanco { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -984,7 +997,7 @@ declare module 'stripe' { namespace Netbanking { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1018,7 +1031,7 @@ declare module 'stripe' { namespace Oxxo { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1052,7 +1065,7 @@ declare module 'stripe' { namespace P24 { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1086,7 +1099,7 @@ declare module 'stripe' { namespace PayByBank { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1120,7 +1133,7 @@ declare module 'stripe' { namespace Paynow { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1154,7 +1167,7 @@ declare module 'stripe' { namespace Paypal { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1188,7 +1201,7 @@ declare module 'stripe' { namespace Promptpay { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1222,7 +1235,7 @@ declare module 'stripe' { namespace SepaDebit { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1256,7 +1269,7 @@ declare module 'stripe' { namespace Sofort { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1290,7 +1303,7 @@ declare module 'stripe' { namespace Upi { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1324,7 +1337,7 @@ declare module 'stripe' { namespace UsBankAccount { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; @@ -1358,7 +1371,7 @@ declare module 'stripe' { namespace WechatPay { interface DisplayPreference { /** - * For child configurations, whether or not the account's preference will be observed. If `false`, the parent configuration's preference is used. + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ overridable: boolean | null; diff --git a/types/QuotePreviewInvoices.d.ts b/types/QuotePreviewInvoices.d.ts index b7b7019821..e3b4125879 100644 --- a/types/QuotePreviewInvoices.d.ts +++ b/types/QuotePreviewInvoices.d.ts @@ -724,25 +724,24 @@ declare module 'stripe' { /** * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. * - * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. - * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. - * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides * you through the setup process. * * Successful SetupIntents result in payment credentials that are optimized for future payments. - * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through - * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection - * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). - * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, - * it will automatically attach the resulting payment method to that Customer. + * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) during payment method collection + * to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). + * If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + * it automatically attaches the resulting payment method to that Customer after successful setup. * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. * - * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, - * even as regulations change over time. + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. * * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents) */ diff --git a/types/QuotePreviewSchedules.d.ts b/types/QuotePreviewSubscriptionSchedules.d.ts similarity index 97% rename from types/QuotePreviewSchedules.d.ts rename to types/QuotePreviewSubscriptionSchedules.d.ts index 7722fb5403..c6709e5c28 100644 --- a/types/QuotePreviewSchedules.d.ts +++ b/types/QuotePreviewSubscriptionSchedules.d.ts @@ -3,9 +3,9 @@ declare module 'stripe' { namespace Stripe { /** - * The QuotePreviewSchedule object. + * The QuotePreviewSubscriptionSchedule object. */ - interface QuotePreviewSchedule { + interface QuotePreviewSubscriptionSchedule { /** * Unique identifier for the object. */ @@ -14,7 +14,7 @@ declare module 'stripe' { /** * String representing the object's type. Objects of the same type share the same value. */ - object: 'quote_preview_schedule'; + object: 'quote_preview_subscription_schedule'; /** * ID of the Connect Application that created the schedule. @@ -25,12 +25,12 @@ declare module 'stripe' { | Stripe.DeletedApplication | null; - applies_to: QuotePreviewSchedule.AppliesTo; + applies_to: QuotePreviewSubscriptionSchedule.AppliesTo; /** * Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time.`prorate_up_front` will bill for all phases within the current billing cycle up front. */ - billing_behavior?: QuotePreviewSchedule.BillingBehavior; + billing_behavior?: QuotePreviewSubscriptionSchedule.BillingBehavior; /** * Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. @@ -50,19 +50,19 @@ declare module 'stripe' { /** * Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. */ - current_phase: QuotePreviewSchedule.CurrentPhase | null; + current_phase: QuotePreviewSubscriptionSchedule.CurrentPhase | null; /** * ID of the customer who owns the subscription schedule. */ customer: string | Stripe.Customer | Stripe.DeletedCustomer; - default_settings: QuotePreviewSchedule.DefaultSettings; + default_settings: QuotePreviewSubscriptionSchedule.DefaultSettings; /** * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. */ - end_behavior: QuotePreviewSchedule.EndBehavior; + end_behavior: QuotePreviewSubscriptionSchedule.EndBehavior; /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -77,12 +77,12 @@ declare module 'stripe' { /** * Configuration for the subscription schedule's phases. */ - phases: Array; + phases: Array; /** * Time period and invoice for a Subscription billed in advance. */ - prebilling?: QuotePreviewSchedule.Prebilling | null; + prebilling?: QuotePreviewSubscriptionSchedule.Prebilling | null; /** * Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. @@ -97,7 +97,7 @@ declare module 'stripe' { /** * The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). */ - status: QuotePreviewSchedule.Status; + status: QuotePreviewSubscriptionSchedule.Status; /** * ID of the subscription managed by the subscription schedule. @@ -110,7 +110,7 @@ declare module 'stripe' { test_clock: string | Stripe.TestHelpers.TestClock | null; } - namespace QuotePreviewSchedule { + namespace QuotePreviewSubscriptionSchedule { interface AppliesTo { /** * A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. diff --git a/types/Quotes.d.ts b/types/Quotes.d.ts index 434709a2f2..06443615e7 100644 --- a/types/Quotes.d.ts +++ b/types/Quotes.d.ts @@ -17,6 +17,11 @@ declare module 'stripe' { */ object: 'quote'; + /** + * Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + */ + allow_backdated_lines?: boolean | null; + /** * Total before any discounts or taxes are applied. */ diff --git a/types/QuotesResource.d.ts b/types/QuotesResource.d.ts index 8f3406a8e4..854fe99887 100644 --- a/types/QuotesResource.d.ts +++ b/types/QuotesResource.d.ts @@ -3,6 +3,11 @@ declare module 'stripe' { namespace Stripe { interface QuoteCreateParams { + /** + * Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + */ + allow_backdated_lines?: boolean; + /** * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ @@ -1632,6 +1637,11 @@ declare module 'stripe' { } interface QuoteUpdateParams { + /** + * Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + */ + allow_backdated_lines?: boolean; + /** * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ @@ -3291,13 +3301,6 @@ declare module 'stripe' { expand?: Array; } - interface QuoteDraftQuoteParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - interface QuoteFinalizeQuoteParams { /** * Specifies which fields in the response should be expanded. @@ -3345,14 +3348,22 @@ declare module 'stripe' { expand?: Array; } - interface QuotePreviewScheduleListParams extends PaginationParams { + interface QuotePreviewSubscriptionScheduleListParams + extends PaginationParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; } - interface QuoteMarkStaleQuoteParams { + interface QuoteMarkDraftParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface QuoteMarkStaleParams { /** * Specifies which fields in the response should be expanded. */ @@ -3445,19 +3456,6 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; - /** - * Converts a stale quote to draft. - */ - draftQuote( - id: string, - params?: QuoteDraftQuoteParams, - options?: RequestOptions - ): Promise>; - draftQuote( - id: string, - options?: RequestOptions - ): Promise>; - /** * Finalizes the quote. */ @@ -3541,25 +3539,38 @@ declare module 'stripe' { /** * Preview the schedules that would be generated by accepting the quote */ - listPreviewSchedules( + listPreviewSubscriptionSchedules( id: string, - params?: QuotePreviewScheduleListParams, + params?: QuotePreviewSubscriptionScheduleListParams, options?: RequestOptions - ): ApiListPromise; - listPreviewSchedules( + ): ApiListPromise; + listPreviewSubscriptionSchedules( id: string, options?: RequestOptions - ): ApiListPromise; + ): ApiListPromise; + + /** + * Converts a stale quote to draft. + */ + markDraft( + id: string, + params?: QuoteMarkDraftParams, + options?: RequestOptions + ): Promise>; + markDraft( + id: string, + options?: RequestOptions + ): Promise>; /** * Converts a draft or open quote to stale. */ - markStaleQuote( + markStale( id: string, - params?: QuoteMarkStaleQuoteParams, + params?: QuoteMarkStaleParams, options?: RequestOptions ): Promise>; - markStaleQuote( + markStale( id: string, options?: RequestOptions ): Promise>; diff --git a/types/SetupAttempts.d.ts b/types/SetupAttempts.d.ts index fa934e3029..6998640499 100644 --- a/types/SetupAttempts.d.ts +++ b/types/SetupAttempts.d.ts @@ -547,25 +547,24 @@ declare module 'stripe' { /** * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. * - * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. - * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. - * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides * you through the setup process. * * Successful SetupIntents result in payment credentials that are optimized for future payments. - * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through - * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection - * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). - * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, - * it will automatically attach the resulting payment method to that Customer. + * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) during payment method collection + * to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). + * If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + * it automatically attaches the resulting payment method to that Customer after successful setup. * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. * - * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, - * even as regulations change over time. + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. * * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents) */ diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts index 856c3f07cb..bc9e41f553 100644 --- a/types/SetupIntents.d.ts +++ b/types/SetupIntents.d.ts @@ -4,25 +4,24 @@ declare module 'stripe' { namespace Stripe { /** * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. * - * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. - * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. - * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides * you through the setup process. * * Successful SetupIntents result in payment credentials that are optimized for future payments. - * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through - * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection - * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). - * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, - * it will automatically attach the resulting payment method to that Customer. + * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) during payment method collection + * to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). + * If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + * it automatically attaches the resulting payment method to that Customer after successful setup. * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. * - * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, - * even as regulations change over time. + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. * * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents) */ @@ -136,7 +135,7 @@ declare module 'stripe' { payment_method_configuration_details?: SetupIntent.PaymentMethodConfigurationDetails | null; /** - * Payment-method-specific configuration for this SetupIntent. + * Payment method-specific configuration for this SetupIntent. */ payment_method_options: SetupIntent.PaymentMethodOptions | null; @@ -256,25 +255,24 @@ declare module 'stripe' { /** * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. * - * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. - * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. - * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides * you through the setup process. * * Successful SetupIntents result in payment credentials that are optimized for future payments. - * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through - * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection - * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). - * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, - * it will automatically attach the resulting payment method to that Customer. + * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) during payment method collection + * to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). + * If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + * it automatically attaches the resulting payment method to that Customer after successful setup. * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. * - * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, - * even as regulations change over time. + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. * * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents) */ diff --git a/types/SetupIntentsResource.d.ts b/types/SetupIntentsResource.d.ts index 5fa40018d4..94d13b60ca 100644 --- a/types/SetupIntentsResource.d.ts +++ b/types/SetupIntentsResource.d.ts @@ -11,12 +11,12 @@ declare module 'stripe' { attach_to_self?: boolean; /** - * When enabled, this SetupIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this SetupIntent's other parameters. + * When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. */ automatic_payment_methods?: SetupIntentCreateParams.AutomaticPaymentMethods; /** - * Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. + * Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. */ confirm?: boolean; @@ -52,7 +52,7 @@ declare module 'stripe' { flow_directions?: Array; /** - * This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + * This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ mandate_data?: Stripe.Emptyable; @@ -62,7 +62,7 @@ declare module 'stripe' { metadata?: Stripe.MetadataParam; /** - * The Stripe account ID for which this SetupIntent is created. + * The Stripe account ID created for this SetupIntent. */ on_behalf_of?: string; @@ -72,7 +72,7 @@ declare module 'stripe' { payment_method?: string; /** - * The ID of the payment method configuration to use with this Setup Intent. + * The ID of the payment method configuration to use with this SetupIntent. */ payment_method_configuration?: string; @@ -83,22 +83,22 @@ declare module 'stripe' { payment_method_data?: SetupIntentCreateParams.PaymentMethodData; /** - * Payment-method-specific configuration for this SetupIntent. + * Payment method-specific configuration for this SetupIntent. */ payment_method_options?: SetupIntentCreateParams.PaymentMethodOptions; /** - * The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. + * The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, it defaults to ["card"]. */ payment_method_types?: Array; /** - * The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + * The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ return_url?: string; /** - * If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + * If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. */ single_use?: SetupIntentCreateParams.SingleUse; @@ -1043,7 +1043,7 @@ declare module 'stripe' { interface SetupIntentRetrieveParams { /** - * The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. + * The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. */ client_secret?: string; @@ -1107,12 +1107,12 @@ declare module 'stripe' { payment_method_data?: SetupIntentUpdateParams.PaymentMethodData; /** - * Payment-method-specific configuration for this SetupIntent. + * Payment method-specific configuration for this SetupIntent. */ payment_method_options?: SetupIntentUpdateParams.PaymentMethodOptions; /** - * The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. + * The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this array, it defaults to ["card"]. */ payment_method_types?: Array; } @@ -3012,8 +3012,8 @@ declare module 'stripe' { /** * Creates a SetupIntent object. * - * After the SetupIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) - * to collect any required permissions to charge the payment method later. + * After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) + * it to collect any required permissions to charge the payment method later. */ create( params?: SetupIntentCreateParams, diff --git a/types/Tokens.d.ts b/types/Tokens.d.ts index 840d1f13ca..c3fdddeaac 100644 --- a/types/Tokens.d.ts +++ b/types/Tokens.d.ts @@ -6,21 +6,21 @@ declare module 'stripe' { * Tokenization is the process Stripe uses to collect sensitive card or bank * account details, or personally identifiable information (PII), directly from * your customers in a secure manner. A token representing this information is - * returned to your server to use. You should use our + * returned to your server to use. Use our * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process - * client-side. This ensures that no sensitive card data touches your server, + * on the client-side. This guarantees that no sensitive card data touches your server, * and allows your integration to operate in a PCI-compliant way. * - * If you cannot use client-side tokenization, you can also create tokens using - * the API with either your publishable or secret API key. Keep in mind that if - * your integration uses this method, you are responsible for any PCI compliance - * that may be required, and you must keep your secret API key safe. Unlike with - * client-side tokenization, your customer's information is not sent directly to - * Stripe, so we cannot determine how it is handled or stored. + * If you can't use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. If + * your integration uses this method, you're responsible for any PCI compliance + * that it might require, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information isn't sent directly to + * Stripe, so we can't determine how it's handled or stored. * - * Tokens cannot be stored or used more than once. To store card or bank account - * information for later use, you can create [Customer](https://stripe.com/docs/api#customers) - * objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that + * You can't store or use tokens more than once. To store card or bank account + * information for later use, create [Customer](https://stripe.com/docs/api#customers) + * objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, * performs best with integrations that use client-side tokenization. */ @@ -56,7 +56,7 @@ declare module 'stripe' { card?: Stripe.Card; /** - * IP address of the client that generated the token. + * IP address of the client that generates the token. */ client_ip: string | null; @@ -76,7 +76,7 @@ declare module 'stripe' { type: string; /** - * Whether this token has already been used (tokens can be used only once). + * Determines if you have already used this token (you can only use tokens once). */ used: boolean; } diff --git a/types/TokensResource.d.ts b/types/TokensResource.d.ts index a82d7047b6..dbdacc4ba9 100644 --- a/types/TokensResource.d.ts +++ b/types/TokensResource.d.ts @@ -4,7 +4,7 @@ declare module 'stripe' { namespace Stripe { interface TokenCreateParams { /** - * Information for the account this token will represent. + * Information for the account this token represents. */ account?: TokenCreateParams.Account; @@ -19,12 +19,12 @@ declare module 'stripe' { card?: TokenCreateParams.Card | string; /** - * The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + * Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ customer?: string; /** - * The updated CVC value this token will represent. + * The updated CVC value this token represents. */ cvc_update?: TokenCreateParams.CvcUpdate; @@ -34,12 +34,12 @@ declare module 'stripe' { expand?: Array; /** - * Information for the person this token will represent. + * Information for the person this token represents. */ person?: TokenCreateParams.Person; /** - * The PII this token will represent. + * The PII this token represents. */ pii?: TokenCreateParams.Pii; } @@ -798,7 +798,7 @@ declare module 'stripe' { class TokensResource { /** * Creates a single-use token that represents a bank account's details. - * This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a [Custom account](https://stripe.com/docs/api#accounts). + * You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts). */ create( params?: TokenCreateParams, diff --git a/types/Treasury/OutboundPayments.d.ts b/types/Treasury/OutboundPayments.d.ts index 2325096948..4001968489 100644 --- a/types/Treasury/OutboundPayments.d.ts +++ b/types/Treasury/OutboundPayments.d.ts @@ -208,7 +208,7 @@ declare module 'stripe' { ip_address: string | null; /** - * `true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + * `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. */ present: boolean; } diff --git a/types/index.d.ts b/types/index.d.ts index 0a0225299a..b64e286ad9 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -49,6 +49,7 @@ /// /// /// +/// /// /// /// @@ -155,10 +156,10 @@ /// /// /// +/// /// /// /// -/// /// /// /// @@ -175,6 +176,7 @@ /// /// /// +/// /// /// /// @@ -195,7 +197,7 @@ /// /// /// -/// +/// /// /// /// @@ -349,6 +351,7 @@ declare module 'stripe' { disputes: Stripe.Issuing.DisputesResource; personalizationDesigns: Stripe.Issuing.PersonalizationDesignsResource; physicalBundles: Stripe.Issuing.PhysicalBundlesResource; + tokens: Stripe.Issuing.TokensResource; transactions: Stripe.Issuing.TransactionsResource; }; radar: {