Theme switcher

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.



Implementation Example

1

Install

Bash
go get github.com/ziptax/ziptax-go

2

Import

Go
import ( "context" "fmt" "log" "os" "github.com/ziptax/ziptax-go" )

3

Configure Client

Go
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

Go
ctx := context.Background() response, err := client.GetSalesTaxByAddress(ctx, "200 Spectrum Center Drive, Irvine, CA 92618") if err != nil { log.Fatal(err) }

5

Print Result

Go
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

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Go SDK