Go SDK
The Go SDK provides a fast, type-safe client tailored for high-performance backend services. It includes well-structured request/response models, automatic handling of API keys, convenient helper functions for tax calculation and jurisdiction lookup, and native support for working with Go contexts. This SDK is ideal for microservices, concurrent processing pipelines, and any environment where efficiency and reliability are primary concerns. Use the code samples here to get started.
The Go SDK is currently offered as a Beta product. Please send your comments and suggestions to support@zip.tax.
Project Resources
GitHub: https://github.com/ZipTax/ziptax-go
Go Package: https://pkg.go.dev/github.com/ziptax/ziptax-go
Implementation Example
1
Install
go get github.com/ziptax/ziptax-go2
Import
import (
"context"
"fmt"
"log"
"os"
"github.com/ziptax/ziptax-go"
)3
Configure Client
client, err := ziptax.NewClient(
"your-api-key",
ziptax.WithTimeout(60*time.Second),
ziptax.WithMaxRetries(5),
ziptax.WithRetryWait(2*time.Second, 60*time.Second),
)4
Get Sales Tax by Address
ctx := context.Background()
response, err := client.GetSalesTaxByAddress(ctx, "200 Spectrum Center Drive, Irvine, CA 92618")
if err != nil {
log.Fatal(err)
}5
Print Result
fmt.Printf("Address: %s\n", response.AddressDetail.NormalizedAddress)
if len(response.TaxSummaries) > 0 {
fmt.Printf("Total Tax Rate: %.4f%%\n", response.TaxSummaries[0].Rate*100)
}Full documentation available via our GitHub Project at https://github.com/ZipTax/ziptax-go
What made this section unhelpful for you?
On this page
- Go SDK