Stripe · Capability

Stripe Tax API — Tax

Stripe Tax API — Tax. 11 operations. Lead operation: Tax. Self-contained Naftiko capability covering one Stripe business surface.

Run with Naftiko StripeTax

What You Can Do

POST
Posttaxcalculations

Calculates tax based on input and returns a Tax Calculation object.

/v1/v1/tax/calculations
GET
Gettaxcalculationscalculationlineitems

Retrieves the line items of a persisted tax calculation as a collection.

/v1/v1/tax/calculations/{calculation}/line-items
GET
Gettaxregistrations

Returns a list of Tax Registration objects.

/v1/v1/tax/registrations
POST
Posttaxregistrations

Creates a new Tax Registration object.

/v1/v1/tax/registrations
POST
Posttaxregistrationsid

Updates an existing Tax Registration object.

/v1/v1/tax/registrations/{id}
GET
Gettaxsettings

Retrieves Tax Settings for a merchant.

/v1/v1/tax/settings
POST
Posttaxsettings

Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.

/v1/v1/tax/settings
POST
Posttaxtransactionscreatefromcalculation

Creates a Tax Transaction from a calculation.

/v1/v1/tax/transactions/create-from-calculation
POST
Posttaxtransactionscreatereversal

Partially or fully reverses a previously created Transaction.

/v1/v1/tax/transactions/create-reversal
GET
Gettaxtransactionstransaction

Retrieves a Tax Transaction object.

/v1/v1/tax/transactions/{transaction}
GET
Gettaxtransactionstransactionlineitems

Retrieves the line items of a committed standalone transaction as a collection.

/v1/v1/tax/transactions/{transaction}/line-items

MCP Tools

p-calculates-tax-based-input-and

Calculates tax based on input and returns a Tax Calculation object.

p-retrieves-line-items-persisted-tax

Retrieves the line items of a persisted tax calculation as a collection.

read-only idempotent
p-returns-list-tax-code-registration-code

Returns a list of Tax Registration objects.

read-only idempotent
p-creates-new-tax-code-registration-code

Creates a new Tax Registration object.

p-updates-existing-tax-code-registration-code

Updates an existing Tax Registration object.

p-retrieves-tax-code-settings-code-merchant

Retrieves Tax Settings for a merchant.

read-only idempotent
p-updates-tax-code-settings-code-parameters

Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.

p-creates-tax-code-transaction-code-calculation

Creates a Tax Transaction from a calculation.

p-partially-fully-reverses-previously-created

Partially or fully reverses a previously created Transaction.

p-retrieves-tax-code-transaction-code-object

Retrieves a Tax Transaction object.

read-only idempotent
p-retrieves-line-items-committed-standalone

Retrieves the line items of a committed standalone transaction as a collection.

read-only idempotent

Capability Spec

