diff --git a/types/2020-08-27/Accounts.d.ts b/types/2020-08-27/Accounts.d.ts index f073afb6f9..5db89eea0d 100644 --- a/types/2020-08-27/Accounts.d.ts +++ b/types/2020-08-27/Accounts.d.ts @@ -3210,7 +3210,7 @@ declare module 'stripe' { /** * With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage. * - * Accounts created using test-mode keys can be deleted at any time. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. + * Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. * * If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/account) instead. */ diff --git a/types/2020-08-27/Checkout/Sessions.d.ts b/types/2020-08-27/Checkout/Sessions.d.ts index 50afa5aba9..01ac0919bb 100644 --- a/types/2020-08-27/Checkout/Sessions.d.ts +++ b/types/2020-08-27/Checkout/Sessions.d.ts @@ -138,7 +138,7 @@ declare module 'stripe' { /** * The ID of the Payment Link that created this Session. */ - payment_link?: string | Stripe.PaymentLink | null; + payment_link: string | Stripe.PaymentLink | null; /** * Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. diff --git a/types/2020-08-27/PaymentLinks.d.ts b/types/2020-08-27/PaymentLinks.d.ts index 0cae261596..7fee1889d9 100644 --- a/types/2020-08-27/PaymentLinks.d.ts +++ b/types/2020-08-27/PaymentLinks.d.ts @@ -17,7 +17,7 @@ declare module 'stripe' { object: 'payment_link'; /** - * Whether the payment link's `url` is active. If `false`, customers visiting the url will be redirected. + * Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ active: boolean; @@ -66,10 +66,12 @@ declare module 'stripe' { on_behalf_of: string | Stripe.Account | null; /** - * The list of payment method types that customers can use. When `null`, your [payment methods settings](https://dashboard.stripe.com/settings/payment_methods) will be used. + * The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types: Array<'card'> | null; + phone_number_collection: PaymentLink.PhoneNumberCollection; + /** * Configuration for collecting the customer's shipping address. */ @@ -86,7 +88,7 @@ declare module 'stripe' { transfer_data: PaymentLink.TransferData | null; /** - * The public url that can be shared with customers. + * The public URL that can be shared with customers. */ url: string; } @@ -113,7 +115,7 @@ declare module 'stripe' { interface Redirect { /** - * The `url` the customer will be redirected to after the purchase is complete. + * The URL the customer will be redirected to after the purchase is complete. */ url: string; } @@ -130,6 +132,13 @@ declare module 'stripe' { type BillingAddressCollection = 'auto' | 'required'; + interface PhoneNumberCollection { + /** + * If `true`, a phone number will be collected during checkout. + */ + enabled: boolean; + } + interface ShippingAddressCollection { /** * An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. @@ -380,7 +389,7 @@ declare module 'stripe' { interface SubscriptionData { /** - * 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`. + * Integer representing the number of trial period days before the customer is charged for the first time. */ trial_period_days: number | null; } @@ -440,7 +449,7 @@ declare module 'stripe' { line_items?: Array; /** - * 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 associated with this Payment Link will automatically be copied to Checkout Sessions created by this Payment Link. + * 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 associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ metadata?: Stripe.MetadataParam; @@ -450,10 +459,17 @@ declare module 'stripe' { on_behalf_of?: string; /** - * The list of payment method types (e.g., card) that customers can use. Only `card` is supported. If no value is passed, your [payment methods settings](https://dashboard.stripe.com/settings/payment_methods) will be used. + * The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ payment_method_types?: Array<'card'>; + /** + * Controls phone number collection settings during checkout. + * + * We recommend that you review your privacy policy and check with your legal contacts. + */ + phone_number_collection?: PaymentLinkCreateParams.PhoneNumberCollection; + /** * Configuration for collecting the customer's shipping address. */ @@ -527,7 +543,7 @@ declare module 'stripe' { price: string; /** - * The quantity of the line item being purchased. Only `1` is supported. + * The quantity of the line item being purchased. */ quantity: number; } @@ -545,12 +561,19 @@ declare module 'stripe' { maximum?: number; /** - * The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98. + * The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98. If there is only one item in the cart then that item's quantity cannot go down to 0. */ minimum?: number; } } + interface PhoneNumberCollection { + /** + * Set to `true` to enable phone number collection. + */ + enabled: boolean; + } + interface ShippingAddressCollection { /** * An array of two-letter ISO country codes representing which countries Checkout should provide as options for @@ -832,7 +855,7 @@ declare module 'stripe' { interface PaymentLinkUpdateParams { /** - * Whether the payment link's `url` is active. If `false`, customers visiting the url will be redirected. + * Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ active?: boolean; @@ -867,12 +890,12 @@ declare module 'stripe' { line_items?: Array; /** - * 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 associated with this Payment Link will automatically be copied to Checkout Sessions created by this Payment Link. + * 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 associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ metadata?: Stripe.MetadataParam; /** - * The list of payment method types (e.g., card) that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment methods settings](https://dashboard.stripe.com/settings/payment_methods). + * The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: Stripe.Emptyable>; @@ -941,7 +964,7 @@ declare module 'stripe' { id: string; /** - * The quantity of the line item being purchased. Only `1` is supported. + * The quantity of the line item being purchased. */ quantity?: number; } @@ -959,7 +982,7 @@ declare module 'stripe' { maximum?: number; /** - * The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98. + * The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98. If there is only one item in the cart then that item's quantity cannot go down to 0. */ minimum?: number; } diff --git a/types/2020-08-27/WebhookEndpoints.d.ts b/types/2020-08-27/WebhookEndpoints.d.ts index 563bb70d21..e312d21091 100644 --- a/types/2020-08-27/WebhookEndpoints.d.ts +++ b/types/2020-08-27/WebhookEndpoints.d.ts @@ -332,6 +332,8 @@ declare module 'stripe' { | 'payment_intent.processing' | 'payment_intent.requires_action' | 'payment_intent.succeeded' + | 'payment_link.created' + | 'payment_link.updated' | 'payment_method.attached' | 'payment_method.automatically_updated' | 'payment_method.detached' @@ -553,6 +555,8 @@ declare module 'stripe' { | 'payment_intent.processing' | 'payment_intent.requires_action' | 'payment_intent.succeeded' + | 'payment_link.created' + | 'payment_link.updated' | 'payment_method.attached' | 'payment_method.automatically_updated' | 'payment_method.detached'