diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk index cddf7a63..eba4490f 100644 --- a/.latest-tag-stripe-openapi-sdk +++ b/.latest-tag-stripe-openapi-sdk @@ -1 +1 @@ -v741 +v742 diff --git a/lib/generated/account.ex b/lib/generated/account.ex index c5611f43..ae152eab 100644 --- a/lib/generated/account.ex +++ b/lib/generated/account.ex @@ -119,8 +119,8 @@ defmodule Stripe.Account do ) ( - @typedoc "The bacs_debit_payments capability." - @type bacs_debit_payments :: %{optional(:requested) => boolean} + @typedoc "Settings specific to Bacs Direct Debit payments." + @type bacs_debit_payments :: %{optional(:display_name) => binary} ) ( diff --git a/lib/generated/checkout__session.ex b/lib/generated/checkout__session.ex index c7f510cf..339fabc6 100644 --- a/lib/generated/checkout__session.ex +++ b/lib/generated/checkout__session.ex @@ -978,8 +978,11 @@ defmodule Stripe.Checkout.Session do ) ( - @typedoc "The parameters used to automatically create a Transfer when the payment succeeds.\nFor more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts)." - @type transfer_data :: %{optional(:amount) => integer, optional(:destination) => binary} + @typedoc "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges." + @type transfer_data :: %{ + optional(:amount_percent) => number, + optional(:destination) => binary + } ) ( diff --git a/lib/generated/payment_intent.ex b/lib/generated/payment_intent.ex index 3b00a644..b455b10b 100644 --- a/lib/generated/payment_intent.ex +++ b/lib/generated/payment_intent.ex @@ -136,8 +136,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type au_becs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session} + @typedoc "If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account." + @type au_becs_debit :: %{optional(:account_number) => binary, optional(:bsb_number) => binary} ) ( @@ -149,8 +149,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account." - @type bacs_debit :: %{optional(:account_number) => binary, optional(:sort_code) => binary} + @typedoc nil + @type bacs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session} ) ( @@ -192,8 +192,11 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method." - @type boleto :: %{optional(:tax_id) => binary} + @typedoc nil + @type boleto :: %{ + optional(:expires_after_days) => integer, + optional(:setup_future_usage) => :none | :off_session | :on_session + } ) ( @@ -292,38 +295,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method." - @type eps :: %{ - optional(:bank) => - :arzte_und_apotheker_bank - | :austrian_anadi_bank_ag - | :bank_austria - | :bankhaus_carl_spangler - | :bankhaus_schelhammer_und_schattera_ag - | :bawag_psk_ag - | :bks_bank_ag - | :brull_kallmus_bank_ag - | :btv_vier_lander_bank - | :capital_bank_grawe_gruppe_ag - | :deutsche_bank_ag - | :dolomitenbank - | :easybank_ag - | :erste_bank_und_sparkassen - | :hypo_alpeadriabank_international_ag - | :hypo_bank_burgenland_aktiengesellschaft - | :hypo_noe_lb_fur_niederosterreich_u_wien - | :hypo_oberosterreich_salzburg_steiermark - | :hypo_tirol_bank_ag - | :hypo_vorarlberg_bank_ag - | :marchfelder_bank - | :oberbank_ag - | :raiffeisen_bankengruppe_osterreich - | :schoellerbank_ag - | :sparda_bank_wien - | :volksbank_gruppe - | :volkskreditbank_ag - | :vr_bank_braunau - } + @typedoc nil + @type eps :: %{optional(:setup_future_usage) => :none} ) ( @@ -342,33 +315,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method." - @type fpx :: %{ - optional(:account_holder_type) => :company | :individual, - optional(:bank) => - :affin_bank - | :agrobank - | :alliance_bank - | :ambank - | :bank_islam - | :bank_muamalat - | :bank_of_china - | :bank_rakyat - | :bsn - | :cimb - | :deutsche_bank - | :hong_leong_bank - | :hsbc - | :kfh - | :maybank2e - | :maybank2u - | :ocbc - | :pb_enterprise - | :public_bank - | :rhb - | :standard_chartered - | :uob - } + @typedoc nil + @type fpx :: %{optional(:setup_future_usage) => :none} ) ( @@ -422,17 +370,12 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "Configuration options for setting up an eMandate for cards issued in India." + @typedoc "Additional fields for Mandate creation" @type mandate_options :: %{ - optional(:amount) => integer, - optional(:amount_type) => :fixed | :maximum, - optional(:description) => binary, - optional(:end_date) => integer, - optional(:interval) => :day | :month | :sporadic | :week | :year, - optional(:interval_count) => integer, - optional(:reference) => binary, - optional(:start_date) => integer, - optional(:supported_types) => list(:india) + optional(:custom_mandate_url) => binary | binary, + optional(:interval_description) => binary, + optional(:payment_schedule) => :combined | :interval | :sporadic, + optional(:transaction_type) => :business | :personal } ) @@ -460,34 +403,10 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method." + @typedoc nil @type p24 :: %{ - optional(:bank) => - :alior_bank - | :bank_millennium - | :bank_nowy_bfg_sa - | :bank_pekao_sa - | :banki_spbdzielcze - | :blik - | :bnp_paribas - | :boz - | :citi_handlowy - | :credit_agricole - | :envelobank - | :etransfer_pocztowy24 - | :getin_bank - | :ideabank - | :ing - | :inteligo - | :mbank_mtransfer - | :nest_przelew - | :noble_pay - | :pbac_z_ipko - | :plus_bank - | :santander_przelew24 - | :tmobile_usbugi_bankowe - | :toyota_bank - | :volkswagen_bank + optional(:setup_future_usage) => :none, + optional(:tos_shown_and_accepted) => boolean } ) diff --git a/lib/generated/setup_intent.ex b/lib/generated/setup_intent.ex index e25d9239..9309fc49 100644 --- a/lib/generated/setup_intent.ex +++ b/lib/generated/setup_intent.ex @@ -289,7 +289,13 @@ defmodule Stripe.SetupIntent do ( @typedoc "Additional fields for Mandate creation" - @type mandate_options :: %{optional(:collection_method) => :paper} + @type mandate_options :: %{ + optional(:custom_mandate_url) => binary | binary, + optional(:default_for) => list(:invoice | :subscription), + optional(:interval_description) => binary, + optional(:payment_schedule) => :combined | :interval | :sporadic, + optional(:transaction_type) => :business | :personal + } ) ( diff --git a/lib/generated/subscription.ex b/lib/generated/subscription.ex index 929f59d1..5c7dba85 100644 --- a/lib/generated/subscription.ex +++ b/lib/generated/subscription.ex @@ -49,7 +49,7 @@ defmodule Stripe.Subscription do :application_fee_percent ] - @typedoc "The `subscription` type.\n\n * `application` ID of the Connect Application that created the subscription.\n * `application_fee_percent` A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.\n * `automatic_tax` \n * `billing_cycle_anchor` Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.\n * `billing_thresholds` Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period\n * `cancel_at` A date in the future at which the subscription will automatically get canceled\n * `cancel_at_period_end` If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period.\n * `canceled_at` If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.\n * `cancellation_details` Details about why this subscription was cancelled\n * `collection_method` Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `currency` Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\n * `current_period_end` End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.\n * `current_period_start` Start of the current period that the subscription has been invoiced for.\n * `customer` ID of the customer who owns the subscription.\n * `days_until_due` Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.\n * `default_payment_method` ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).\n * `default_source` ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).\n * `default_tax_rates` The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.\n * `description` The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.\n * `discount` Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis.\n * `ended_at` If the subscription has ended, the date the subscription ended.\n * `id` Unique identifier for the object.\n * `items` List of subscription items, each with an attached price.\n * `latest_invoice` The most recent invoice this subscription has generated.\n * `livemode` Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.\n * `metadata` 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.\n * `next_pending_invoice_item_invoice` Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `on_behalf_of` The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.\n * `pause_collection` If specified, payment collection for this subscription will be paused.\n * `payment_settings` Payment settings passed on to invoices created by the subscription.\n * `pending_invoice_item_interval` Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.\n * `pending_setup_intent` You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).\n * `pending_update` If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.\n * `schedule` The schedule attached to the subscription\n * `start_date` Date when the subscription was first created. The date might differ from the `created` date due to backdating.\n * `status` Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. \n\nA subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. \n\nIf subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). \n\nIf subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.\n * `test_clock` ID of the test clock this subscription belongs to.\n * `transfer_data` The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.\n * `trial_end` If the subscription has a trial, the end of that trial.\n * `trial_settings` Settings related to subscription trials.\n * `trial_start` If the subscription has a trial, the beginning of that trial.\n" + @typedoc "The `subscription` type.\n\n * `application` ID of the Connect Application that created the subscription.\n * `application_fee_percent` A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.\n * `automatic_tax` \n * `billing_cycle_anchor` The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.\n * `billing_thresholds` Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period\n * `cancel_at` A date in the future at which the subscription will automatically get canceled\n * `cancel_at_period_end` If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period.\n * `canceled_at` If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.\n * `cancellation_details` Details about why this subscription was cancelled\n * `collection_method` Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `currency` Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\n * `current_period_end` End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.\n * `current_period_start` Start of the current period that the subscription has been invoiced for.\n * `customer` ID of the customer who owns the subscription.\n * `days_until_due` Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.\n * `default_payment_method` ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).\n * `default_source` ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).\n * `default_tax_rates` The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.\n * `description` The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.\n * `discount` Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis.\n * `ended_at` If the subscription has ended, the date the subscription ended.\n * `id` Unique identifier for the object.\n * `items` List of subscription items, each with an attached price.\n * `latest_invoice` The most recent invoice this subscription has generated.\n * `livemode` Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.\n * `metadata` 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.\n * `next_pending_invoice_item_invoice` Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `on_behalf_of` The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.\n * `pause_collection` If specified, payment collection for this subscription will be paused.\n * `payment_settings` Payment settings passed on to invoices created by the subscription.\n * `pending_invoice_item_interval` Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.\n * `pending_setup_intent` You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).\n * `pending_update` If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.\n * `schedule` The schedule attached to the subscription\n * `start_date` Date when the subscription was first created. The date might differ from the `created` date due to backdating.\n * `status` Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. \n\nA subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. \n\nIf subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). \n\nIf subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.\n * `test_clock` ID of the test clock this subscription belongs to.\n * `transfer_data` The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.\n * `trial_end` If the subscription has a trial, the end of that trial.\n * `trial_settings` Settings related to subscription trials.\n * `trial_start` If the subscription has a trial, the beginning of that trial.\n" @type t :: %__MODULE__{ application: (binary | term | term) | nil, application_fee_percent: term | nil, diff --git a/lib/generated/token.ex b/lib/generated/token.ex index 60c94692..592d2b85 100644 --- a/lib/generated/token.ex +++ b/lib/generated/token.ex @@ -20,11 +20,12 @@ defmodule Stripe.Token do ) ( - @typedoc "Details on the legal guardian's acceptance of the main Stripe service agreement." + @typedoc "Information for the account this token represents." @type account :: %{ - optional(:date) => integer, - optional(:ip) => binary, - optional(:user_agent) => binary | binary + optional(:business_type) => :company | :government_entity | :individual | :non_profit, + optional(:company) => company, + optional(:individual) => individual, + optional(:tos_shown_and_accepted) => boolean } ) @@ -64,7 +65,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The Kanji variation of the person's address (Japan only)." + @typedoc "The Kanji variation of the the individual's primary address (Japan only)." @type address_kanji :: %{ optional(:city) => binary, optional(:country) => binary, @@ -268,7 +269,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The individual's registered address." + @typedoc "The person's registered address." @type registered_address :: %{ optional(:city) => binary, optional(:country) => binary, diff --git a/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json index c2f099d1..aaf6b1e4 100644 --- a/priv/openapi/spec3.sdk.json +++ b/priv/openapi/spec3.sdk.json @@ -46070,7 +46070,7 @@ "$ref": "#/components/schemas/subscription_automatic_tax" }, "billing_cycle_anchor": { - "description": "Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.", + "description": "The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.", "format": "unix-time", "type": "integer" }, @@ -130114,7 +130114,7 @@ "type": "integer" }, "billing_cycle_anchor": { - "description": "A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.", + "description": "A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.", "format": "unix-time", "type": "integer", "x-stripeBypassValidation": true