Stripe · Capability
Stripe Invoice API — Lines
Stripe Invoice API — Lines. 3 operations. Lead operation: Stripe Get Invoices Upcoming Lines. Self-contained Naftiko capability covering one Stripe business surface.
What You Can Do
GET
Getinvoicesupcominglines
— Stripe Get Invoices Upcoming Lines
/v1/v1/invoices/upcoming/lines
GET
Getinvoicesinvoicelines
— Stripe Get Invoices Invoice Lines
/v1/v1/invoices/{invoice}/lines
POST
Postinvoicesinvoicelineslineitemid
— Stripe Post Invoices Invoice Lines Line Item Id
/v1/v1/invoices/{invoice}/lines/{line-item-id}
MCP Tools
stripe-get-invoices-upcoming-lines
Stripe Get Invoices Upcoming Lines
read-only
idempotent
stripe-get-invoices-invoice-lines
Stripe Get Invoices Invoice Lines
read-only
idempotent
stripe-post-invoices-invoice-lines
Stripe Post Invoices Invoice Lines Line Item Id
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Stripe Invoice API — Lines
description: 'Stripe Invoice API — Lines. 3 operations. Lead operation: Stripe Get Invoices Upcoming Lines. Self-contained
Naftiko capability covering one Stripe business surface.'
tags:
- Stripe
- Lines
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
STRIPE_API_KEY: STRIPE_API_KEY
capability:
consumes:
- type: http
namespace: invoice-lines
baseUri: https://api.stripe.com
description: Stripe Invoice API — Lines business capability. Self-contained, no shared references.
resources:
- name: v1-invoices-upcoming-lines
path: /v1/invoices/upcoming/lines
operations:
- name: getinvoicesupcominglines
method: GET
description: Stripe Get Invoices Upcoming Lines
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: automatic_tax
in: query
type: object
description: Settings for automatic tax lookup for this invoice preview.
- name: coupon
in: query
type: string
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 wi
- name: currency
in: query
type: string
description: The currency to preview this invoice in. Defaults to that of `customer` if not specified.
- name: customer
in: query
type: string
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`, `subscri
- name: customer_details
in: query
type: object
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`, '
- name: discounts
in: query
type: string
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 cou
- name: ending_before
in: query
type: string
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 ob
- name: expand
in: query
type: array
description: Specifies which fields in the response should be expanded.
- name: invoice_items
in: query
type: array
description: List of invoice items to add or update in the upcoming invoice preview.
- name: limit
in: query
type: integer
description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default
is 10.
- name: schedule
in: query
type: string
description: The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription
or subscription fields.
- name: starting_after
in: query
type: string
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 o
- name: subscription
in: query
type: string
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 prev
- name: subscription_billing_cycle_anchor
in: query
type: string
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 det
- name: subscription_cancel_at
in: query
type: string
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 enable
- name: subscription_cancel_at_period_end
in: query
type: boolean
description: Boolean indicating whether this subscription should cancel at the end of the current period.
- name: subscription_cancel_now
in: query
type: boolean
description: This simulates the subscription being canceled or expired immediately.
- name: subscription_default_tax_rates
in: query
type: string
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 it
- name: subscription_items
in: query
type: array
description: A list of up to 20 subscription items, each with an attached price.
- name: subscription_proration_behavior
in: query
type: string
description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations)
when the billing cycle changes (e.g., when switching plans
- name: subscription_proration_date
in: query
type: integer
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 don
- name: subscription_resume_at
in: query
type: string
description: For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will
be generated if the subscription is resumed.
- name: subscription_start_date
in: query
type: integer
description: Date a subscription is intended to start (can be future or past).
- name: subscription_trial_end
in: query
type: string
description: If provided, the invoice returned will preview updating or creating a subscription with that trial
end. If set, one of `subscription_items` or `subscription` is
- name: subscription_trial_from_plan
in: query
type: boolean
description: Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end`
per subscription is preferred, and this defaul
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: v1-invoices-invoice-lines
path: /v1/invoices/{invoice}/lines
operations:
- name: getinvoicesinvoicelines
method: GET
description: Stripe Get Invoices Invoice Lines
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: ending_before
in: query
type: string
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 ob
- name: expand
in: query
type: array
description: Specifies which fields in the response should be expanded.
- name: invoice
in: path
type: string
required: true
- name: limit
in: query
type: integer
description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default
is 10.
- name: starting_after
in: query
type: string
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 o
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: v1-invoices-invoice-lines-line_item_id
path: /v1/invoices/{invoice}/lines/{line_item_id}
operations:
- name: postinvoicesinvoicelineslineitemid
method: POST
description: Stripe Post Invoices Invoice Lines Line Item Id
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: invoice
in: path
type: string
description: Invoice ID of line item
required: true
- name: line_item_id
in: path
type: string
description: Invoice line item ID
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: false
authentication:
type: bearer
token: '{{env.STRIPE_API_KEY}}'
exposes:
- type: rest
namespace: invoice-lines-rest
port: 8080
description: REST adapter for Stripe Invoice API — Lines. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/v1/invoices/upcoming/lines
name: v1-invoices-upcoming-lines
description: REST surface for v1-invoices-upcoming-lines.
operations:
- method: GET
name: getinvoicesupcominglines
description: Stripe Get Invoices Upcoming Lines
call: invoice-lines.getinvoicesupcominglines
with:
automatic_tax: rest.automatic_tax
coupon: rest.coupon
currency: rest.currency
customer: rest.customer
customer_details: rest.customer_details
discounts: rest.discounts
ending_before: rest.ending_before
expand: rest.expand
invoice_items: rest.invoice_items
limit: rest.limit
schedule: rest.schedule
starting_after: rest.starting_after
subscription: rest.subscription
subscription_billing_cycle_anchor: rest.subscription_billing_cycle_anchor
subscription_cancel_at: rest.subscription_cancel_at
subscription_cancel_at_period_end: rest.subscription_cancel_at_period_end
subscription_cancel_now: rest.subscription_cancel_now
subscription_default_tax_rates: rest.subscription_default_tax_rates
subscription_items: rest.subscription_items
subscription_proration_behavior: rest.subscription_proration_behavior
subscription_proration_date: rest.subscription_proration_date
subscription_resume_at: rest.subscription_resume_at
subscription_start_date: rest.subscription_start_date
subscription_trial_end: rest.subscription_trial_end
subscription_trial_from_plan: rest.subscription_trial_from_plan
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/v1/invoices/{invoice}/lines
name: v1-invoices-invoice-lines
description: REST surface for v1-invoices-invoice-lines.
operations:
- method: GET
name: getinvoicesinvoicelines
description: Stripe Get Invoices Invoice Lines
call: invoice-lines.getinvoicesinvoicelines
with:
ending_before: rest.ending_before
expand: rest.expand
invoice: rest.invoice
limit: rest.limit
starting_after: rest.starting_after
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/v1/invoices/{invoice}/lines/{line-item-id}
name: v1-invoices-invoice-lines-line-item-id
description: REST surface for v1-invoices-invoice-lines-line_item_id.
operations:
- method: POST
name: postinvoicesinvoicelineslineitemid
description: Stripe Post Invoices Invoice Lines Line Item Id
call: invoice-lines.postinvoicesinvoicelineslineitemid
with:
invoice: rest.invoice
line_item_id: rest.line_item_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: invoice-lines-mcp
port: 9090
transport: http
description: MCP adapter for Stripe Invoice API — Lines. One tool per consumed operation, routed inline through this capability's
consumes block.
tools:
- name: stripe-get-invoices-upcoming-lines
description: Stripe Get Invoices Upcoming Lines
hints:
readOnly: true
destructive: false
idempotent: true
call: invoice-lines.getinvoicesupcominglines
with:
automatic_tax: tools.automatic_tax
coupon: tools.coupon
currency: tools.currency
customer: tools.customer
customer_details: tools.customer_details
discounts: tools.discounts
ending_before: tools.ending_before
expand: tools.expand
invoice_items: tools.invoice_items
limit: tools.limit
schedule: tools.schedule
starting_after: tools.starting_after
subscription: tools.subscription
subscription_billing_cycle_anchor: tools.subscription_billing_cycle_anchor
subscription_cancel_at: tools.subscription_cancel_at
subscription_cancel_at_period_end: tools.subscription_cancel_at_period_end
subscription_cancel_now: tools.subscription_cancel_now
subscription_default_tax_rates: tools.subscription_default_tax_rates
subscription_items: tools.subscription_items
subscription_proration_behavior: tools.subscription_proration_behavior
subscription_proration_date: tools.subscription_proration_date
subscription_resume_at: tools.subscription_resume_at
subscription_start_date: tools.subscription_start_date
subscription_trial_end: tools.subscription_trial_end
subscription_trial_from_plan: tools.subscription_trial_from_plan
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: stripe-get-invoices-invoice-lines
description: Stripe Get Invoices Invoice Lines
hints:
readOnly: true
destructive: false
idempotent: true
call: invoice-lines.getinvoicesinvoicelines
with:
ending_before: tools.ending_before
expand: tools.expand
invoice: tools.invoice
limit: tools.limit
starting_after: tools.starting_after
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: stripe-post-invoices-invoice-lines
description: Stripe Post Invoices Invoice Lines Line Item Id
hints:
readOnly: false
destructive: false
idempotent: false
call: invoice-lines.postinvoicesinvoicelineslineitemid
with:
invoice: tools.invoice
line_item_id: tools.line_item_id
body: tools.body
outputParameters:
- type: object
mapping: $.