diff --git a/types/2020-08-27/Accounts.d.ts b/types/2020-08-27/Accounts.d.ts index a05fc28940..484820a6ac 100644 --- a/types/2020-08-27/Accounts.d.ts +++ b/types/2020-08-27/Accounts.d.ts @@ -70,6 +70,9 @@ declare module 'stripe' { /** * This is an object representing a person associated with a Stripe account. * + * A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. + * See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps. + * * Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information). */ individual?: Stripe.Person; diff --git a/types/2020-08-27/Checkout/Sessions.d.ts b/types/2020-08-27/Checkout/Sessions.d.ts index 01802b29a3..f8bc2ba902 100644 --- a/types/2020-08-27/Checkout/Sessions.d.ts +++ b/types/2020-08-27/Checkout/Sessions.d.ts @@ -64,6 +64,11 @@ declare module 'stripe' { */ customer: string | Stripe.Customer | Stripe.DeletedCustomer | null; + /** + * The customer details including the customer's tax exempt status and the customer's tax IDs. + */ + customer_details: Session.CustomerDetails | null; + /** * If provided, this value will be used when the Customer object is created. * If not provided, customers will be asked to enter their email address. @@ -158,6 +163,76 @@ declare module 'stripe' { namespace Session { type BillingAddressCollection = 'auto' | 'required'; + interface CustomerDetails { + /** + * The customer's email at time of checkout. + */ + email: string | null; + + /** + * The customer's tax exempt status at time of checkout. + */ + tax_exempt: CustomerDetails.TaxExempt | null; + + /** + * The customer's tax IDs at time of checkout. + */ + tax_ids: Array | null; + } + + namespace CustomerDetails { + type TaxExempt = 'exempt' | 'none' | 'reverse'; + + interface TaxId { + /** + * The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `nz_gst`, `au_abn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, or `unknown` + */ + type: TaxId.Type; + + /** + * The value of the tax ID. + */ + value: string | null; + } + + namespace TaxId { + type Type = + | 'ae_trn' + | 'au_abn' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_vat' + | 'hk_br' + | 'id_npwp' + | 'in_gst' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'unknown' + | 'us_ein' + | 'za_vat'; + } + } + type Locale = | 'auto' | 'bg' @@ -721,7 +796,7 @@ declare module 'stripe' { quantity: number; /** - * The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. This is only allowed in subscription mode. + * The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. */ tax_rates?: Array; } @@ -881,10 +956,17 @@ declare module 'stripe' { * Indicates that you intend to make future payments with the payment * method collected by this Checkout Session. * + * When setting this to `on_session`, Checkout will show a notice to the + * customer that their payment details will be saved. + * * When setting this to `off_session`, Checkout will show a notice to the * customer that their payment details will be saved and used for future * payments. * + * For both values, Checkout will attach the payment method to either the + * provided Customer for the session, or a new Customer created by Checkout + * if one has not been provided. + * * 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. diff --git a/types/2020-08-27/Issuing/Transactions.d.ts b/types/2020-08-27/Issuing/Transactions.d.ts index ba91637f76..2912c2ef1e 100644 --- a/types/2020-08-27/Issuing/Transactions.d.ts +++ b/types/2020-08-27/Issuing/Transactions.d.ts @@ -328,6 +328,15 @@ declare module 'stripe' { * Specifies which fields in the response should be expanded. */ expand?: Array; + + /** + * Only return transactions that have the given type. One of `capture` or `refund`. + */ + type?: TransactionListParams.Type; + } + + namespace TransactionListParams { + type Type = 'capture' | 'refund'; } class TransactionsResource { diff --git a/types/2020-08-27/SubscriptionSchedules.d.ts b/types/2020-08-27/SubscriptionSchedules.d.ts index 36eee404e0..38dc9cc9b6 100644 --- a/types/2020-08-27/SubscriptionSchedules.d.ts +++ b/types/2020-08-27/SubscriptionSchedules.d.ts @@ -220,7 +220,7 @@ declare module 'stripe' { end_date: number; /** - * The subscription schedule's default invoice settings. + * The invoice settings applicable during this phase. */ invoice_settings: Phase.InvoiceSettings | null; diff --git a/types/2020-08-27/TaxRates.d.ts b/types/2020-08-27/TaxRates.d.ts index 5d78a758d4..c3a67f7f64 100644 --- a/types/2020-08-27/TaxRates.d.ts +++ b/types/2020-08-27/TaxRates.d.ts @@ -21,6 +21,11 @@ declare module 'stripe' { */ active: boolean; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country: string | null; + /** * Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -60,6 +65,11 @@ declare module 'stripe' { * This represents the tax rate percent out of 100. */ percentage: number; + + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + */ + state: string | null; } interface TaxRateCreateParams { @@ -83,6 +93,11 @@ declare module 'stripe' { */ active?: boolean; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country?: string; + /** * An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ @@ -102,6 +117,11 @@ declare module 'stripe' { * 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`. */ metadata?: Stripe.MetadataParam; + + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + */ + state?: string; } interface TaxRateRetrieveParams { @@ -117,6 +137,11 @@ declare module 'stripe' { */ active?: boolean; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country?: string; + /** * An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ @@ -141,6 +166,11 @@ declare module 'stripe' { * 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`. */ metadata?: Stripe.Emptyable; + + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + */ + state?: string; } interface TaxRateListParams extends PaginationParams {