KintsugiKintsugi
SDKs

SDK Quick Start

This page gets your first call working. For the detail behind it, including async, retries and error types, see the Python, TypeScript, Java, PHP and Ruby guides.

Prerequisites

Keep your API key out of version control and out of browser bundles. Read it from an environment variable, and call the API from your server.

Install and call

Install the SDK for your language, then fetch a customer by id. That is the whole loop: authenticate once, call a method, read a typed response.

pip install kintsugi-tax-platform-sdk
import os
from kintsugi_tax_platform_sdk import SDK, models

with SDK(
    security=models.Security(
        api_key_header=os.environ["KINTSUGI_API_KEY"],
    ),
) as sdk:

    res = sdk.customers.get(customer_id="cust_abc123")

    # Handle response
    print(res)

Estimate tax

Tax estimation is where most integrations begin. Send the line items and addresses, get back the tax owed, and nothing is recorded against the organization:

import os
from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime

with SDK(
    security=models.Security(api_key_header=os.environ["KINTSUGI_API_KEY"]),
) as sdk:

    res = sdk.tax_estimation.estimate(
        date_=parse_datetime("2025-01-23T13:01:29.949Z"),
        external_id="txn_12345",
        currency=models.CurrencyEnum.USD,
        transaction_items=[
            {
                "external_id": "item_A",
                "date_": parse_datetime("2025-01-23T13:01:29.949Z"),
                "external_product_id": "prod_abc",
                "quantity": 2,
                "amount": 100,
            },
        ],
        addresses=[
            {
                "type": models.TransactionEstimatePublicRequestType.SHIP_TO,
                "street_1": "789 Pine St",
                "city": "Austin",
                "state": "TX",
                "postal_code": "78701",
                "country": "US",
            },
        ],
        marketplace=False,
    )

    print(res)

The Estimate tax reference page lists every field, with a sample in each language.

Next steps