postInvoicesInvoiceMarkUncollectible
Mark an invoice as uncollectible
Details
- Method:
POST - Path:
/v1/invoices/{invoice}/mark_uncollectible - Operation ID:
PostInvoicesInvoiceMarkUncollectible
Parameters
{
"invoice": {
"description": "",
"required": true,
"location": "path",
"type": "string"
}
}Response Schema
{
"description": "Invoices are statements of amounts owed by a customer, and are either\ngenerated one-off, or generated periodically from a subscription.\n\nThey contain [invoice items](https://api.stripe.com#invoiceitems), and proration adjustments\nthat may be caused by subscription upgrades/downgrades (if necessary).\n\nIf your invoice is configured to be billed through automatic charges,\nStripe automatically finalizes your invoice and attempts payment. Note\nthat finalizing the invoice,\n[when automatic](https://docs.stripe.com/invoicing/integration/automatic-advancement-collection), does\nnot happen immediately as the invoice is created. Stripe waits\nuntil one hour after the last webhook was successfully sent (or the last\nwebhook timed out after failing). If you (and the platforms you may have\nconnected to) have no webhooks configured, Stripe waits one hour after\ncreation to finalize the invoice.\n\nIf your invoice is configured to be billed by sending an email, then based on your\n[email settings](https://dashboard.stripe.com/account/billing/automatic),\nStripe will email the invoice to your customer and await payment. These\nemails can contain a link to a hosted page to pay the invoice.\n\nStripe applies any customer credit on the account before determining the\namount due for the invoice (i.e., the amount that will be actually\ncharged). If the amount due for the invoice is less than Stripe's [minimum allowed charge\nper currency](/docs/currencies#minimum-and-maximum-charge-amounts), the\ninvoice is automatically marked paid, and we add the amount due to the\ncustomer's credit balance which is applied to the next invoice.\n\nMore details on the customer's credit balance are\n[here](https://docs.stripe.com/billing/customer/balance).\n\nRelated guide: [Send invoices to customers](https://docs.stripe.com/billing/invoices/sending)",
"properties": {
"account_country": {
"description": "The country of the business associated with this invoice, most often the business creating the invoice.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"account_name": {
"description": "The public name of the business associated with this invoice, most often the business creating the invoice.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"account_tax_ids": {
"description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft.",
"items": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/tax_id"
},
{
"$ref": "#/components/schemas/deleted_tax_id"
}
],
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/tax_id"
},
{
"$ref": "#/components/schemas/deleted_tax_id"
}
]
}
},
"nullable": true,
"type": "array"
},
"amount_due": {
"description": "Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.",
"type": "integer"
},
"amount_overpaid": {
"description": "Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.",
"type": "integer"
},
"amount_paid": {
"description": "The amount, in cents (or local equivalent), that was paid.",
"type": "integer"
},
"amount_remaining": {
"description": "The difference between amount_due and amount_paid, in cents (or local equivalent).",
"type": "integer"
},
"amount_shipping": {
"description": "This is the sum of all the shipping amounts.",
"type": "integer"
},
"application": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
],
"description": "ID of the Connect Application that created the invoice.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
]
}
},
"attempt_count": {
"description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.",
"type": "integer"
},
"attempted": {
"description": "Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.",
"type": "boolean"
},
"auto_advance": {
"description": "Controls whether Stripe performs [automatic collection](https://docs.stripe.com/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.",
"type": "boolean"
},
"automatic_tax": {
"description": "",
"properties": {
"disabled_reason": {
"description": "If Stripe disabled automatic tax, this enum describes why.",
"enum": [
"finalization_requires_location_inputs",
"finalization_system_error"
],
"nullable": true,
"type": "string"
},
"enabled": {
"description": "Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://docs.stripe.com/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.",
"type": "boolean"
},
"liability": {
"anyOf": [
{
"$ref": "#/components/schemas/connect_account_reference"
}
],
"description": "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.",
"nullable": true
},
"provider": {
"description": "The tax provider powering automatic tax.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"status": {
"description": "The status of the most recent automated tax calculation for this invoice.",
"enum": [
"complete",
"failed",
"requires_location_inputs"
],
"nullable": true,
"type": "string"
}
},
"required": [
"enabled"
],
"title": "AutomaticTax",
"type": "object",
"x-expandableFields": [
"liability"
]
},
"automatically_finalizes_at": {
"description": "The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"billing_reason": {
"description": "Indicates the reason why the invoice was created.\n\n* `manual`: Unrelated to a subscription, for example, created via the invoice editor.\n* `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.\n* `subscription_create`: A new subscription was created.\n* `subscription_cycle`: A subscription advanced into a new period.\n* `subscription_threshold`: A subscription reached a billing threshold.\n* `subscription_update`: A subscription was updated.\n* `upcoming`: Reserved for upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription.",
"enum": [
"automatic_pending_invoice_item_invoice",
"manual",
"quote_accept",
"subscription",
"subscription_create",
"subscription_cycle",
"subscription_threshold",
"subscription_update",
"upcoming"
],
"nullable": true,
"type": "string"
},
"collection_method": {
"description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.",
"enum": [
"charge_automatically",
"send_invoice"
],
"type": "string"
},
"confirmation_secret": {
"anyOf": [
{
"$ref": "#/components/schemas/invoices_resource_confirmation_secret"
}
],
"description": "The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.",
"nullable": true
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"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).",
"format": "currency",
"type": "string"
},
"custom_fields": {
"description": "Custom fields displayed on the invoice.",
"items": {
"description": "",
"properties": {
"name": {
"description": "The name of the custom field.",
"maxLength": 5000,
"type": "string"
},
"value": {
"description": "The value of the custom field.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"name",
"value"
],
"title": "InvoiceSettingCustomField",
"type": "object",
"x-expandableFields": []
},
"nullable": true,
"type": "array"
},
"customer": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/customer"
},
{
"$ref": "#/components/schemas/deleted_customer"
}
],
"description": "The ID of the customer to bill.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/customer"
},
{
"$ref": "#/components/schemas/deleted_customer"
}
]
}
},
"customer_account": {
"description": "The ID of the account representing the customer to bill.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"customer_address": {
"anyOf": [
{
"$ref": "#/components/schemas/address"
}
],
"description": "The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.",
"nullable": true
},
"customer_email": {
"description": "The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"customer_name": {
"description": "The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"customer_phone": {
"description": "The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"customer_shipping": {
"anyOf": [
{
"$ref": "#/components/schemas/shipping"
}
],
"description": "The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated.",
"nullable": true
},
"customer_tax_exempt": {
"description": "The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.",
"enum": [
"exempt",
"none",
"reverse"
],
"nullable": true,
"type": "string"
},
"customer_tax_ids": {
"description": "The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.",
"items": {
"description": "",
"properties": {
"type": {
"description": "The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `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`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`",
"enum": [
"ad_nrt",
"ae_trn",
"al_tin",
"am_tin",
"ao_tin",
"ar_cuit",
"au_abn",
"au_arn",
"aw_tin",
"az_tin",
"ba_tin",
"bb_tin",
"bd_bin",
"bf_ifu",
"bg_uic",
"bh_vat",
"bj_ifu",
"bo_tin",
"br_cnpj",
"br_cpf",
"bs_tin",
"by_tin",
"ca_bn",
"ca_gst_hst",
"ca_pst_bc",
"ca_pst_mb",
"ca_pst_sk",
"ca_qst",
"cd_nif",
"ch_uid",
"ch_vat",
"cl_tin",
"cm_niu",
"cn_tin",
"co_nit",
"cr_tin",
"cv_nif",
"de_stn",
"do_rcn",
"ec_ruc",
"eg_tin",
"es_cif",
"et_tin",
"eu_oss_vat",
"eu_vat",
"gb_vat",
"ge_vat",
"gn_nif",
"hk_br",
"hr_oib",
"hu_tin",
"id_npwp",
"il_vat",
"in_gst",
"is_vat",
"jp_cn",
"jp_rn",
"jp_trn",
"ke_pin",
"kg_tin",
"kh_tin",
"kr_brn",
"kz_bin",
"la_tin",
"li_uid",
"li_vat",
"ma_vat",
"md_vat",
"me_pib",
"mk_vat",
"mr_nif",
"mx_rfc",
"my_frp",
"my_itn",
"my_sst",
"ng_tin",
"no_vat",
"no_voec",
"np_pan",
"nz_gst",
"om_vat",
"pe_ruc",
"ph_tin",
"ro_tin",
"rs_pib",
"ru_inn",
"ru_kpp",
"sa_vat",
"sg_gst",
"sg_uen",
"si_tin",
"sn_ninea",
"sr_fin",
"sv_nit",
"th_vat",
"tj_tin",
"tr_tin",
"tw_vat",
"tz_vat",
"ua_vat",
"ug_tin",
"unknown",
"us_ein",
"uy_ruc",
"uz_tin",
"uz_vat",
"ve_rif",
"vn_tin",
"za_vat",
"zm_tin",
"zw_tin"
],
"type": "string"
},
"value": {
"description": "The value of the tax ID.",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"required": [
"type"
],
"title": "InvoicesResourceInvoiceTaxID",
"type": "object",
"x-expandableFields": []
},
"nullable": true,
"type": "array"
},
"default_payment_method": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/payment_method"
}
],
"description": "ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_method"
}
]
}
},
"default_source": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/bank_account"
},
{
"$ref": "#/components/schemas/card"
},
{
"$ref": "#/components/schemas/source"
}
],
"description": "ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/bank_account"
},
{
"$ref": "#/components/schemas/card"
},
{
"$ref": "#/components/schemas/source"
}
]
},
"x-stripeBypassValidation": true
},
"default_tax_rates": {
"description": "The tax rates applied to this invoice, if any.",
"items": {
"description": "Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.\n\nRelated guide: [Tax rates](/billing/taxes/tax-rates)",
"properties": {
"active": {
"description": "Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.",
"type": "boolean"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"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,
"nullable": true,
"type": "string"
},
"display_name": {
"description": "The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.",
"maxLength": 5000,
"type": "string"
},
"effective_percentage": {
"description": "Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,\nthis percentage reflects the rate actually used to calculate tax based on the product's taxability\nand whether the user is registered to collect taxes in the corresponding jurisdiction.",
"nullable": true,
"type": "number"
},
"flat_amount": {
"anyOf": [
{
"$ref": "#/components/schemas/tax_rate_flat_amount"
}
],
"description": "The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.",
"nullable": true
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"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": 5000,
"nullable": true,
"type": "string"
},
"jurisdiction_level": {
"description": "The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.",
"enum": [
"city",
"country",
"county",
"district",
"multiple",
"state"
],
"nullable": true,
"type": "string"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
"nullable": true,
"type": "object"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"tax_rate"
],
"type": "string"
},
"percentage": {
"description": "Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.",
"type": "number"
},
"rate_type": {
"description": "Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.",
"enum": [
"flat_amount",
"percentage"
],
"nullable": true,
"type": "string"
},
"state": {
"description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, \"NY\" for New York, United States.",
"maxLength": 5000,
"nullable": true,
"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",
"retail_delivery_fee",
"rst",
"sales_tax",
"service_tax",
"vat"
],
"nullable": true,
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"active",
"created",
"display_name",
"id",
"inclusive",
"livemode",
"object",
"percentage"
],
"title": "TaxRate",
"type": "object",
"x-expandableFields": [
"flat_amount"
],
"x-resourceId": "tax_rate"
},
"type": "array"
},
"description": {
"description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"discounts": {
"description": "The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.",
"items": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
],
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
]
}
},
"type": "array"
},
"due_date": {
"description": "The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"effective_at": {
"description": "The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"ending_balance": {
"description": "Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.",
"nullable": true,
"type": "integer"
},
"footer": {
"description": "Footer displayed on the invoice.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"from_invoice": {
"anyOf": [
{
"$ref": "#/components/schemas/invoices_resource_from_invoice"
}
],
"description": "Details of the invoice that was cloned. See the [revision documentation](https://docs.stripe.com/invoicing/invoice-revisions) for more details.",
"nullable": true
},
"hosted_invoice_url": {
"description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"id": {
"description": "Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`.",
"maxLength": 5000,
"type": "string"
},
"invoice_pdf": {
"description": "The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"issuer": {
"description": "",
"properties": {
"account": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/account"
}
],
"description": "The connected account being referenced when `type` is `account`.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/account"
}
]
}
},
"type": {
"description": "Type of the account referenced.",
"enum": [
"account",
"self"
],
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"type"
],
"title": "ConnectAccountReference",
"type": "object",
"x-expandableFields": [
"account"
]
},
"last_finalization_error": {
"anyOf": [
{
"$ref": "#/components/schemas/api_errors"
}
],
"description": "The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.",
"nullable": true
},
"latest_revision": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/invoice"
}
],
"description": "The ID of the most recent non-draft revision of this invoice",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/invoice"
}
]
}
},
"lines": {
"description": "The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.",
"properties": {
"data": {
"description": "Details about each object.",
"items": {
"description": "Invoice Line Items represent the individual lines within an [invoice](https://docs.stripe.com/api/invoices) and only exist within the context of an invoice.\n\nEach line item is backed by either an [invoice item](https://docs.stripe.com/api/invoiceitems) or a [subscription item](https://docs.stripe.com/api/subscription_items).",
"properties": {
"amount": {
"description": "The amount, in cents (or local equivalent).",
"type": "integer"
},
"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).",
"format": "currency",
"type": "string"
},
"description": {
"description": "An arbitrary string attached to the object. Often useful for displaying to users.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"discount_amounts": {
"description": "The amount of discount calculated per discount for this line item.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "The amount, in cents (or local equivalent), of the discount.",
"type": "integer"
},
"discount": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
],
"description": "The discount that was applied to get this discount amount.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
]
}
}
},
"required": [
"amount",
"discount"
],
"title": "DiscountsResourceDiscountAmount",
"type": "object",
"x-expandableFields": [
"discount"
]
},
"nullable": true,
"type": "array"
},
"discountable": {
"description": "If true, discounts will apply to this line item. Always false for prorations.",
"type": "boolean"
},
"discounts": {
"description": "The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.",
"items": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/discount"
}
],
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
}
]
}
},
"type": "array"
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"invoice": {
"description": "The ID of the invoice that contains this line item.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.",
"type": "object"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"line_item"
],
"type": "string"
},
"parent": {
"anyOf": [
{
"$ref": "#/components/schemas/billing_bill_resource_invoicing_lines_parents_invoice_line_item_parent"
}
],
"description": "The parent that generated this line item.",
"nullable": true
},
"period": {
"description": "",
"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": "InvoiceLineItemPeriod",
"type": "object",
"x-expandableFields": []
},
"pretax_credit_amounts": {
"description": "Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "The amount, in cents (or local equivalent), of the pretax credit amount.",
"type": "integer"
},
"credit_balance_transaction": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/billing.credit_balance_transaction"
}
],
"description": "The credit balance transaction that was applied to get this pretax credit amount.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/billing.credit_balance_transaction"
}
]
}
},
"discount": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
],
"description": "The discount that was applied to get this pretax credit amount.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
]
}
},
"type": {
"description": "Type of the pretax credit amount referenced.",
"enum": [
"credit_balance_transaction",
"discount"
],
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"amount",
"type"
],
"title": "InvoicesResourcePretaxCreditAmount",
"type": "object",
"x-expandableFields": [
"credit_balance_transaction",
"discount"
]
},
"nullable": true,
"type": "array"
},
"pricing": {
"anyOf": [
{
"$ref": "#/components/schemas/billing_bill_resource_invoicing_pricing_pricing"
}
],
"description": "The pricing information of the line item.",
"nullable": true
},
"quantity": {
"description": "The quantity of the subscription, if the line item is a subscription or a proration.",
"nullable": true,
"type": "integer"
},
"subscription": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/subscription"
}
],
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/subscription"
}
]
}
},
"subtotal": {
"description": "The subtotal of the line item, in cents (or local equivalent), before any discounts or taxes.",
"type": "integer"
},
"taxes": {
"description": "The tax information of the line item.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "The amount of the tax, in cents (or local equivalent).",
"type": "integer"
},
"tax_behavior": {
"description": "Whether this tax is inclusive or exclusive.",
"enum": [
"exclusive",
"inclusive"
],
"type": "string"
},
"tax_rate_details": {
"anyOf": [
{
"$ref": "#/components/schemas/billing_bill_resource_invoicing_taxes_tax_rate_details"
}
],
"description": "Additional details about the tax rate. Only present when `type` is `tax_rate_details`.",
"nullable": true
},
"taxability_reason": {
"description": "The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.",
"enum": [
"customer_exempt",
"not_available",
"not_collecting",
"not_subject_to_tax",
"not_supported",
"portion_product_exempt",
"portion_reduced_rated",
"portion_standard_rated",
"product_exempt",
"product_exempt_holiday",
"proportionally_rated",
"reduced_rated",
"reverse_charge",
"standard_rated",
"taxable_basis_reduced",
"zero_rated"
],
"type": "string",
"x-stripeBypassValidation": true
},
"taxable_amount": {
"description": "The amount on which tax is calculated, in cents (or local equivalent).",
"nullable": true,
"type": "integer"
},
"type": {
"description": "The type of tax information.",
"enum": [
"tax_rate_details"
],
"type": "string"
}
},
"required": [
"amount",
"tax_behavior",
"taxability_reason",
"type"
],
"title": "BillingBillResourceInvoicingTaxesTax",
"type": "object",
"x-expandableFields": [
"tax_rate_details"
]
},
"nullable": true,
"type": "array"
}
},
"required": [
"amount",
"currency",
"discountable",
"discounts",
"id",
"livemode",
"metadata",
"object",
"period",
"subtotal"
],
"title": "InvoiceLineItem",
"type": "object",
"x-expandableFields": [
"discount_amounts",
"discounts",
"parent",
"period",
"pretax_credit_amounts",
"pricing",
"subscription",
"taxes"
],
"x-resourceId": "line_item"
},
"type": "array"
},
"has_more": {
"description": "True if this list has another page of items after this one that can be fetched.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
"enum": [
"list"
],
"type": "string"
},
"url": {
"description": "The URL where this list can be accessed.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"data",
"has_more",
"object",
"url"
],
"title": "InvoiceLinesList",
"type": "object",
"x-expandableFields": [
"data"
]
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
"nullable": true,
"type": "object"
},
"next_payment_attempt": {
"description": "The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"number": {
"description": "A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"invoice"
],
"type": "string"
},
"on_behalf_of": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/account"
}
],
"description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://docs.stripe.com/billing/invoices/connect) documentation for details.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/account"
}
]
}
},
"parent": {
"anyOf": [
{
"$ref": "#/components/schemas/billing_bill_resource_invoicing_parents_invoice_parent"
}
],
"description": "The parent that generated this invoice",
"nullable": true
},
"payment_settings": {
"description": "",
"properties": {
"default_mandate": {
"description": "ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"payment_method_options": {
"anyOf": [
{
"$ref": "#/components/schemas/invoices_payment_method_options"
}
],
"description": "Payment-method-specific configuration to provide to the invoice’s PaymentIntent.",
"nullable": true
},
"payment_method_types": {
"description": "The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).",
"items": {
"enum": [
"ach_credit_transfer",
"ach_debit",
"acss_debit",
"affirm",
"amazon_pay",
"au_becs_debit",
"bacs_debit",
"bancontact",
"boleto",
"card",
"cashapp",
"crypto",
"custom",
"customer_balance",
"eps",
"fpx",
"giropay",
"grabpay",
"ideal",
"jp_credit_transfer",
"kakao_pay",
"klarna",
"konbini",
"kr_card",
"link",
"multibanco",
"naver_pay",
"nz_bank_account",
"p24",
"payco",
"paynow",
"paypal",
"payto",
"promptpay",
"revolut_pay",
"sepa_credit_transfer",
"sepa_debit",
"sofort",
"swish",
"us_bank_account",
"wechat_pay"
],
"type": "string",
"x-stripeBypassValidation": true
},
"nullable": true,
"type": "array"
}
},
"title": "InvoicesPaymentSettings",
"type": "object",
"x-expandableFields": [
"payment_method_options"
]
},
"payments": {
"description": "Payments for this invoice",
"properties": {
"data": {
"description": "Details about each object.",
"items": {
"description": "Invoice Payments represent payments made against invoices. Invoice Payments can\nbe accessed in two ways:\n1. By expanding the `payments` field on the [Invoice](https://api.stripe.com#invoice) resource.\n2. By using the Invoice Payment retrieve and list endpoints.\n\nInvoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices.\nThis resource and its endpoints allows you to easily track if a payment is associated with a specific invoice and\nmonitor the allocation details of the payments.",
"properties": {
"amount_paid": {
"description": "Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to.",
"nullable": true,
"type": "integer"
},
"amount_requested": {
"description": "Amount intended to be paid toward this invoice, in cents (or local equivalent)",
"type": "integer"
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"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).",
"maxLength": 5000,
"type": "string"
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"invoice": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/invoice"
},
{
"$ref": "#/components/schemas/deleted_invoice"
}
],
"description": "The invoice that was paid.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/invoice"
},
{
"$ref": "#/components/schemas/deleted_invoice"
}
]
}
},
"is_default": {
"description": "Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly.",
"type": "boolean"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"invoice_payment"
],
"type": "string"
},
"payment": {
"description": "",
"properties": {
"charge": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/charge"
}
],
"description": "ID of the successful charge for this payment when `type` is `charge`.Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/charge"
}
]
}
},
"payment_intent": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/payment_intent"
}
],
"description": "ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_intent"
}
]
}
},
"payment_record": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/payment_record"
}
],
"description": "ID of the PaymentRecord associated with this payment when `type` is `payment_record`.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_record"
}
]
}
},
"type": {
"description": "Type of payment object associated with this invoice payment.",
"enum": [
"charge",
"payment_intent",
"payment_record"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "InvoicesPaymentsInvoicePaymentAssociatedPayment",
"type": "object",
"x-expandableFields": [
"charge",
"payment_intent",
"payment_record"
]
},
"status": {
"description": "The status of the payment, one of `open`, `paid`, or `canceled`.",
"maxLength": 5000,
"type": "string"
},
"status_transitions": {
"description": "",
"properties": {
"canceled_at": {
"description": "The time that the payment was canceled.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"paid_at": {
"description": "The time that the payment succeeded.",
"format": "unix-time",
"nullable": true,
"type": "integer"
}
},
"title": "InvoicesPaymentsInvoicePaymentStatusTransitions",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"amount_requested",
"created",
"currency",
"id",
"invoice",
"is_default",
"livemode",
"object",
"payment",
"status",
"status_transitions"
],
"title": "InvoicesInvoicePayment",
"type": "object",
"x-expandableFields": [
"invoice",
"payment",
"status_transitions"
],
"x-resourceId": "invoice_payment"
},
"type": "array"
},
"has_more": {
"description": "True if this list has another page of items after this one that can be fetched.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
"enum": [
"list"
],
"type": "string"
},
"url": {
"description": "The URL where this list can be accessed.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"data",
"has_more",
"object",
"url"
],
"title": "InvoicesPaymentsListInvoicePayments",
"type": "object",
"x-expandableFields": [
"data"
]
},
"period_end": {
"description": "End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.",
"format": "unix-time",
"type": "integer"
},
"period_start": {
"description": "Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.",
"format": "unix-time",
"type": "integer"
},
"post_payment_credit_notes_amount": {
"description": "Total amount of all post-payment credit notes issued for this invoice.",
"type": "integer"
},
"pre_payment_credit_notes_amount": {
"description": "Total amount of all pre-payment credit notes issued for this invoice.",
"type": "integer"
},
"receipt_number": {
"description": "This is the transaction number that appears on email receipts sent for this invoice.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"rendering": {
"anyOf": [
{
"$ref": "#/components/schemas/invoices_resource_invoice_rendering"
}
],
"description": "The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.",
"nullable": true
},
"shipping_cost": {
"anyOf": [
{
"$ref": "#/components/schemas/invoices_resource_shipping_cost"
}
],
"description": "The details of the cost of shipping, including the ShippingRate applied on the invoice.",
"nullable": true
},
"shipping_details": {
"anyOf": [
{
"$ref": "#/components/schemas/shipping"
}
],
"description": "Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.",
"nullable": true
},
"starting_balance": {
"description": "Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.",
"type": "integer"
},
"statement_descriptor": {
"description": "Extra information about an invoice for the customer's credit card statement.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"status": {
"description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://docs.stripe.com/billing/invoices/workflow#workflow-overview)",
"enum": [
"draft",
"open",
"paid",
"uncollectible",
"void"
],
"nullable": true,
"type": "string",
"x-stripeBypassValidation": true
},
"status_transitions": {
"description": "",
"properties": {
"finalized_at": {
"description": "The time that the invoice draft was finalized.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"marked_uncollectible_at": {
"description": "The time that the invoice was marked uncollectible.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"paid_at": {
"description": "The time that the invoice was paid.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"voided_at": {
"description": "The time that the invoice was voided.",
"format": "unix-time",
"nullable": true,
"type": "integer"
}
},
"title": "InvoicesResourceStatusTransitions",
"type": "object",
"x-expandableFields": []
},
"subtotal": {
"description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated",
"type": "integer"
},
"subtotal_excluding_tax": {
"description": "The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated",
"nullable": true,
"type": "integer"
},
"test_clock": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
],
"description": "ID of the test clock this invoice belongs to.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
]
}
},
"threshold_reason": {
"description": "",
"properties": {
"amount_gte": {
"description": "The total invoice amount threshold boundary if it triggered the threshold invoice.",
"nullable": true,
"type": "integer"
},
"item_reasons": {
"description": "Indicates which line items triggered a threshold invoice.",
"items": {
"description": "",
"properties": {
"line_item_ids": {
"description": "The IDs of the line items that triggered the threshold invoice.",
"items": {
"maxLength": 5000,
"type": "string"
},
"type": "array"
},
"usage_gte": {
"description": "The quantity threshold boundary that applied to the given line item.",
"type": "integer"
}
},
"required": [
"line_item_ids",
"usage_gte"
],
"title": "InvoiceItemThresholdReason",
"type": "object",
"x-expandableFields": []
},
"type": "array"
}
},
"required": [
"item_reasons"
],
"title": "InvoiceThresholdReason",
"type": "object",
"x-expandableFields": [
"item_reasons"
]
},
"total": {
"description": "Total after discounts and taxes.",
"type": "integer"
},
"total_discount_amounts": {
"description": "The aggregate amounts calculated per discount across all line items.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "The amount, in cents (or local equivalent), of the discount.",
"type": "integer"
},
"discount": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
],
"description": "The discount that was applied to get this discount amount.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
]
}
}
},
"required": [
"amount",
"discount"
],
"title": "DiscountsResourceDiscountAmount",
"type": "object",
"x-expandableFields": [
"discount"
]
},
"nullable": true,
"type": "array"
},
"total_excluding_tax": {
"description": "The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.",
"nullable": true,
"type": "integer"
},
"total_pretax_credit_amounts": {
"description": "Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "The amount, in cents (or local equivalent), of the pretax credit amount.",
"type": "integer"
},
"credit_balance_transaction": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/billing.credit_balance_transaction"
}
],
"description": "The credit balance transaction that was applied to get this pretax credit amount.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/billing.credit_balance_transaction"
}
]
}
},
"discount": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
],
"description": "The discount that was applied to get this pretax credit amount.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
},
{
"$ref": "#/components/schemas/deleted_discount"
}
]
}
},
"type": {
"description": "Type of the pretax credit amount referenced.",
"enum": [
"credit_balance_transaction",
"discount"
],
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"amount",
"type"
],
"title": "InvoicesResourcePretaxCreditAmount",
"type": "object",
"x-expandableFields": [
"credit_balance_transaction",
"discount"
]
},
"nullable": true,
"type": "array"
},
"total_taxes": {
"description": "The aggregate tax information of all line items.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "The amount of the tax, in cents (or local equivalent).",
"type": "integer"
},
"tax_behavior": {
"description": "Whether this tax is inclusive or exclusive.",
"enum": [
"exclusive",
"inclusive"
],
"type": "string"
},
"tax_rate_details": {
"anyOf": [
{
"$ref": "#/components/schemas/billing_bill_resource_invoicing_taxes_tax_rate_details"
}
],
"description": "Additional details about the tax rate. Only present when `type` is `tax_rate_details`.",
"nullable": true
},
"taxability_reason": {
"description": "The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.",
"enum": [
"customer_exempt",
"not_available",
"not_collecting",
"not_subject_to_tax",
"not_supported",
"portion_product_exempt",
"portion_reduced_rated",
"portion_standard_rated",
"product_exempt",
"product_exempt_holiday",
"proportionally_rated",
"reduced_rated",
"reverse_charge",
"standard_rated",
"taxable_basis_reduced",
"zero_rated"
],
"type": "string",
"x-stripeBypassValidation": true
},
"taxable_amount": {
"description": "The amount on which tax is calculated, in cents (or local equivalent).",
"nullable": true,
"type": "integer"
},
"type": {
"description": "The type of tax information.",
"enum": [
"tax_rate_details"
],
"type": "string"
}
},
"required": [
"amount",
"tax_behavior",
"taxability_reason",
"type"
],
"title": "BillingBillResourceInvoicingTaxesTax",
"type": "object",
"x-expandableFields": [
"tax_rate_details"
]
},
"nullable": true,
"type": "array"
},
"webhooks_delivered_at": {
"description": "Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://docs.stripe.com/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.",
"format": "unix-time",
"nullable": true,
"type": "integer"
}
},
"required": [
"amount_due",
"amount_overpaid",
"amount_paid",
"amount_remaining",
"amount_shipping",
"attempt_count",
"attempted",
"auto_advance",
"automatic_tax",
"collection_method",
"created",
"currency",
"customer",
"default_tax_rates",
"discounts",
"id",
"issuer",
"lines",
"livemode",
"object",
"payment_settings",
"period_end",
"period_start",
"post_payment_credit_notes_amount",
"pre_payment_credit_notes_amount",
"starting_balance",
"status_transitions",
"subtotal",
"total"
],
"title": "Invoice",
"type": "object",
"x-expandableFields": [
"account_tax_ids",
"application",
"automatic_tax",
"confirmation_secret",
"custom_fields",
"customer",
"customer_address",
"customer_shipping",
"customer_tax_ids",
"default_payment_method",
"default_source",
"default_tax_rates",
"discounts",
"from_invoice",
"issuer",
"last_finalization_error",
"latest_revision",
"lines",
"on_behalf_of",
"parent",
"payment_settings",
"payments",
"rendering",
"shipping_cost",
"shipping_details",
"status_transitions",
"test_clock",
"threshold_reason",
"total_discount_amounts",
"total_pretax_credit_amounts",
"total_taxes"
],
"x-resourceId": "invoice"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('stripe')
# Call this tool
result = await agent.call_tool('postInvoicesInvoiceMarkUncollectible', {
# Add required parameters here
})