Skip to main content
POST
/
taxes
/
calculate
{
  "lineItems": [
    {
      "lineItem": {
        "type": "PRODUCT_OFFERING",
        "productOfferingId": "mobile-plan-premium"
      },
      "netAmount": 29.99,
      "taxAmount": 7.5,
      "totalAmount": 37.49,
      "currency": "USD",
      "taxBreakdown": [
        {
          "description": "Sales Tax",
          "amount": 2.4,
          "rate": 8.25
        }
      ]
    }
  ],
  "totals": {
    "netAmount": 129.97,
    "taxAmount": 32.49,
    "totalAmount": 162.46,
    "currency": "USD",
    "taxBreakdown": [
      {
        "description": "Sales Tax",
        "amount": 2.4,
        "rate": 8.25
      }
    ]
  }
}

Authorizations

X-Api-Key
string
header
required

An API key that grants access to the Connect API. You can create and manage API keys in the portal.

Headers

X-Idempotency-Key
string

A unique key to ensure idempotency of requests. If a request with the same key has already been processed, the same result will be returned. The key must be unique for each distinct operation. Keys are expired after 24 hours, but we recommend using a new key for each request.

Modified requests with the same idempotency keys are rejected with a 409 Conflict status code.

Maximum length: 256

Body

application/json

Tax calculation request.

Request to calculate taxes for line items at a specific address.

lineItems
Product Offering · object[]
required

Line items to calculate taxes for.

Minimum length: 1
customerId
string

Optional customer ID for customer-specific tax calculations.

Example:

"123e4567-e89b-12d3-a456-426614174000"

address
object

The address where taxes should be calculated for.

If the customer ID is not provided, this address is required. If both customer ID and address are provided, the address will override the customer's default address for tax calculation.

promoCode
string

Promotional code to apply for discount calculation before computing taxes.

Example:

"STUDENT2024"

Response

Tax calculation completed successfully.

Tax calculation result with line-by-line breakdown and totals.

lineItems
object[]
required

Tax calculation results for each line item.

totals
object
required

Summary totals across all line items.