Stripe · Capability

Stripe Invoice API — Invoiceitems

Stripe Invoice API — Invoiceitems. 5 operations. Lead operation: Invoiceitems. Self-contained Naftiko capability covering one Stripe business surface.

Run with Naftiko StripeInvoiceitems

What You Can Do

GET
Getinvoiceitems

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

/v1/v1/invoiceitems
POST
Postinvoiceitems

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

/v1/v1/invoiceitems
DELETE
Deleteinvoiceitemsinvoiceitem

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

/v1/v1/invoiceitems/{invoiceitem}
GET
Getinvoiceitemsinvoiceitem

Retrieves the invoice item with the given ID.

/v1/v1/invoiceitems/{invoiceitem}
POST
Postinvoiceitemsinvoiceitem

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

/v1/v1/invoiceitems/{invoiceitem}

MCP Tools

p-returns-list-your-invoice-items

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

read-only idempotent
p-creates-item-be-added-draft

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

p-deletes-invoice-item-removing-it

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

idempotent
p-retrieves-invoice-item-given-id

Retrieves the invoice item with the given ID.

read-only idempotent
p-updates-amount-description-invoice-item

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

Capability Spec

invoice-invoiceitems.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stripe Invoice API — Invoiceitems
  description: 'Stripe Invoice API — Invoiceitems. 5 operations. Lead operation: Invoiceitems. Self-contained Naftiko capability
    covering one Stripe business surface.'
  tags:
  - Stripe
  - Invoiceitems
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    STRIPE_API_KEY: STRIPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: invoice-invoiceitems
    baseUri: https://api.stripe.com
    description: Stripe Invoice API — Invoiceitems business capability. Self-contained, no shared references.
    resources:
    - name: v1-invoiceitems
      path: /v1/invoiceitems
      operations:
      - name: getinvoiceitems
        method: GET
        description: <p>Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the
          most recently created invoice items appearing first.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created
          in: query
          type: string
        - name: customer
          in: query
          type: string
          description: The identifier of the customer whose invoice items to return. If none is provided, all invoice items
            will be returned.
        - 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: query
          type: string
          description: Only return invoice items belonging to this invoice. If none is provided, all invoice items will be
            returned. If specifying an invoice, no customer identifier i
        - 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: pending
          in: query
          type: boolean
          description: Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to
            `false` to only show invoice items already attached to invo
        - 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: postinvoiceitems
        method: POST
        description: <p>Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified,
          the item will be on the next invoice created for the customer specified.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-invoiceitems-invoiceitem
      path: /v1/invoiceitems/{invoiceitem}
      operations:
      - name: deleteinvoiceitemsinvoiceitem
        method: DELETE
        description: <p>Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when
          they’re not attached to invoices, or if it’s attached to a draft invoice.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: invoiceitem
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: getinvoiceitemsinvoiceitem
        method: GET
        description: <p>Retrieves the invoice item with the given ID.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: expand
          in: query
          type: array
          description: Specifies which fields in the response should be expanded.
        - name: invoiceitem
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: postinvoiceitemsinvoiceitem
        method: POST
        description: <p>Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item
          is only possible before the invoice it’s attached to is closed.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: invoiceitem
          in: path
          type: string
          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-invoiceitems-rest
    port: 8080
    description: REST adapter for Stripe Invoice API — Invoiceitems. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v1/invoiceitems
      name: v1-invoiceitems
      description: REST surface for v1-invoiceitems.
      operations:
      - method: GET
        name: getinvoiceitems
        description: <p>Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the
          most recently created invoice items appearing first.</p>
        call: invoice-invoiceitems.getinvoiceitems
        with:
          created: rest.created
          customer: rest.customer
          ending_before: rest.ending_before
          expand: rest.expand
          invoice: rest.invoice
          limit: rest.limit
          pending: rest.pending
          starting_after: rest.starting_after
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postinvoiceitems
        description: <p>Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified,
          the item will be on the next invoice created for the customer specified.</p>
        call: invoice-invoiceitems.postinvoiceitems
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/invoiceitems/{invoiceitem}
      name: v1-invoiceitems-invoiceitem
      description: REST surface for v1-invoiceitems-invoiceitem.
      operations:
      - method: DELETE
        name: deleteinvoiceitemsinvoiceitem
        description: <p>Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when
          they’re not attached to invoices, or if it’s attached to a draft invoice.</p>
        call: invoice-invoiceitems.deleteinvoiceitemsinvoiceitem
        with:
          invoiceitem: rest.invoiceitem
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getinvoiceitemsinvoiceitem
        description: <p>Retrieves the invoice item with the given ID.</p>
        call: invoice-invoiceitems.getinvoiceitemsinvoiceitem
        with:
          expand: rest.expand
          invoiceitem: rest.invoiceitem
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postinvoiceitemsinvoiceitem
        description: <p>Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item
          is only possible before the invoice it’s attached to is closed.</p>
        call: invoice-invoiceitems.postinvoiceitemsinvoiceitem
        with:
          invoiceitem: rest.invoiceitem
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: invoice-invoiceitems-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stripe Invoice API — Invoiceitems. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: p-returns-list-your-invoice-items
      description: <p>Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most
        recently created invoice items appearing first.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: invoice-invoiceitems.getinvoiceitems
      with:
        created: tools.created
        customer: tools.customer
        ending_before: tools.ending_before
        expand: tools.expand
        invoice: tools.invoice
        limit: tools.limit
        pending: tools.pending
        starting_after: tools.starting_after
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-creates-item-be-added-draft
      description: <p>Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified,
        the item will be on the next invoice created for the customer specified.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: invoice-invoiceitems.postinvoiceitems
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-deletes-invoice-item-removing-it
      description: <p>Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re
        not attached to invoices, or if it’s attached to a draft invoice.</p>
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: invoice-invoiceitems.deleteinvoiceitemsinvoiceitem
      with:
        invoiceitem: tools.invoiceitem
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-retrieves-invoice-item-given-id
      description: <p>Retrieves the invoice item with the given ID.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: invoice-invoiceitems.getinvoiceitemsinvoiceitem
      with:
        expand: tools.expand
        invoiceitem: tools.invoiceitem
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-updates-amount-description-invoice-item
      description: <p>Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item
        is only possible before the invoice it’s attached to is closed.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: invoice-invoiceitems.postinvoiceitemsinvoiceitem
      with:
        invoiceitem: tools.invoiceitem
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.