tax-tax-2.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stripe Tax API — Tax
  description: 'Stripe Tax API — Tax. 11 operations. Lead operation: Tax. Self-contained Naftiko capability covering one Stripe
    business surface.'
  tags:
  - Stripe
  - Tax
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    STRIPE_API_KEY: STRIPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: tax-tax-2
    baseUri: https://api.stripe.com
    description: Stripe Tax API — Tax business capability. Self-contained, no shared references.
    resources:
    - name: v1-tax-calculations
      path: /v1/tax/calculations
      operations:
      - name: posttaxcalculations
        method: POST
        description: <p>Calculates tax based on input and returns a Tax <code>Calculation</code> object.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-tax-calculations-calculation-line_items
      path: /v1/tax/calculations/{calculation}/line_items
      operations:
      - name: gettaxcalculationscalculationlineitems
        method: GET
        description: <p>Retrieves the line items of a persisted tax calculation as a collection.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: calculation
          in: path
          type: string
          required: true
        - 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: 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-tax-registrations
      path: /v1/tax/registrations
      operations:
      - name: gettaxregistrations
        method: GET
        description: <p>Returns a list of Tax <code>Registration</code> objects.</p>
        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: 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: status
          in: query
          type: string
          description: The status of the Tax Registration.
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: posttaxregistrations
        method: POST
        description: <p>Creates a new Tax <code>Registration</code> object.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-tax-registrations-id
      path: /v1/tax/registrations/{id}
      operations:
      - name: posttaxregistrationsid
        method: POST
        description: <p>Updates an existing Tax <code>Registration</code> object.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-tax-settings
      path: /v1/tax/settings
      operations:
      - name: gettaxsettings
        method: GET
        description: <p>Retrieves Tax <code>Settings</code> for a merchant.</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: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: posttaxsettings
        method: POST
        description: <p>Updates Tax <code>Settings</code> parameters used in tax calculations. All parameters are editable
          but none can be removed once set.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-tax-transactions-create_from_calculation
      path: /v1/tax/transactions/create_from_calculation
      operations:
      - name: posttaxtransactionscreatefromcalculation
        method: POST
        description: <p>Creates a Tax <code>Transaction</code> from a calculation.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-tax-transactions-create_reversal
      path: /v1/tax/transactions/create_reversal
      operations:
      - name: posttaxtransactionscreatereversal
        method: POST
        description: <p>Partially or fully reverses a previously created <code>Transaction</code>.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-tax-transactions-transaction
      path: /v1/tax/transactions/{transaction}
      operations:
      - name: gettaxtransactionstransaction
        method: GET
        description: <p>Retrieves a Tax <code>Transaction</code> object.</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: transaction
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-tax-transactions-transaction-line_items
      path: /v1/tax/transactions/{transaction}/line_items
      operations:
      - name: gettaxtransactionstransactionlineitems
        method: GET
        description: <p>Retrieves the line items of a committed standalone transaction as a collection.</p>
        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: 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: transaction
          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: tax-tax-2-rest
    port: 8080
    description: REST adapter for Stripe Tax API — Tax. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/v1/tax/calculations
      name: v1-tax-calculations
      description: REST surface for v1-tax-calculations.
      operations:
      - method: POST
        name: posttaxcalculations
        description: <p>Calculates tax based on input and returns a Tax <code>Calculation</code> object.</p>
        call: tax-tax-2.posttaxcalculations
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tax/calculations/{calculation}/line-items
      name: v1-tax-calculations-calculation-line-items
      description: REST surface for v1-tax-calculations-calculation-line_items.
      operations:
      - method: GET
        name: gettaxcalculationscalculationlineitems
        description: <p>Retrieves the line items of a persisted tax calculation as a collection.</p>
        call: tax-tax-2.gettaxcalculationscalculationlineitems
        with:
          calculation: rest.calculation
          ending_before: rest.ending_before
          expand: rest.expand
          limit: rest.limit
          starting_after: rest.starting_after
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tax/registrations
      name: v1-tax-registrations
      description: REST surface for v1-tax-registrations.
      operations:
      - method: GET
        name: gettaxregistrations
        description: <p>Returns a list of Tax <code>Registration</code> objects.</p>
        call: tax-tax-2.gettaxregistrations
        with:
          ending_before: rest.ending_before
          expand: rest.expand
          limit: rest.limit
          starting_after: rest.starting_after
          status: rest.status
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: posttaxregistrations
        description: <p>Creates a new Tax <code>Registration</code> object.</p>
        call: tax-tax-2.posttaxregistrations
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tax/registrations/{id}
      name: v1-tax-registrations-id
      description: REST surface for v1-tax-registrations-id.
      operations:
      - method: POST
        name: posttaxregistrationsid
        description: <p>Updates an existing Tax <code>Registration</code> object.</p>
        call: tax-tax-2.posttaxregistrationsid
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tax/settings
      name: v1-tax-settings
      description: REST surface for v1-tax-settings.
      operations:
      - method: GET
        name: gettaxsettings
        description: <p>Retrieves Tax <code>Settings</code> for a merchant.</p>
        call: tax-tax-2.gettaxsettings
        with:
          expand: rest.expand
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: posttaxsettings
        description: <p>Updates Tax <code>Settings</code> parameters used in tax calculations. All parameters are editable
          but none can be removed once set.</p>
        call: tax-tax-2.posttaxsettings
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tax/transactions/create-from-calculation
      name: v1-tax-transactions-create-from-calculation
      description: REST surface for v1-tax-transactions-create_from_calculation.
      operations:
      - method: POST
        name: posttaxtransactionscreatefromcalculation
        description: <p>Creates a Tax <code>Transaction</code> from a calculation.</p>
        call: tax-tax-2.posttaxtransactionscreatefromcalculation
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tax/transactions/create-reversal
      name: v1-tax-transactions-create-reversal
      description: REST surface for v1-tax-transactions-create_reversal.
      operations:
      - method: POST
        name: posttaxtransactionscreatereversal
        description: <p>Partially or fully reverses a previously created <code>Transaction</code>.</p>
        call: tax-tax-2.posttaxtransactionscreatereversal
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tax/transactions/{transaction}
      name: v1-tax-transactions-transaction
      description: REST surface for v1-tax-transactions-transaction.
      operations:
      - method: GET
        name: gettaxtransactionstransaction
        description: <p>Retrieves a Tax <code>Transaction</code> object.</p>
        call: tax-tax-2.gettaxtransactionstransaction
        with:
          expand: rest.expand
          transaction: rest.transaction
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tax/transactions/{transaction}/line-items
      name: v1-tax-transactions-transaction-line-items
      description: REST surface for v1-tax-transactions-transaction-line_items.
      operations:
      - method: GET
        name: gettaxtransactionstransactionlineitems
        description: <p>Retrieves the line items of a committed standalone transaction as a collection.</p>
        call: tax-tax-2.gettaxtransactionstransactionlineitems
        with:
          ending_before: rest.ending_before
          expand: rest.expand
          limit: rest.limit
          starting_after: rest.starting_after
          transaction: rest.transaction
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: tax-tax-2-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stripe Tax API — Tax. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: p-calculates-tax-based-input-and
      description: <p>Calculates tax based on input and returns a Tax <code>Calculation</code> object.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: tax-tax-2.posttaxcalculations
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-retrieves-line-items-persisted-tax
      description: <p>Retrieves the line items of a persisted tax calculation as a collection.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tax-tax-2.gettaxcalculationscalculationlineitems
      with:
        calculation: tools.calculation
        ending_before: tools.ending_before
        expand: tools.expand
        limit: tools.limit
        starting_after: tools.starting_after
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-returns-list-tax-code-registration-code
      description: <p>Returns a list of Tax <code>Registration</code> objects.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tax-tax-2.gettaxregistrations
      with:
        ending_before: tools.ending_before
        expand: tools.expand
        limit: tools.limit
        starting_after: tools.starting_after
        status: tools.status
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-creates-new-tax-code-registration-code
      description: <p>Creates a new Tax <code>Registration</code> object.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: tax-tax-2.posttaxregistrations
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-updates-existing-tax-code-registration-code
      description: <p>Updates an existing Tax <code>Registration</code> object.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: tax-tax-2.posttaxregistrationsid
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-retrieves-tax-code-settings-code-merchant
      description: <p>Retrieves Tax <code>Settings</code> for a merchant.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tax-tax-2.gettaxsettings
      with:
        expand: tools.expand
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-updates-tax-code-settings-code-parameters
      description: <p>Updates Tax <code>Settings</code> parameters used in tax calculations. All parameters are editable but
        none can be removed once set.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: tax-tax-2.posttaxsettings
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-creates-tax-code-transaction-code-calculation
      description: <p>Creates a Tax <code>Transaction</code> from a calculation.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: tax-tax-2.posttaxtransactionscreatefromcalculation
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-partially-fully-reverses-previously-created
      description: <p>Partially or fully reverses a previously created <code>Transaction</code>.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: tax-tax-2.posttaxtransactionscreatereversal
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-retrieves-tax-code-transaction-code-object
      description: <p>Retrieves a Tax <code>Transaction</code> object.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tax-tax-2.gettaxtransactionstransaction
      with:
        expand: tools.expand
        transaction: tools.transaction
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-retrieves-line-items-committed-standalone
      description: <p>Retrieves the line items of a committed standalone transaction as a collection.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tax-tax-2.gettaxtransactionstransactionlineitems
      with:
        ending_before: tools.ending_before
        expand: tools.expand
        limit: tools.limit
        starting_after: tools.starting_after
        transaction: tools.transaction
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.