diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk
index e479537c..7dd62bd6 100644
--- a/.latest-tag-stripe-openapi-sdk
+++ b/.latest-tag-stripe-openapi-sdk
@@ -1 +1 @@
-v659
+v665
diff --git a/lib/generated/account.ex b/lib/generated/account.ex
index 2c264f82..378b38f3 100644
--- a/lib/generated/account.ex
+++ b/lib/generated/account.ex
@@ -78,7 +78,7 @@ defmodule Stripe.Account do
)
(
- @typedoc "The Kana variation of the the individual's primary address (Japan only)."
+ @typedoc "The Kana variation of the company's primary address (Japan only)."
@type address_kana :: %{
optional(:city) => binary,
optional(:country) => binary,
@@ -222,8 +222,13 @@ defmodule Stripe.Account do
)
(
- @typedoc "The card_payments capability."
- @type card_payments :: %{optional(:requested) => boolean}
+ @typedoc "Settings specific to card charging on the account."
+ @type card_payments :: %{
+ optional(:decline_on) => decline_on,
+ optional(:statement_descriptor_prefix) => binary,
+ optional(:statement_descriptor_prefix_kana) => binary | binary,
+ optional(:statement_descriptor_prefix_kanji) => binary | binary
+ }
)
(
@@ -333,7 +338,7 @@ defmodule Stripe.Account do
)
(
- @typedoc "An identifying document, either a passport or local ID card."
+ @typedoc "A document verifying the business."
@type document :: %{optional(:back) => binary, optional(:front) => binary}
)
@@ -591,8 +596,8 @@ defmodule Stripe.Account do
)
(
- @typedoc "Settings specific to the account's Treasury FinancialAccounts."
- @type treasury :: %{optional(:tos_acceptance) => tos_acceptance}
+ @typedoc "The treasury capability."
+ @type treasury :: %{optional(:requested) => boolean}
)
(
@@ -601,11 +606,8 @@ defmodule Stripe.Account do
)
(
- @typedoc "The individual's verification document information."
- @type verification :: %{
- optional(:additional_document) => additional_document,
- optional(:document) => document
- }
+ @typedoc "Information on the verification state of the company."
+ @type verification :: %{optional(:document) => document}
)
(
diff --git a/lib/generated/checkout__session.ex b/lib/generated/checkout__session.ex
index 081a72eb..031148fc 100644
--- a/lib/generated/checkout__session.ex
+++ b/lib/generated/checkout__session.ex
@@ -956,11 +956,8 @@ defmodule Stripe.Checkout.Session do
)
(
- @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
- }
+ @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}
)
(
diff --git a/lib/generated/credit_note.ex b/lib/generated/credit_note.ex
index f36d9d36..339591df 100644
--- a/lib/generated/credit_note.ex
+++ b/lib/generated/credit_note.ex
@@ -78,6 +78,7 @@ defmodule Stripe.CreditNote do
optional(:description) => binary,
optional(:invoice_line_item) => binary,
optional(:quantity) => integer,
+ optional(:tax_amounts) => list(tax_amounts) | binary,
optional(:tax_rates) => list(binary) | binary,
optional(:type) => :custom_line_item | :invoice_line_item,
optional(:unit_amount) => integer,
@@ -90,6 +91,15 @@ defmodule Stripe.CreditNote do
@type shipping_cost :: %{optional(:shipping_rate) => binary}
)
+ (
+ @typedoc nil
+ @type tax_amounts :: %{
+ optional(:amount) => integer,
+ optional(:tax_rate) => binary,
+ optional(:taxable_amount) => integer
+ }
+ )
+
(
nil
diff --git a/lib/generated/issuing__transaction.ex b/lib/generated/issuing__transaction.ex
index 677226b0..45fb26c3 100644
--- a/lib/generated/issuing__transaction.ex
+++ b/lib/generated/issuing__transaction.ex
@@ -19,6 +19,7 @@ defmodule Stripe.Issuing.Transaction do
:merchant_currency,
:merchant_data,
:metadata,
+ :network_data,
:object,
:purchase_details,
:token,
@@ -27,7 +28,7 @@ defmodule Stripe.Issuing.Transaction do
:wallet
]
- @typedoc "The `issuing.transaction` type.\n\n * `amount` The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `amount_details` Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `authorization` The `Authorization` object that led to this transaction.\n * `balance_transaction` ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.\n * `card` The card used to make this transaction.\n * `cardholder` The cardholder to whom this transaction belongs.\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 * `dispute` If you've disputed the transaction, the ID of the dispute.\n * `id` Unique identifier for the object.\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 * `merchant_amount` The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.\n * `merchant_currency` The currency with which the merchant is taking payment.\n * `merchant_data` \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 * `object` String representing the object's type. Objects of the same type share the same value.\n * `purchase_details` Additional purchase information that is optionally provided by the merchant.\n * `token` [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.\n * `treasury` [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts\n * `type` The nature of the transaction.\n * `wallet` The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.\n"
+ @typedoc "The `issuing.transaction` type.\n\n * `amount` The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `amount_details` Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `authorization` The `Authorization` object that led to this transaction.\n * `balance_transaction` ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.\n * `card` The card used to make this transaction.\n * `cardholder` The cardholder to whom this transaction belongs.\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 * `dispute` If you've disputed the transaction, the ID of the dispute.\n * `id` Unique identifier for the object.\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 * `merchant_amount` The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.\n * `merchant_currency` The currency with which the merchant is taking payment.\n * `merchant_data` \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 * `network_data` Details about the transaction, such as processing dates, set by the card network.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `purchase_details` Additional purchase information that is optionally provided by the merchant.\n * `token` [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.\n * `treasury` [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts\n * `type` The nature of the transaction.\n * `wallet` The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.\n"
@type t :: %__MODULE__{
amount: integer,
amount_details: term | nil,
@@ -44,6 +45,7 @@ defmodule Stripe.Issuing.Transaction do
merchant_currency: binary,
merchant_data: term,
metadata: term,
+ network_data: term | nil,
object: binary,
purchase_details: term | nil,
token: (binary | Stripe.Issuing.Token.t()) | nil,
diff --git a/lib/generated/line_item.ex b/lib/generated/line_item.ex
index d469f636..23cf21d8 100644
--- a/lib/generated/line_item.ex
+++ b/lib/generated/line_item.ex
@@ -58,6 +58,75 @@ defmodule Stripe.LineItem do
}
)
+ (
+ @typedoc nil
+ @type discounts :: %{optional(:coupon) => binary, optional(:discount) => binary}
+ )
+
+ (
+ @typedoc "The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details."
+ @type period :: %{optional(:end) => integer, optional(:start) => integer}
+ )
+
+ (
+ @typedoc "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline."
+ @type price_data :: %{
+ optional(:currency) => binary,
+ optional(:product) => binary,
+ optional(:product_data) => product_data,
+ optional(:tax_behavior) => :exclusive | :inclusive | :unspecified,
+ optional(:unit_amount) => integer,
+ optional(:unit_amount_decimal) => binary
+ }
+ )
+
+ (
+ @typedoc "Data used to generate a new product object inline. One of `product` or `product_data` is required."
+ @type product_data :: %{
+ optional(:description) => binary,
+ optional(:images) => list(binary),
+ optional(:metadata) => %{optional(binary) => binary},
+ optional(:name) => binary,
+ optional(:tax_code) => binary
+ }
+ )
+
+ (
+ @typedoc nil
+ @type tax_amounts :: %{
+ optional(:amount) => integer,
+ optional(:tax_rate_data) => tax_rate_data,
+ optional(:taxable_amount) => integer
+ }
+ )
+
+ (
+ @typedoc "Data to find or create a TaxRate object.\n\nStripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items."
+ @type tax_rate_data :: %{
+ optional(:country) => binary,
+ optional(:description) => binary,
+ optional(:display_name) => binary,
+ optional(:inclusive) => boolean,
+ optional(:jurisdiction) => binary,
+ optional(:percentage) => number,
+ optional(:state) => binary,
+ optional(:tax_type) =>
+ :amusement_tax
+ | :communications_tax
+ | :gst
+ | :hst
+ | :igst
+ | :jct
+ | :lease_tax
+ | :pst
+ | :qst
+ | :rst
+ | :sales_tax
+ | :service_tax
+ | :vat
+ }
+ )
+
(
nil
@@ -106,4 +175,72 @@ defmodule Stripe.LineItem do
end
)
)
+
+ (
+ nil
+
+ @doc "
Updates an invoice’s line item. Some fields, such as tax_amounts
, only live on the invoice line item,\nso they can only be updated through this endpoint. Other fields, such as amount
, live on both the invoice\nitem and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.\nUpdating an invoice’s line item is only possible before the invoice is finalized.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/invoices/{invoice}/lines/{line_item_id}`\n"
+ (
+ @spec update(
+ invoice :: binary(),
+ line_item_id :: binary(),
+ params :: %{
+ optional(:amount) => integer,
+ optional(:description) => binary,
+ optional(:discountable) => boolean,
+ optional(:discounts) => list(discounts) | binary,
+ optional(:expand) => list(binary),
+ optional(:metadata) => %{optional(binary) => binary} | binary,
+ optional(:period) => period,
+ optional(:price) => binary,
+ optional(:price_data) => price_data,
+ optional(:quantity) => integer,
+ optional(:tax_amounts) => list(tax_amounts) | binary,
+ optional(:tax_rates) => list(binary) | binary
+ },
+ opts :: Keyword.t()
+ ) :: {:ok, Stripe.LineItem.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
+ def update(invoice, line_item_id, params \\ %{}, opts \\ []) do
+ path =
+ Stripe.OpenApi.Path.replace_path_params(
+ "/v1/invoices/{invoice}/lines/{line_item_id}",
+ [
+ %OpenApiGen.Blueprint.Parameter{
+ in: "path",
+ name: "invoice",
+ required: true,
+ schema: %OpenApiGen.Blueprint.Parameter.Schema{
+ name: "invoice",
+ title: nil,
+ type: "string",
+ items: [],
+ properties: [],
+ any_of: []
+ }
+ },
+ %OpenApiGen.Blueprint.Parameter{
+ in: "path",
+ name: "line_item_id",
+ required: true,
+ schema: %OpenApiGen.Blueprint.Parameter.Schema{
+ name: "line_item_id",
+ title: nil,
+ type: "string",
+ items: [],
+ properties: [],
+ any_of: []
+ }
+ }
+ ],
+ [invoice, line_item_id]
+ )
+
+ Stripe.Request.new_request(opts)
+ |> Stripe.Request.put_endpoint(path)
+ |> Stripe.Request.put_params(params)
+ |> Stripe.Request.put_method(:post)
+ |> Stripe.Request.make_request()
+ end
+ )
+ )
end
diff --git a/lib/generated/payment_intent.ex b/lib/generated/payment_intent.ex
index 072f9034..6d478454 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}
)
(
@@ -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
+ }
)
(
@@ -282,38 +285,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}
)
(
@@ -374,8 +347,56 @@ defmodule Stripe.PaymentIntent do
)
(
- @typedoc "If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method."
- @type klarna :: %{optional(:dob) => dob}
+ @typedoc nil
+ @type klarna :: %{
+ optional(:capture_method) => :manual,
+ optional(:preferred_locale) =>
+ :"cs-CZ"
+ | :"da-DK"
+ | :"de-AT"
+ | :"de-CH"
+ | :"de-DE"
+ | :"el-GR"
+ | :"en-AT"
+ | :"en-AU"
+ | :"en-BE"
+ | :"en-CA"
+ | :"en-CH"
+ | :"en-CZ"
+ | :"en-DE"
+ | :"en-DK"
+ | :"en-ES"
+ | :"en-FI"
+ | :"en-FR"
+ | :"en-GB"
+ | :"en-GR"
+ | :"en-IE"
+ | :"en-IT"
+ | :"en-NL"
+ | :"en-NO"
+ | :"en-NZ"
+ | :"en-PL"
+ | :"en-PT"
+ | :"en-SE"
+ | :"en-US"
+ | :"es-ES"
+ | :"es-US"
+ | :"fi-FI"
+ | :"fr-BE"
+ | :"fr-CA"
+ | :"fr-CH"
+ | :"fr-FR"
+ | :"it-CH"
+ | :"it-IT"
+ | :"nb-NO"
+ | :"nl-BE"
+ | :"nl-NL"
+ | :"pl-PL"
+ | :"pt-PT"
+ | :"sv-FI"
+ | :"sv-SE",
+ optional(:setup_future_usage) => :none
+ }
)
(
@@ -404,12 +425,17 @@ defmodule Stripe.PaymentIntent do
)
(
- @typedoc "Additional fields for Mandate creation"
+ @typedoc "Configuration options for setting up an eMandate for cards issued in India."
@type mandate_options :: %{
- optional(:custom_mandate_url) => binary | binary,
- optional(:interval_description) => binary,
- optional(:payment_schedule) => :combined | :interval | :sporadic,
- optional(:transaction_type) => :business | :personal
+ 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)
}
)
@@ -613,7 +639,7 @@ defmodule Stripe.PaymentIntent do
)
(
- @typedoc "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information."
+ @typedoc "Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session)."
@type radar_options :: %{optional(:session) => binary}
)
diff --git a/lib/generated/setup_intent.ex b/lib/generated/setup_intent.ex
index 5d78c851..e8a6fe24 100644
--- a/lib/generated/setup_intent.ex
+++ b/lib/generated/setup_intent.ex
@@ -278,18 +278,13 @@ defmodule Stripe.SetupIntent 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(:currency) => binary,
- 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(: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/token.ex b/lib/generated/token.ex
index 43a44bd7..27f79a70 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
}
)
@@ -51,7 +52,7 @@ defmodule Stripe.Token do
)
(
- @typedoc "The Kana variation of the the individual's primary address (Japan only)."
+ @typedoc "The Kana variation of the company's primary address (Japan only)."
@type address_kana :: %{
optional(:city) => binary,
optional(:country) => binary,
@@ -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,
@@ -175,7 +176,7 @@ defmodule Stripe.Token do
)
(
- @typedoc "An identifying document, either a passport or local ID card."
+ @typedoc "A document verifying the business."
@type document :: %{optional(:back) => binary, optional(:front) => binary}
)
@@ -293,7 +294,7 @@ defmodule Stripe.Token do
)
(
- @typedoc "The individual's verification document information."
+ @typedoc "The person's verification status."
@type verification :: %{
optional(:additional_document) => additional_document,
optional(:document) => document
diff --git a/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json
index d692987c..07c1a755 100644
--- a/priv/openapi/spec3.sdk.json
+++ b/priv/openapi/spec3.sdk.json
@@ -19258,6 +19258,15 @@
"description": "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.",
"type": "object"
},
+ "network_data": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/issuing_transaction_network_data"
+ }
+ ],
+ "description": "Details about the transaction, such as processing dates, set by the card network.",
+ "nullable": true
+ },
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
@@ -19339,6 +19348,7 @@
"merchant_currency",
"merchant_data",
"metadata",
+ "network_data",
"object",
"purchase_details",
"type",
@@ -19354,6 +19364,7 @@
"cardholder",
"dispute",
"merchant_data",
+ "network_data",
"purchase_details",
"token",
"treasury"
@@ -23744,6 +23755,27 @@
"in_package": ""
}
},
+ "issuing_transaction_network_data": {
+ "description": "",
+ "properties": {
+ "processing_date": {
+ "description": "The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network.",
+ "maxLength": 5000,
+ "nullable": true,
+ "type": "string"
+ }
+ },
+ "required": [
+ "processing_date"
+ ],
+ "title": "IssuingTransactionNetworkData",
+ "type": "object",
+ "x-expandableFields": [],
+ "x-stripeResource": {
+ "class_name": "NetworkData",
+ "in_package": ""
+ }
+ },
"issuing_transaction_purchase_details": {
"description": "",
"properties": {
@@ -24805,6 +24837,13 @@
"method_type": "list",
"operation": "get",
"path": "/v1/invoices/{invoice}/lines"
+ },
+ {
+ "method_name": "update",
+ "method_on": "service",
+ "method_type": "update",
+ "operation": "post",
+ "path": "/v1/invoices/{invoice}/lines/{line_item_id}"
}
],
"x-stripeResource": {
@@ -31690,6 +31729,11 @@
"nullable": true,
"type": "string"
},
+ "capture_before": {
+ "description": "When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.",
+ "format": "unix-time",
+ "type": "integer"
+ },
"checks": {
"anyOf": [
{
@@ -71935,6 +71979,44 @@
"description": "The line item quantity to credit.",
"type": "integer"
},
+ "tax_amounts": {
+ "anyOf": [
+ {
+ "items": {
+ "properties": {
+ "amount": {
+ "description": "The amount, in cents (or local equivalent), of the tax.",
+ "type": "integer"
+ },
+ "tax_rate": {
+ "description": "The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "taxable_amount": {
+ "description": "The amount on which tax is calculated, in cents (or local equivalent).",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "amount",
+ "tax_rate",
+ "taxable_amount"
+ ],
+ "title": "tax_amount_with_tax_rate_param",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "enum": [
+ ""
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`."
+ },
"tax_rates": {
"anyOf": [
{
@@ -71951,7 +72033,7 @@
"type": "string"
}
],
- "description": "The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`."
+ "description": "The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`."
},
"type": {
"description": "Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`",
@@ -72148,6 +72230,44 @@
"description": "The line item quantity to credit.",
"type": "integer"
},
+ "tax_amounts": {
+ "anyOf": [
+ {
+ "items": {
+ "properties": {
+ "amount": {
+ "description": "The amount, in cents (or local equivalent), of the tax.",
+ "type": "integer"
+ },
+ "tax_rate": {
+ "description": "The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "taxable_amount": {
+ "description": "The amount on which tax is calculated, in cents (or local equivalent).",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "amount",
+ "tax_rate",
+ "taxable_amount"
+ ],
+ "title": "tax_amount_with_tax_rate_param",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "enum": [
+ ""
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`."
+ },
"tax_rates": {
"anyOf": [
{
@@ -72164,7 +72284,7 @@
"type": "string"
}
],
- "description": "The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`."
+ "description": "The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`."
},
"type": {
"description": "Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`",
@@ -72432,6 +72552,44 @@
"description": "The line item quantity to credit.",
"type": "integer"
},
+ "tax_amounts": {
+ "anyOf": [
+ {
+ "items": {
+ "properties": {
+ "amount": {
+ "description": "The amount, in cents (or local equivalent), of the tax.",
+ "type": "integer"
+ },
+ "tax_rate": {
+ "description": "The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "taxable_amount": {
+ "description": "The amount on which tax is calculated, in cents (or local equivalent).",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "amount",
+ "tax_rate",
+ "taxable_amount"
+ ],
+ "title": "tax_amount_with_tax_rate_param",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "enum": [
+ ""
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`."
+ },
"tax_rates": {
"anyOf": [
{
@@ -72448,7 +72606,7 @@
"type": "string"
}
],
- "description": "The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`."
+ "description": "The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`."
},
"type": {
"description": "Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`",
@@ -85917,6 +86075,390 @@
}
}
},
+ "/v1/invoices/{invoice}/lines/{line_item_id}": {
+ "post": {
+ "description": "Updates an invoice’s line item. Some fields, such as tax_amounts
, only live on the invoice line item,\nso they can only be updated through this endpoint. Other fields, such as amount
, live on both the invoice\nitem and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.\nUpdating an invoice’s line item is only possible before the invoice is finalized.
",
+ "operationId": "PostInvoicesInvoiceLinesLineItemId",
+ "parameters": [
+ {
+ "description": "Invoice ID of line item",
+ "in": "path",
+ "name": "invoice",
+ "required": true,
+ "schema": {
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "Invoice line item ID",
+ "in": "path",
+ "name": "line_item_id",
+ "required": true,
+ "schema": {
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "style": "simple"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/x-www-form-urlencoded": {
+ "encoding": {
+ "discounts": {
+ "explode": true,
+ "style": "deepObject"
+ },
+ "expand": {
+ "explode": true,
+ "style": "deepObject"
+ },
+ "metadata": {
+ "explode": true,
+ "style": "deepObject"
+ },
+ "period": {
+ "explode": true,
+ "style": "deepObject"
+ },
+ "price_data": {
+ "explode": true,
+ "style": "deepObject"
+ },
+ "tax_amounts": {
+ "explode": true,
+ "style": "deepObject"
+ },
+ "tax_rates": {
+ "explode": true,
+ "style": "deepObject"
+ }
+ },
+ "schema": {
+ "additionalProperties": false,
+ "properties": {
+ "amount": {
+ "description": "The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.",
+ "type": "integer"
+ },
+ "description": {
+ "description": "An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "discountable": {
+ "description": "Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.",
+ "type": "boolean"
+ },
+ "discounts": {
+ "anyOf": [
+ {
+ "items": {
+ "properties": {
+ "coupon": {
+ "description": "ID of the coupon to create a new discount for.",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "discount": {
+ "description": "ID of an existing discount on the object (or one of its ancestors) to reuse.",
+ "maxLength": 5000,
+ "type": "string"
+ }
+ },
+ "title": "discounts_data_param",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "enum": [
+ ""
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "The coupons & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts."
+ },
+ "expand": {
+ "description": "Specifies which fields in the response should be expanded.",
+ "items": {
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "metadata": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "enum": [
+ ""
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "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`."
+ },
+ "period": {
+ "description": "The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.",
+ "properties": {
+ "end": {
+ "description": "The end of the period, which must be greater than or equal to the start. This value is inclusive.",
+ "format": "unix-time",
+ "type": "integer"
+ },
+ "start": {
+ "description": "The start of the period. This value is inclusive.",
+ "format": "unix-time",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "end",
+ "start"
+ ],
+ "title": "period",
+ "type": "object"
+ },
+ "price": {
+ "description": "The ID of the price object.",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "price_data": {
+ "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.",
+ "properties": {
+ "currency": {
+ "description": "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).",
+ "type": "string"
+ },
+ "product": {
+ "description": "The ID of the product that this price will belong to. One of `product` or `product_data` is required.",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "product_data": {
+ "description": "Data used to generate a new product object inline. One of `product` or `product_data` is required.",
+ "properties": {
+ "description": {
+ "description": "The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.",
+ "maxLength": 40000,
+ "type": "string"
+ },
+ "images": {
+ "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "metadata": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "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`.",
+ "type": "object"
+ },
+ "name": {
+ "description": "The product's name, meant to be displayable to the customer.",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "tax_code": {
+ "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.",
+ "maxLength": 5000,
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "product_data",
+ "type": "object"
+ },
+ "tax_behavior": {
+ "description": "Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.",
+ "enum": [
+ "exclusive",
+ "inclusive",
+ "unspecified"
+ ],
+ "type": "string"
+ },
+ "unit_amount": {
+ "description": "A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.",
+ "type": "integer"
+ },
+ "unit_amount_decimal": {
+ "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.",
+ "format": "decimal",
+ "type": "string"
+ }
+ },
+ "required": [
+ "currency"
+ ],
+ "title": "one_time_price_data_with_product_data",
+ "type": "object"
+ },
+ "quantity": {
+ "description": "Non-negative integer. The quantity of units for the line item.",
+ "type": "integer"
+ },
+ "tax_amounts": {
+ "anyOf": [
+ {
+ "items": {
+ "properties": {
+ "amount": {
+ "description": "The amount, in cents (or local equivalent), of the tax.",
+ "type": "integer"
+ },
+ "tax_rate_data": {
+ "description": "Data to find or create a TaxRate object.\n\nStripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.",
+ "properties": {
+ "country": {
+ "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "description": {
+ "description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.",
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "display_name": {
+ "description": "The display name of the tax rate, which will be shown to users.",
+ "maxLength": 50,
+ "type": "string"
+ },
+ "inclusive": {
+ "description": "This specifies if the tax rate is inclusive or exclusive.",
+ "type": "boolean"
+ },
+ "jurisdiction": {
+ "description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.",
+ "maxLength": 50,
+ "type": "string"
+ },
+ "percentage": {
+ "description": "The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.",
+ "type": "number"
+ },
+ "state": {
+ "description": "[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.",
+ "maxLength": 2,
+ "type": "string"
+ },
+ "tax_type": {
+ "description": "The high-level tax type, such as `vat` or `sales_tax`.",
+ "enum": [
+ "amusement_tax",
+ "communications_tax",
+ "gst",
+ "hst",
+ "igst",
+ "jct",
+ "lease_tax",
+ "pst",
+ "qst",
+ "rst",
+ "sales_tax",
+ "service_tax",
+ "vat"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "display_name",
+ "inclusive",
+ "percentage"
+ ],
+ "title": "tax_rate_data_param",
+ "type": "object"
+ },
+ "taxable_amount": {
+ "description": "The amount on which tax is calculated, in cents (or local equivalent).",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "amount",
+ "tax_rate_data",
+ "taxable_amount"
+ ],
+ "title": "tax_amount_param",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "enum": [
+ ""
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts."
+ },
+ "tax_rates": {
+ "anyOf": [
+ {
+ "items": {
+ "maxLength": 5000,
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "enum": [
+ ""
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates."
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "required": false
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/line_item"
+ }
+ }
+ },
+ "description": "Successful response."
+ },
+ "default": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error"
+ }
+ }
+ },
+ "description": "Error response."
+ }
+ }
+ }
+ },
"/v1/invoices/{invoice}/mark_uncollectible": {
"post": {
"description": "Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
",
@@ -125462,6 +126004,7 @@
"type": "string"
},
{
+ "format": "unix-time",
"type": "integer"
}
],
@@ -126413,6 +126956,7 @@
"start_date": {
"anyOf": [
{
+ "format": "unix-time",
"type": "integer"
},
{
@@ -126927,6 +127471,7 @@
"end_date": {
"anyOf": [
{
+ "format": "unix-time",
"type": "integer"
},
{
@@ -127113,6 +127658,7 @@
"start_date": {
"anyOf": [
{
+ "format": "unix-time",
"type": "integer"
},
{
@@ -127150,6 +127696,7 @@
"trial_end": {
"anyOf": [
{
+ "format": "unix-time",
"type": "integer"
},
{