> ## Documentation Index
> Fetch the complete documentation index at: https://developer.transactbridge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculate Product Taxes

> Used to preview the pricing, discounts, and taxes for a set of items without saving any data.



## OpenAPI

````yaml /api-reference/Products/product.json post /product/v1.0/calProductSummary
openapi: 3.0.3
info:
  title: Product
  description: API's to add and get product information.
  version: 1.0.0
servers:
  - url: https://sandbox-api.transactbridge.com
    description: Sandbox Environment
  - url: https://api.transactbridge.com
    description: Production Environment
security:
  - ApiKeyAuth: []
    SignatureAuth: []
paths:
  /product/v1.0/calProductSummary:
    post:
      tags:
        - Product
      summary: Calculate Product Taxes
      description: >-
        Used to preview the pricing, discounts, and taxes for a set of items
        without saving any data.
      operationId: calculateProductTaxes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - mode
                - items
                - quoteCurrCode
                - billTo
              properties:
                mode:
                  type: string
                  enum:
                    - SESSION
                    - SUBSCRIPTION
                  description: >-
                    Required. SESSION or SUBSCRIPTION. Decides which discount
                    object is allowed.
                quoteCurrCode:
                  type: string
                  description: >-
                    Required*. Currency of the amount values. Filled
                    automatically if the merchant has only one allowed quote
                    currency.
                billTo:
                  type: object
                  description: >-
                    Required*. Billing address. Decides the tax rules and the
                    legal entity. Filled automatically if the merchant has only
                    one mapped country (other than GLOBAL).
                  required:
                    - country
                  properties:
                    country:
                      type: string
                      description: >-
                        Required. Must be a supported country. Decides whether
                        tax is collected.
                    state:
                      type: string
                      description: Optional. Needed for correct tax in India and the USA.
                    postalCode:
                      type: string
                      description: Optional. Used for pincode-level tax.
                    name:
                      type: string
                      description: Optional. Display only. Not used in the calculation.
                    line1:
                      type: string
                      description: Optional. Display only. Not used in the calculation.
                    line2:
                      type: string
                      description: Optional. Display only. Not used in the calculation.
                    city:
                      type: string
                      description: Optional. Display only. Not used in the calculation.
                items:
                  type: array
                  description: Required. List of items. At least one item.
                  items:
                    type: object
                    required:
                      - quantity
                      - amount
                    properties:
                      quantity:
                        type: number
                        minimum: 0.000001
                        description: Required. Must be greater than 0.
                      amount:
                        type: number
                        minimum: 0
                        description: >-
                          Required. Unit price in quoteCurrCode. Can be 0, but
                          at least one item should be more than 0.
                      name:
                        type: string
                        description: Required if productReferenceId is not sent. Item name.
                      productReferenceId:
                        type: string
                        description: >-
                          Required if mandatoryProductListing is enabled for the
                          merchant. referenceId of a product created with Create
                          Product.
                      hsnCode:
                        type: string
                        minLength: 6
                        maxLength: 8
                        description: >-
                          Required if shippable is true. HSN code, 6 to 8
                          characters.
                      shippable:
                        type: boolean
                        description: Optional. true for goods, false for services.
                      description:
                        type: string
                        description: Optional. Item description. Multiple lines allowed.
                      images:
                        type: array
                        description: Optional. List of image URLs.
                        items:
                          type: string
                          format: uri
                      prorate:
                        type: number
                        description: Optional. Proration factor for a partial period.
                      meta:
                        type: object
                        properties:
                          param1:
                            type: string
                            maxLength: 256
                            description: >-
                              Optional. Custom fields for your own use. Max 256
                              characters each.
                          param2:
                            type: string
                            maxLength: 256
                            description: >-
                              Optional. Custom fields for your own use. Max 256
                              characters each.
                          param3:
                            type: string
                            maxLength: 256
                            description: >-
                              Optional. Custom fields for your own use. Max 256
                              characters each.
                postalCode:
                  type: string
                  description: Optional. Overrides billTo.postalCode.
                userTaxId:
                  type: string
                  description: >-
                    Optional. Use a specific tax registration for the
                    calculation.
                gstInclusive:
                  type: boolean
                  description: >-
                    Optional. true if amount already includes tax. Defaults to
                    the merchant's setting.
                discount:
                  type: object
                  description: Optional, SESSION only. Discount for a billing session.
                  required:
                    - quoteAmountOff
                  properties:
                    quoteAmountOff:
                      type: number
                      description: >-
                        Required if discount is sent. Fixed amount off, in
                        quoteCurrCode.
                    name:
                      type: string
                      maxLength: 256
                      description: Optional. Discount label. Max 256 characters.
                coupon:
                  type: object
                  description: Optional, SUBSCRIPTION only. Coupon for a subscription.
                  required:
                    - code
                    - type
                  properties:
                    code:
                      type: string
                      maxLength: 64
                      description: >-
                        Required if coupon is sent. Coupon code. Max 64
                        characters.
                    type:
                      type: string
                      enum:
                        - FIX
                        - PCNT
                      description: >-
                        Required if coupon is sent. FIX (fixed amount) or PCNT
                        (percentage).
                    quoteAmountOff:
                      type: number
                      description: >-
                        Required if type is FIX. Fixed amount off, in
                        quoteCurrCode.
                    pcnt:
                      type: number
                      description: Required if type is PCNT. Percentage off.
      responses:
        '200':
          description: calculated taxes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/taxes'
components:
  schemas:
    taxes:
      type: object
      properties:
        quoteCurrCode:
          type: string
          description: Currency you quoted in.
        quoteAmount:
          type: number
          description: Total after discount, in quoteCurrCode.
        code:
          type: string
          description: Merchant settlement currency.
        amount:
          type: number
          description: Total converted to the settlement currency.
        totalAmount:
          type: number
          description: Final amount to pay.
        quoteAmt:
          type: number
          description: Same as quoteAmount. Kept for backward compatibility.
        tax:
          type: object
          description: 'Tax breakdown: rates, amount per tax component, and total tax.'
          properties:
            rates:
              type: array
              items:
                type: object
            amount:
              type: number
            totalTax:
              type: number
        gstInclusive:
          type: boolean
          description: Whether the amounts were calculated as tax-inclusive.
        discount:
          type: object
          description: >-
            The discount or coupon that was applied, plus amountOff in the
            settlement currency.
          properties:
            amountOff:
              type: number
        items:
          type: array
          description: Your items, each with inrAmount added (line total × FX rate).
          items:
            type: object
            properties:
              inrAmount:
                type: number
        billDetails:
          type: object
          description: The final billTo address and the same items list.
          properties:
            billTo:
              type: object
            items:
              type: array
              items:
                type: object
                properties:
                  inrAmount:
                    type: number
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Merchant API Key
    SignatureAuth:
      type: apiKey
      in: header
      name: x-signature
      description: Generated request signature

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.