openapi: 3.0.0
info:
title: Stripe Accounts Account Lines API
description: This is an object representing a Stripe account. You can retrieve it to see properties on the account like its current requirements or if the account is enabled to make live charges or receive payouts.
contact:
email: dev-platform@stripe.com
name: Stripe Dev Platform Team
url: https://stripe.com
termsOfService: https://stripe.com/us/terms/
version: '2023-10-16'
x-stripeSpecFilename: spec3
servers:
- url: https://api.stripe.com/
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Lines
paths:
/v1/credit_notes/preview/lines:
get:
description: <p>When retrieving a credit note preview, you’ll get a <strong>lines</strong> property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.</p>
operationId: getCreditNotesPreviewLines
parameters:
- description: The integer amount in cents (or local equivalent) representing the total amount of the credit note.
in: query
name: amount
required: false
schema:
type: integer
style: form
- description: The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
in: query
name: credit_amount
required: false
schema:
type: integer
style: form
- description: The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
in: query
name: effective_at
required: false
schema:
format: unix-time
type: integer
style: form
- description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
in: query
name: ending_before
required: false
schema:
maxLength: 5000
type: string
style: form
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: ID of the invoice.
in: query
name: invoice
required: true
schema:
maxLength: 5000
type: string
style: form
- description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: Line items that make up the credit note.
explode: true
in: query
name: lines
required: false
schema:
items:
properties:
amount:
type: integer
description:
maxLength: 5000
type: string
invoice_line_item:
maxLength: 5000
type: string
quantity:
type: integer
tax_amounts:
anyOf:
- items:
properties:
amount:
type: integer
tax_rate:
maxLength: 5000
type: string
taxable_amount:
type: integer
required:
- amount
- tax_rate
- taxable_amount
title: tax_amount_with_tax_rate_param
type: object
type: array
- enum:
- ''
type: string
tax_rates:
anyOf:
- items:
maxLength: 5000
type: string
type: array
- enum:
- ''
type: string
type:
enum:
- custom_line_item
- invoice_line_item
type: string
unit_amount:
type: integer
unit_amount_decimal:
format: decimal
type: string
required:
- type
title: credit_note_line_item_params
type: object
type: array
style: deepObject
- description: The credit note's memo appears on the credit note PDF.
in: query
name: memo
required: false
schema:
maxLength: 5000
type: string
style: form
- 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`.
explode: true
in: query
name: metadata
required: false
schema:
additionalProperties:
type: string
type: object
style: deepObject
- description: The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
in: query
name: out_of_band_amount
required: false
schema:
type: integer
style: form
- description: Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
in: query
name: reason
required: false
schema:
enum:
- duplicate
- fraudulent
- order_change
- product_unsatisfactory
type: string
style: form
- description: ID of an existing refund to link this credit note to.
in: query
name: refund
required: false
schema:
type: string
style: form
- description: The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
in: query
name: refund_amount
required: false
schema:
type: integer
style: form
- description: When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
explode: true
in: query
name: shipping_cost
required: false
schema:
properties:
shipping_rate:
maxLength: 5000
type: string
title: credit_note_shipping_cost
type: object
style: deepObject
- description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
in: query
name: starting_after
required: false
schema:
maxLength: 5000
type: string
style: form
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetCreditNotesPreviewLinesRequest'
required: false
responses:
'200':
content:
application/json:
schema:
description: ''
x-expandableFields:
- data
$ref: '#/components/schemas/CreditNoteLinesList'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Get Credit Notes Preview Lines
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Lines
/v1/credit_notes/{credit_note}/lines:
get:
description: <p>When retrieving a credit note, you’ll get a <strong>lines</strong> property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.</p>
operationId: getCreditNotesCreditNoteLines
parameters:
- in: path
name: credit_note
required: true
schema:
maxLength: 5000
type: string
style: simple
- description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
in: query
name: ending_before
required: false
schema:
maxLength: 5000
type: string
style: form
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
in: query
name: starting_after
required: false
schema:
maxLength: 5000
type: string
style: form
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetCreditNotesCreditNoteLinesRequest'
required: false
responses:
'200':
content:
application/json:
schema:
description: ''
x-expandableFields:
- data
$ref: '#/components/schemas/CreditNoteLinesList'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Get Credit Notes Credit Note Lines
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Lines
/v1/invoices/upcoming/lines:
get:
description: <p>When retrieving an upcoming invoice, you’ll get a <strong>lines</strong> property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.</p>
operationId: getInvoicesUpcomingLines
parameters:
- description: Settings for automatic tax lookup for this invoice preview.
explode: true
in: query
name: automatic_tax
required: false
schema:
properties:
enabled:
type: boolean
required:
- enabled
title: automatic_tax_param
type: object
style: deepObject
- description: The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.
in: query
name: coupon
required: false
schema:
maxLength: 5000
type: string
style: form
- description: The currency to preview this invoice in. Defaults to that of `customer` if not specified.
in: query
name: currency
required: false
schema:
type: string
style: form
- description: The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
in: query
name: customer
required: false
schema:
maxLength: 5000
type: string
style: form
- description: Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
explode: true
in: query
name: customer_details
required: false
schema:
properties:
address:
anyOf:
- properties:
city:
maxLength: 5000
type: string
country:
maxLength: 5000
type: string
line1:
maxLength: 5000
type: string
line2:
maxLength: 5000
type: string
postal_code:
maxLength: 5000
type: string
state:
maxLength: 5000
type: string
title: optional_fields_address
type: object
- enum:
- ''
type: string
shipping:
anyOf:
- properties:
address:
properties:
city:
maxLength: 5000
type: string
country:
maxLength: 5000
type: string
line1:
maxLength: 5000
type: string
line2:
maxLength: 5000
type: string
postal_code:
maxLength: 5000
type: string
state:
maxLength: 5000
type: string
title: optional_fields_address
type: object
name:
maxLength: 5000
type: string
phone:
maxLength: 5000
type: string
required:
- address
- name
title: customer_shipping
type: object
- enum:
- ''
type: string
tax:
properties:
ip_address:
anyOf:
- type: string
- enum:
- ''
type: string
title: tax_param
type: object
tax_exempt:
enum:
- ''
- exempt
- none
- reverse
type: string
tax_ids:
items:
properties:
type:
enum:
- ad_nrt
- ae_trn
- ar_cuit
- au_abn
- au_arn
- bg_uic
- bo_tin
- br_cnpj
- br_cpf
- ca_bn
- ca_gst_hst
- ca_pst_bc
- ca_pst_mb
- ca_pst_sk
- ca_qst
- ch_vat
- cl_tin
- cn_tin
- co_nit
- cr_tin
- do_rcn
- ec_ruc
- eg_tin
- es_cif
- eu_oss_vat
- eu_vat
- gb_vat
- ge_vat
- hk_br
- hu_tin
- id_npwp
- il_vat
- in_gst
- is_vat
- jp_cn
- jp_rn
- jp_trn
- ke_pin
- kr_brn
- li_uid
- mx_rfc
- my_frp
- my_itn
- my_sst
- no_vat
- nz_gst
- pe_ruc
- ph_tin
- ro_tin
- rs_pib
- ru_inn
- ru_kpp
- sa_vat
- sg_gst
- sg_uen
- si_tin
- sv_nit
- th_vat
- tr_tin
- tw_vat
- ua_vat
- us_ein
- uy_ruc
- ve_rif
- vn_tin
- za_vat
maxLength: 5000
type: string
x-stripeBypassValidation: true
value:
type: string
required:
- type
- value
title: data_params
type: object
type: array
title: customer_details_param
type: object
style: deepObject
- description: The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.
explode: true
in: query
name: discounts
required: false
schema:
anyOf:
- items:
properties:
coupon:
maxLength: 5000
type: string
discount:
maxLength: 5000
type: string
title: discounts_data_param
type: object
type: array
- enum:
- ''
type: string
style: deepObject
- description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
in: query
name: ending_before
required: false
schema:
maxLength: 5000
type: string
style: form
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: List of invoice items to add or update in the upcoming invoice preview.
explode: true
in: query
name: invoice_items
required: false
schema:
items:
properties:
amount:
type: integer
currency:
type: string
description:
maxLength: 5000
type: string
discountable:
type: boolean
discounts:
anyOf:
- items:
properties:
coupon:
maxLength: 5000
type: string
discount:
maxLength: 5000
type: string
title: discounts_data_param
type: object
type: array
- enum:
- ''
type: string
invoiceitem:
maxLength: 5000
type: string
metadata:
anyOf:
- additionalProperties:
type: string
type: object
- enum:
- ''
type: string
period:
properties:
end:
format: unix-time
type: integer
start:
format: unix-time
type: integer
required:
- end
- start
title: period
type: object
price:
maxLength: 5000
type: string
price_data:
properties:
currency:
type: string
product:
maxLength: 5000
type: string
tax_behavior:
enum:
- exclusive
- inclusive
- unspecified
type: string
unit_amount:
type: integer
unit_amount_decimal:
format: decimal
type: string
required:
- currency
- product
title: one_time_price_data
type: object
quantity:
type: integer
tax_behavior:
enum:
- exclusive
- inclusive
- unspecified
type: string
tax_code:
anyOf:
- type: string
- enum:
- ''
type: string
tax_rates:
anyOf:
- items:
maxLength: 5000
type: string
type: array
- enum:
- ''
type: string
unit_amount:
type: integer
unit_amount_decimal:
format: decimal
type: string
title: invoice_item_preview_params
type: object
type: array
style: deepObject
- description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
in: query
name: schedule
required: false
schema:
maxLength: 5000
type: string
style: form
- description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
in: query
name: starting_after
required: false
schema:
maxLength: 5000
type: string
style: form
- description: The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
in: query
name: subscription
required: false
schema:
maxLength: 5000
type: string
style: form
- description: For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
explode: true
in: query
name: subscription_billing_cycle_anchor
required: false
schema:
anyOf:
- enum:
- now
- unchanged
maxLength: 5000
type: string
- format: unix-time
type: integer
style: deepObject
- description: A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
explode: true
in: query
name: subscription_cancel_at
required: false
schema:
anyOf:
- format: unix-time
type: integer
- enum:
- ''
type: string
style: deepObject
- description: Boolean indicating whether this subscription should cancel at the end of the current period.
in: query
name: subscription_cancel_at_period_end
required: false
schema:
type: boolean
style: form
- description: This simulates the subscription being canceled or expired immediately.
in: query
name: subscription_cancel_now
required: false
schema:
type: boolean
style: form
- description: If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
explode: true
in: query
name: subscription_default_tax_rates
required: false
schema:
anyOf:
- items:
maxLength: 5000
type: string
type: array
- enum:
- ''
type: string
style: deepObject
- description: A list of up to 20 subscription items, each with an attached price.
explode: true
in: query
name: subscription_items
required: false
schema:
items:
properties:
billing_thresholds:
anyOf:
- properties:
usage_gte:
type: integer
required:
- usage_gte
title: item_billing_thresholds_param
type: object
- enum:
- ''
type: string
clear_usage:
type: boolean
deleted:
type: boolean
id:
maxLength: 5000
type: string
metadata:
anyOf:
- additionalProperties:
type: string
type: object
- enum:
- ''
type: string
price:
maxLength: 5000
type: string
price_data:
properties:
currency:
type: string
product:
maxLength: 5000
type: string
recurring:
properties:
interval:
enum:
- day
- month
- week
- year
type: string
interval_count:
type: integer
required:
- interval
title: recurring_adhoc
type: object
tax_behavior:
enum:
- exclusive
- inclusive
- unspecified
type: string
unit_amount:
type: integer
unit_amount_decimal:
format: decimal
type: string
required:
- currency
- product
- recurring
title: recurring_price_data
type: object
quantity:
type: integer
tax_rates:
anyOf:
- items:
maxLength: 5000
type: string
type: array
- enum:
- ''
type: string
title: subscription_item_update_params
type: object
type: array
style: deepObject
- description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
in: query
name: subscription_proration_behavior
required: false
schema:
enum:
- always_invoice
- create_prorations
- none
type: string
style: form
- description: If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.
in: query
name: subscription_proration_date
required: false
schema:
format: unix-time
type: integer
style: form
- description: For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
in: query
name: subscription_resume_at
required: false
schema:
enum:
- now
maxLength: 5000
type: string
style: form
- description: Date a subscription is intended to start (can be future or past).
in: query
name: subscription_start_date
required: false
schema:
format: unix-
# --- truncated at 32 KB (89 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-lines-api-openapi.yml