numeraltax

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

README

Numeral API Go API Library

Go Reference

The Numeral API Go library provides convenient access to the Numeral API REST API from applications written in Go.

It is generated with Stainless.

Installation

import (
	"github.com/NumeralHQ/numeral-tax-go" // imported as numeraltax
)

Or to pin the version:

go get -u 'github.com/NumeralHQ/numeral-tax-go@v0.1.0'

Requirements

This library requires Go 1.22+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/NumeralHQ/numeral-tax-go"
	"github.com/NumeralHQ/numeral-tax-go/option"
)

func main() {
	client := numeraltax.NewClient(
		option.WithAPIKey("My API Key"),
	)
	calculationResponse, err := client.Tax.Calculations.New(context.TODO(), numeraltax.TaxCalculationNewParams{
		Customer: numeraltax.TaxCalculationNewParamsCustomer{
			Address: numeraltax.TaxCalculationNewParamsCustomerAddress{
				AddressCity:       "Little Whinging",
				AddressCountry:    "US",
				AddressLine1:      "4 Privet Drive",
				AddressPostalCode: "90210",
				AddressProvince:   "CA",
				AddressType:       "shipping",
			},
		},
		OrderDetails: numeraltax.TaxCalculationNewParamsOrderDetails{
			CustomerCurrencyCode: "USD",
			LineItems: []numeraltax.TaxCalculationNewParamsOrderDetailsLineItem{{
				Amount:   10000,
				Quantity: 1,
			}},
			TaxIncludedInAmount: false,
		},
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", calculationResponse.ID)
}

Request fields

The numeraltax library uses the omitzero semantics from the Go 1.24+ encoding/json release for request fields.

Required primitive fields (int64, string, etc.) feature the tag `api:"required"`. These fields are always serialized, even their zero values.

Optional primitive types are wrapped in a param.Opt[T]. These fields can be set with the provided constructors, numeraltax.String(string), numeraltax.Int(int64), etc.

Any param.Opt[T], map, slice, struct or string enum uses the tag `json:"...,omitzero"`. Its zero value is considered omitted.

The param.IsOmitted(any) function can confirm the presence of any omitzero field.

p := numeraltax.ExampleParams{
	ID:   "id_xxx",                 // required property
	Name: numeraltax.String("..."), // optional property

	Point: numeraltax.Point{
		X: 0,                 // required field will serialize as 0
		Y: numeraltax.Int(1), // optional field will serialize as 1
		// ... omitted non-required fields will not be serialized
	},

	Origin: numeraltax.Origin{}, // the zero value of [Origin] is considered omitted
}

To send null instead of a param.Opt[T], use param.Null[T](). To send null instead of a struct T, use param.NullStruct[T]().

p.Name = param.Null[string]()       // 'null' instead of string
p.Point = param.NullStruct[Point]() // 'null' instead of struct

param.IsNull(p.Name)  // true
param.IsNull(p.Point) // true

Request structs contain a .SetExtraFields(map[string]any) method which can send non-conforming fields in the request body. Extra fields overwrite any struct fields with a matching key. For security reasons, only use SetExtraFields with trusted data.

To send a custom value instead of a struct, use param.Override[T](value).

// In cases where the API specifies a given type,
// but you want to send something else, use [SetExtraFields]:
p.SetExtraFields(map[string]any{
	"x": 0.01, // send "x" as a float instead of int
})

// Send a number instead of an object
custom := param.Override[numeraltax.FooParams](12)
Request unions

Unions are represented as a struct with fields prefixed by "Of" for each of its variants, only one field can be non-zero. The non-zero field will be serialized.

Sub-properties of the union can be accessed via methods on the union struct. These methods return a mutable pointer to the underlying data, if present.

// Only one field can be non-zero, use param.IsOmitted() to check if a field is set
type AnimalUnionParam struct {
	OfCat *Cat `json:",omitzero,inline`
	OfDog *Dog `json:",omitzero,inline`
}

animal := AnimalUnionParam{
	OfCat: &Cat{
		Name: "Whiskers",
		Owner: PersonParam{
			Address: AddressParam{Street: "3333 Coyote Hill Rd", Zip: 0},
		},
	},
}

// Mutating a field
if address := animal.GetOwner().GetAddress(); address != nil {
	address.ZipCode = 94304
}
Response objects

All fields in response structs are ordinary value types (not pointers or wrappers). Response structs also include a special JSON field containing metadata about each property.

type Animal struct {
	Name   string `json:"name,nullable"`
	Owners int    `json:"owners"`
	Age    int    `json:"age"`
	JSON   struct {
		Name        respjson.Field
		Owner       respjson.Field
		Age         respjson.Field
		ExtraFields map[string]respjson.Field
	} `json:"-"`
}

To handle optional data, use the .Valid() method on the JSON field. .Valid() returns true if a field is not null, not present, or couldn't be marshaled.

If .Valid() is false, the corresponding field will simply be its zero value.

raw := `{"owners": 1, "name": null}`

var res Animal
json.Unmarshal([]byte(raw), &res)

// Accessing regular fields

res.Owners // 1
res.Name   // ""
res.Age    // 0

// Optional field checks

res.JSON.Owners.Valid() // true
res.JSON.Name.Valid()   // false
res.JSON.Age.Valid()    // false

// Raw JSON values

res.JSON.Owners.Raw()                  // "1"
res.JSON.Name.Raw() == "null"          // true
res.JSON.Name.Raw() == respjson.Null   // true
res.JSON.Age.Raw() == ""               // true
res.JSON.Age.Raw() == respjson.Omitted // true

These .JSON structs also include an ExtraFields map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
Response Unions

In responses, unions are represented by a flattened struct containing all possible fields from each of the object variants. To convert it to a variant use the .AsFooVariant() method or the .AsAny() method if present.

If a response value union contains primitive values, primitive fields will be alongside the properties but prefixed with Of and feature the tag json:"...,inline".

type AnimalUnion struct {
	// From variants [Dog], [Cat]
	Owner Person `json:"owner"`
	// From variant [Dog]
	DogBreed string `json:"dog_breed"`
	// From variant [Cat]
	CatBreed string `json:"cat_breed"`
	// ...

	JSON struct {
		Owner respjson.Field
		// ...
	} `json:"-"`
}

// If animal variant
if animal.Owner.Address.ZipCode == "" {
	panic("missing zip code")
}

// Switch on the variant
switch variant := animal.AsAny().(type) {
case Dog:
case Cat:
default:
	panic("unexpected type")
}
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := numeraltax.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Tax.Calculations.New(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

The request option option.WithDebugLog(nil) may be helpful while debugging.

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

Errors

When the API returns a non-success status code, we return an error with type *numeraltax.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Tax.Calculations.New(context.TODO(), numeraltax.TaxCalculationNewParams{
	Customer: numeraltax.TaxCalculationNewParamsCustomer{
		Address: numeraltax.TaxCalculationNewParamsCustomerAddress{
			AddressCity:       "Little Whinging",
			AddressCountry:    "US",
			AddressLine1:      "4 Privet Drive",
			AddressPostalCode: "90210",
			AddressProvince:   "CA",
			AddressType:       "shipping",
		},
	},
	OrderDetails: numeraltax.TaxCalculationNewParamsOrderDetails{
		CustomerCurrencyCode: "USD",
		LineItems: []numeraltax.TaxCalculationNewParamsOrderDetailsLineItem{{
			Amount:   10000,
			Quantity: 1,
		}},
		TaxIncludedInAmount: false,
	},
})
if err != nil {
	var apierr *numeraltax.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/tax/calculations": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Tax.Calculations.New(
	ctx,
	numeraltax.TaxCalculationNewParams{
		Customer: numeraltax.TaxCalculationNewParamsCustomer{
			Address: numeraltax.TaxCalculationNewParamsCustomerAddress{
				AddressCity:       "Little Whinging",
				AddressCountry:    "US",
				AddressLine1:      "4 Privet Drive",
				AddressPostalCode: "90210",
				AddressProvince:   "CA",
				AddressType:       "shipping",
			},
		},
		OrderDetails: numeraltax.TaxCalculationNewParamsOrderDetails{
			CustomerCurrencyCode: "USD",
			LineItems: []numeraltax.TaxCalculationNewParamsOrderDetailsLineItem{{
				Amount:   10000,
				Quantity: 1,
			}},
			TaxIncludedInAmount: false,
		},
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as io.Reader. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper numeraltax.File(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := numeraltax.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Tax.Calculations.New(
	context.TODO(),
	numeraltax.TaxCalculationNewParams{
		Customer: numeraltax.TaxCalculationNewParamsCustomer{
			Address: numeraltax.TaxCalculationNewParamsCustomerAddress{
				AddressCity:       "Little Whinging",
				AddressCountry:    "US",
				AddressLine1:      "4 Privet Drive",
				AddressPostalCode: "90210",
				AddressProvince:   "CA",
				AddressType:       "shipping",
			},
		},
		OrderDetails: numeraltax.TaxCalculationNewParamsOrderDetails{
			CustomerCurrencyCode: "USD",
			LineItems: []numeraltax.TaxCalculationNewParamsOrderDetailsLineItem{{
				Amount:   10000,
				Quantity: 1,
			}},
			TaxIncludedInAmount: false,
		},
	},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
calculationResponse, err := client.Tax.Calculations.New(
	context.TODO(),
	numeraltax.TaxCalculationNewParams{
		Customer: numeraltax.TaxCalculationNewParamsCustomer{
			Address: numeraltax.TaxCalculationNewParamsCustomerAddress{
				AddressCity:       "Little Whinging",
				AddressCountry:    "US",
				AddressLine1:      "4 Privet Drive",
				AddressPostalCode: "90210",
				AddressProvince:   "CA",
				AddressType:       "shipping",
			},
		},
		OrderDetails: numeraltax.TaxCalculationNewParamsOrderDetails{
			CustomerCurrencyCode: "USD",
			LineItems: []numeraltax.TaxCalculationNewParamsOrderDetailsLineItem{{
				Amount:   10000,
				Quantity: 1,
			}},
			TaxIncludedInAmount: false,
		},
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", calculationResponse)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]any

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   "id_xxxx",
    Data: FooNewParamsData{
        FirstName: numeraltax.String("John"),
    },
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := numeraltax.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) param.Opt[bool]

func BoolPtr

func BoolPtr(v bool) *bool

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (NUMERAL_API_BASE_URL). This should be used to initialize new clients.

func File

func File(rdr io.Reader, filename string, contentType string) file

func Float

func Float(f float64) param.Opt[float64]

func FloatPtr

func FloatPtr(v float64) *float64

func Int

func Int(i int64) param.Opt[int64]

func IntPtr

func IntPtr(v int64) *int64

func Opt

func Opt[T comparable](v T) param.Opt[T]

func Ptr

func Ptr[T any](v T) *T

func String

func String(s string) param.Opt[string]

func StringPtr

func StringPtr(v string) *string

func Time

func Time(t time.Time) param.Opt[time.Time]

func TimePtr

func TimePtr(v time.Time) *time.Time

Types

type CalculationResponse

type CalculationResponse struct {
	// The ID of the `calculation`. You will use this to create a `transaction`.
	ID string `json:"id"`
	// Status of address resolution for the customer address. Available with API
	// version 2025-05-12 only. `EXACT`: exact address match found,
	// `POSTAL_FALLBACK_1`: used postal code fallback, `POSTAL_ONLY`: only postal code
	// was used for tax calculation.
	//
	// Any of "EXACT", "POSTAL_FALLBACK_1", "POSTAL_ONLY".
	AddressResolutionStatus CalculationResponseAddressResolutionStatus `json:"address_resolution_status"`
	// The actual address used for tax calculation after resolution. Available with API
	// version 2025-05-12 only.
	AddressUsed CalculationResponseAddressUsed `json:"address_used"`
	// The automatic tax setting for this calculation. Available with API version
	// 2025-05-12.
	//
	// Any of "auto", "disabled".
	AutomaticTax CalculationResponseAutomaticTax `json:"automatic_tax"`
	// Customer information returned in the response. Available with API version
	// 2025-05-12.
	Customer CalculationResponseCustomer `json:"customer"`
	// The ISO-4217 currency code of the transaction.
	CustomerCurrencyCode string `json:"customer_currency_code"`
	// Epoch datetime representing the date and time the tax rates are valid until.
	ExpiresAt float64                       `json:"expires_at"`
	LineItems []CalculationResponseLineItem `json:"line_items"`
	// You can store arbitrary keys and values in the metadata. Any valid JSON object
	// whose values are less than 255 characters long is accepted.
	Metadata Metadata `json:"metadata"`
	// The type of object: `tax.calculation`.
	Object              string `json:"object"`
	TaxIncludedInAmount bool   `json:"tax_included_in_amount"`
	// `True` if using a production API key. `False` if using a test API key.
	Testmode bool `json:"testmode"`
	// Total sale charge, excluding tax.
	TotalAmountExcludingTax float64 `json:"total_amount_excluding_tax"`
	// Total sale charge plus tax. What you should charge your customer.
	TotalAmountIncludingTax float64 `json:"total_amount_including_tax"`
	// Total tax to charge on this `calculation`.
	TotalTaxAmount float64 `json:"total_tax_amount"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                      respjson.Field
		AddressResolutionStatus respjson.Field
		AddressUsed             respjson.Field
		AutomaticTax            respjson.Field
		Customer                respjson.Field
		CustomerCurrencyCode    respjson.Field
		ExpiresAt               respjson.Field
		LineItems               respjson.Field
		Metadata                respjson.Field
		Object                  respjson.Field
		TaxIncludedInAmount     respjson.Field
		Testmode                respjson.Field
		TotalAmountExcludingTax respjson.Field
		TotalAmountIncludingTax respjson.Field
		TotalTaxAmount          respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CalculationResponse) RawJSON

func (r CalculationResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*CalculationResponse) UnmarshalJSON

func (r *CalculationResponse) UnmarshalJSON(data []byte) error

type CalculationResponseAddressResolutionStatus

type CalculationResponseAddressResolutionStatus string

Status of address resolution for the customer address. Available with API version 2025-05-12 only. `EXACT`: exact address match found, `POSTAL_FALLBACK_1`: used postal code fallback, `POSTAL_ONLY`: only postal code was used for tax calculation.

const (
	CalculationResponseAddressResolutionStatusExact           CalculationResponseAddressResolutionStatus = "EXACT"
	CalculationResponseAddressResolutionStatusPostalFallback1 CalculationResponseAddressResolutionStatus = "POSTAL_FALLBACK_1"
	CalculationResponseAddressResolutionStatusPostalOnly      CalculationResponseAddressResolutionStatus = "POSTAL_ONLY"
)

type CalculationResponseAddressUsed

type CalculationResponseAddressUsed struct {
	AddressCity       string `json:"address_city" api:"required"`
	AddressCountry    string `json:"address_country" api:"required"`
	AddressLine1      string `json:"address_line_1" api:"required"`
	AddressPostalCode string `json:"address_postal_code" api:"required"`
	AddressProvince   string `json:"address_province" api:"required"`
	AddressLine2      string `json:"address_line_2"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AddressCity       respjson.Field
		AddressCountry    respjson.Field
		AddressLine1      respjson.Field
		AddressPostalCode respjson.Field
		AddressProvince   respjson.Field
		AddressLine2      respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The actual address used for tax calculation after resolution. Available with API version 2025-05-12 only.

func (CalculationResponseAddressUsed) RawJSON

Returns the unmodified JSON received from the API

func (*CalculationResponseAddressUsed) UnmarshalJSON

func (r *CalculationResponseAddressUsed) UnmarshalJSON(data []byte) error

type CalculationResponseAutomaticTax

type CalculationResponseAutomaticTax string

The automatic tax setting for this calculation. Available with API version 2025-05-12.

const (
	CalculationResponseAutomaticTaxAuto     CalculationResponseAutomaticTax = "auto"
	CalculationResponseAutomaticTaxDisabled CalculationResponseAutomaticTax = "disabled"
)

type CalculationResponseCustomer

type CalculationResponseCustomer struct {
	// The type of customer. Available with API version 2025-05-12. CONSUMER are
	// private individuals who are not registered for VAT/GST (or any other local
	// indirect-tax scheme) in the country where the supply is taxed. BUSINESS are
	// companies, sole-proprietors, or other legal entities registered for VAT/GST (or
	// an equivalent local tax) in the country where the supply is taxed. Defaults to
	// CONSUMER if omitted.
	//
	// Any of "CONSUMER", "BUSINESS".
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Customer information returned in the response. Available with API version 2025-05-12.

func (CalculationResponseCustomer) RawJSON

func (r CalculationResponseCustomer) RawJSON() string

Returns the unmodified JSON received from the API

func (*CalculationResponseCustomer) UnmarshalJSON

func (r *CalculationResponseCustomer) UnmarshalJSON(data []byte) error

type CalculationResponseLineItem

type CalculationResponseLineItem struct {
	AmountExcludingTax float64                                      `json:"amount_excluding_tax"`
	AmountIncludingTax float64                                      `json:"amount_including_tax"`
	Product            CalculationResponseLineItemProduct           `json:"product"`
	Quantity           float64                                      `json:"quantity"`
	TaxAmount          float64                                      `json:"tax_amount"`
	TaxJurisdictions   []CalculationResponseLineItemTaxJurisdiction `json:"tax_jurisdictions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		AmountIncludingTax respjson.Field
		Product            respjson.Field
		Quantity           respjson.Field
		TaxAmount          respjson.Field
		TaxJurisdictions   respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CalculationResponseLineItem) RawJSON

func (r CalculationResponseLineItem) RawJSON() string

Returns the unmodified JSON received from the API

func (*CalculationResponseLineItem) UnmarshalJSON

func (r *CalculationResponseLineItem) UnmarshalJSON(data []byte) error

type CalculationResponseLineItemProduct

type CalculationResponseLineItemProduct struct {
	ProductTaxCode       string `json:"product_tax_code"`
	ReferenceLineItemID  string `json:"reference_line_item_id"`
	ReferenceProductID   string `json:"reference_product_id"`
	ReferenceProductName string `json:"reference_product_name"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ProductTaxCode       respjson.Field
		ReferenceLineItemID  respjson.Field
		ReferenceProductID   respjson.Field
		ReferenceProductName respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CalculationResponseLineItemProduct) RawJSON

Returns the unmodified JSON received from the API

func (*CalculationResponseLineItemProduct) UnmarshalJSON

func (r *CalculationResponseLineItemProduct) UnmarshalJSON(data []byte) error

type CalculationResponseLineItemTaxJurisdiction

type CalculationResponseLineItemTaxJurisdiction struct {
	// The flat fee that is added to this transaction. Like all numeric values, this
	// will be returned in cents and should be added directly to the tax amount
	// independent of other percentages. For example, a $100 transaction taxed at 5%
	// and with a `fee_amount: 50` will lead to `($100 * 5% + 0.50) = $5.50` in tax
	// being charged
	FeeAmount        float64 `json:"fee_amount"`
	JurisdictionName string  `json:"jurisdiction_name"`
	// Additional information about the tax jurisdiction. Available with API version
	// 2025-05-12. For B2B transactions, reverse charge is determined by comparing
	// origin_address.address_country vs customer.address.address_country (same country
	// = domestic VAT, different countries = reverse charge).
	Note     string `json:"note"`
	RateType string `json:"rate_type"`
	// The tax rate percentage applied to this transaction.
	TaxRate float64 `json:"tax_rate"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FeeAmount        respjson.Field
		JurisdictionName respjson.Field
		Note             respjson.Field
		RateType         respjson.Field
		TaxRate          respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CalculationResponseLineItemTaxJurisdiction) RawJSON

Returns the unmodified JSON received from the API

func (*CalculationResponseLineItemTaxJurisdiction) UnmarshalJSON

func (r *CalculationResponseLineItemTaxJurisdiction) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	Options []option.RequestOption
	Tax     TaxService
}

Client creates a struct with services and top level methods that help with interacting with the numeral-api API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r Client)

NewClient generates a new client with the default option read from the environment (NUMERAL_API_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type CustomerResponse

type CustomerResponse struct {
	// The ID of the customer
	ID string `json:"id"`
	// The email of the created customer
	Email string `json:"email"`
	// If true, all `POST /tax/calculations` sold to this customer will return $0 in
	// tax owed. The default value is `false`.
	IsTaxExempt bool `json:"is_tax_exempt"`
	// The name of the created customer
	Name string `json:"name"`
	// The type of object: `tax.customer`
	Object string `json:"object"`
	// The ID of the customer in your system
	ReferenceCustomerID string `json:"reference_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Email               respjson.Field
		IsTaxExempt         respjson.Field
		Name                respjson.Field
		Object              respjson.Field
		ReferenceCustomerID respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CustomerResponse) RawJSON

func (r CustomerResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*CustomerResponse) UnmarshalJSON

func (r *CustomerResponse) UnmarshalJSON(data []byte) error

type DeleteProductResponse

type DeleteProductResponse struct {
	// Epoch datetime representing the date and time the object was deleted
	DeletedAt float64 `json:"deleted_at"`
	// The type of object deleted
	Object string `json:"object"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DeletedAt   respjson.Field
		Object      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DeleteProductResponse) RawJSON

func (r DeleteProductResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*DeleteProductResponse) UnmarshalJSON

func (r *DeleteProductResponse) UnmarshalJSON(data []byte) error

type DeleteTransactionResponse

type DeleteTransactionResponse struct {
	// Epoch datetime representing the date and time the object was deleted
	DeletedAt float64 `json:"deleted_at"`
	// The type of object deleted
	Object string `json:"object"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DeletedAt   respjson.Field
		Object      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DeleteTransactionResponse) RawJSON

func (r DeleteTransactionResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*DeleteTransactionResponse) UnmarshalJSON

func (r *DeleteTransactionResponse) UnmarshalJSON(data []byte) error

type Error

type Error = apierror.Error

type Metadata

type Metadata struct {
	// Storing things like an order number may be useful for reporting and
	// reconciliation.
	ExampleKey string `json:"example_key"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExampleKey  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

You can store arbitrary keys and values in the metadata. Any valid JSON object whose values are less than 255 characters long is accepted.

func (Metadata) RawJSON

func (r Metadata) RawJSON() string

Returns the unmodified JSON received from the API

func (Metadata) ToParam

func (r Metadata) ToParam() MetadataParam

ToParam converts this Metadata to a MetadataParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MetadataParam.Overrides()

func (*Metadata) UnmarshalJSON

func (r *Metadata) UnmarshalJSON(data []byte) error

type MetadataParam

type MetadataParam struct {
	// Storing things like an order number may be useful for reporting and
	// reconciliation.
	ExampleKey param.Opt[string] `json:"example_key,omitzero"`
	// contains filtered or unexported fields
}

You can store arbitrary keys and values in the metadata. Any valid JSON object whose values are less than 255 characters long is accepted.

func (MetadataParam) MarshalJSON

func (r MetadataParam) MarshalJSON() (data []byte, err error)

func (*MetadataParam) UnmarshalJSON

func (r *MetadataParam) UnmarshalJSON(data []byte) error

type ProductResponse

type ProductResponse struct {
	// Epoch datetime representing the date and time the product was created
	CreatedAt float64 `json:"created_at"`
	// The type of object: `tax.product`.
	Object string `json:"object"`
	// The category of the created product
	ProductCategory string `json:"product_category"`
	// The ID of the created product
	ReferenceProductID string `json:"reference_product_id"`
	// The name of the created product
	ReferenceProductName string `json:"reference_product_name"`
	// `True` if using a production API key. `False` if using a test API key.
	Testmode bool `json:"testmode"`
	// Epoch datetime representing the date and time the product was last updated
	UpdatedAt float64 `json:"updated_at"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CreatedAt            respjson.Field
		Object               respjson.Field
		ProductCategory      respjson.Field
		ReferenceProductID   respjson.Field
		ReferenceProductName respjson.Field
		Testmode             respjson.Field
		UpdatedAt            respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ProductResponse) RawJSON

func (r ProductResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProductResponse) UnmarshalJSON

func (r *ProductResponse) UnmarshalJSON(data []byte) error

type RefundResponse

type RefundResponse = shared.RefundResponse

This is an alias to an internal type.

type RefundResponseLineItem

type RefundResponseLineItem = shared.RefundResponseLineItem

This is an alias to an internal type.

type RefundResponseLineItemProduct

type RefundResponseLineItemProduct = shared.RefundResponseLineItemProduct

This is an alias to an internal type.

type RefundResponseLineItemTaxJurisdiction

type RefundResponseLineItemTaxJurisdiction = shared.RefundResponseLineItemTaxJurisdiction

This is an alias to an internal type.

type TaxBridgeConfigurationGetParams

type TaxBridgeConfigurationGetParams struct {
	// Any of "2026-03-01".
	XAPIVersion TaxBridgeConfigurationGetParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type TaxBridgeConfigurationGetParamsXAPIVersion

type TaxBridgeConfigurationGetParamsXAPIVersion string
const (
	TaxBridgeConfigurationGetParamsXAPIVersion2026_03_01 TaxBridgeConfigurationGetParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeConfigurationGetResponse

type TaxBridgeConfigurationGetResponse struct {
	ID            string    `json:"id" api:"required"`
	ActiveVersion int64     `json:"active_version" api:"required"`
	CreatedAt     time.Time `json:"created_at" api:"required" format:"date-time"`
	// Mutable draft. Fields may be omitted while editing, but publish requires a
	// complete valid payload.
	DraftPayload TaxBridgeConfigurationGetResponseDraftPayload `json:"draft_payload" api:"required"`
	Livemode     bool                                          `json:"livemode" api:"required"`
	Name         string                                        `json:"name" api:"required"`
	// Any of "tax.bridge_configuration".
	Object TaxBridgeConfigurationGetResponseObject `json:"object" api:"required"`
	// Any of "draft", "published", "archived".
	Status           TaxBridgeConfigurationGetResponseStatus           `json:"status" api:"required"`
	UpdatedAt        time.Time                                         `json:"updated_at" api:"required" format:"date-time"`
	PublishedPayload TaxBridgeConfigurationGetResponsePublishedPayload `json:"published_payload"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		ActiveVersion    respjson.Field
		CreatedAt        respjson.Field
		DraftPayload     respjson.Field
		Livemode         respjson.Field
		Name             respjson.Field
		Object           respjson.Field
		Status           respjson.Field
		UpdatedAt        respjson.Field
		PublishedPayload respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponse) UnmarshalJSON

func (r *TaxBridgeConfigurationGetResponse) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationGetResponseDraftPayload

type TaxBridgeConfigurationGetResponseDraftPayload struct {
	AllowedOrigins         []string                                                     `json:"allowed_origins" format:"uri"`
	AllowedRedirectOrigins []string                                                     `json:"allowed_redirect_origins" format:"uri"`
	Appearance             map[string]any                                               `json:"appearance"`
	CancelURL              string                                                       `json:"cancel_url" format:"uri"`
	DefaultOfferID         string                                                       `json:"default_offer_id"`
	DefaultProductCategory string                                                       `json:"default_product_category"`
	ExemptionPolicy        TaxBridgeConfigurationGetResponseDraftPayloadExemptionPolicy `json:"exemption_policy"`
	LocaleDefault          string                                                       `json:"locale_default"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                     `json:"mode"`
	Offers        []TaxBridgeConfigurationGetResponseDraftPayloadOffer       `json:"offers"`
	OriginAddress TaxBridgeConfigurationGetResponseDraftPayloadOriginAddress `json:"origin_address"`
	// Any of 1.
	SchemaVersion        int64                                                          `json:"schema_version"`
	SessionExpiryMinutes int64                                                          `json:"session_expiry_minutes"`
	SuccessURL           string                                                         `json:"success_url" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationGetResponseDraftPayloadTaxIdentityPolicy `json:"tax_identity_policy"`
	TaxLocationPolicy    TaxBridgeConfigurationGetResponseDraftPayloadTaxLocationPolicy `json:"tax_location_policy"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedOrigins         respjson.Field
		AllowedRedirectOrigins respjson.Field
		Appearance             respjson.Field
		CancelURL              respjson.Field
		DefaultOfferID         respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		LocaleDefault          respjson.Field
		Mode                   respjson.Field
		Offers                 respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Mutable draft. Fields may be omitted while editing, but publish requires a complete valid payload.

func (TaxBridgeConfigurationGetResponseDraftPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponseDraftPayload) UnmarshalJSON

func (r *TaxBridgeConfigurationGetResponseDraftPayload) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationGetResponseDraftPayloadExemptionPolicy

type TaxBridgeConfigurationGetResponseDraftPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponseDraftPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponseDraftPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationGetResponseDraftPayloadOffer

type TaxBridgeConfigurationGetResponseDraftPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponseDraftPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponseDraftPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationGetResponseDraftPayloadOriginAddress

type TaxBridgeConfigurationGetResponseDraftPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponseDraftPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponseDraftPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationGetResponseDraftPayloadTaxIdentityPolicy

type TaxBridgeConfigurationGetResponseDraftPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponseDraftPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponseDraftPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationGetResponseDraftPayloadTaxLocationPolicy

type TaxBridgeConfigurationGetResponseDraftPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponseDraftPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponseDraftPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationGetResponseObject

type TaxBridgeConfigurationGetResponseObject string
const (
	TaxBridgeConfigurationGetResponseObjectTaxBridgeConfiguration TaxBridgeConfigurationGetResponseObject = "tax.bridge_configuration"
)

type TaxBridgeConfigurationGetResponsePublishedPayload

type TaxBridgeConfigurationGetResponsePublishedPayload struct {
	AllowedRedirectOrigins []string                                                         `json:"allowed_redirect_origins" api:"required" format:"uri"`
	CancelURL              string                                                           `json:"cancel_url" api:"required" format:"uri"`
	DefaultProductCategory string                                                           `json:"default_product_category" api:"required"`
	ExemptionPolicy        TaxBridgeConfigurationGetResponsePublishedPayloadExemptionPolicy `json:"exemption_policy" api:"required"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                         `json:"mode" api:"required"`
	OriginAddress TaxBridgeConfigurationGetResponsePublishedPayloadOriginAddress `json:"origin_address" api:"required"`
	// Any of 1.
	SchemaVersion        int64                                                              `json:"schema_version" api:"required"`
	SessionExpiryMinutes int64                                                              `json:"session_expiry_minutes" api:"required"`
	SuccessURL           string                                                             `json:"success_url" api:"required" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationGetResponsePublishedPayloadTaxIdentityPolicy `json:"tax_identity_policy" api:"required"`
	TaxLocationPolicy    TaxBridgeConfigurationGetResponsePublishedPayloadTaxLocationPolicy `json:"tax_location_policy" api:"required"`
	AllowedOrigins       []string                                                           `json:"allowed_origins" format:"uri"`
	Appearance           map[string]any                                                     `json:"appearance"`
	DefaultOfferID       string                                                             `json:"default_offer_id"`
	LocaleDefault        string                                                             `json:"locale_default"`
	Offers               []TaxBridgeConfigurationGetResponsePublishedPayloadOffer           `json:"offers"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedRedirectOrigins respjson.Field
		CancelURL              respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		Mode                   respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		AllowedOrigins         respjson.Field
		Appearance             respjson.Field
		DefaultOfferID         respjson.Field
		LocaleDefault          respjson.Field
		Offers                 respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponsePublishedPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponsePublishedPayload) UnmarshalJSON

type TaxBridgeConfigurationGetResponsePublishedPayloadExemptionPolicy

type TaxBridgeConfigurationGetResponsePublishedPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponsePublishedPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponsePublishedPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationGetResponsePublishedPayloadOffer

type TaxBridgeConfigurationGetResponsePublishedPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponsePublishedPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponsePublishedPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationGetResponsePublishedPayloadOriginAddress

type TaxBridgeConfigurationGetResponsePublishedPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponsePublishedPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponsePublishedPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationGetResponsePublishedPayloadTaxIdentityPolicy

type TaxBridgeConfigurationGetResponsePublishedPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponsePublishedPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponsePublishedPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationGetResponsePublishedPayloadTaxLocationPolicy

type TaxBridgeConfigurationGetResponsePublishedPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationGetResponsePublishedPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationGetResponsePublishedPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationGetResponseStatus

type TaxBridgeConfigurationGetResponseStatus string
const (
	TaxBridgeConfigurationGetResponseStatusDraft     TaxBridgeConfigurationGetResponseStatus = "draft"
	TaxBridgeConfigurationGetResponseStatusPublished TaxBridgeConfigurationGetResponseStatus = "published"
	TaxBridgeConfigurationGetResponseStatusArchived  TaxBridgeConfigurationGetResponseStatus = "archived"
)

type TaxBridgeConfigurationListParams

type TaxBridgeConfigurationListParams struct {
	// Any of "2026-03-01".
	XAPIVersion TaxBridgeConfigurationListParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	// Opaque cursor from the previous page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (TaxBridgeConfigurationListParams) URLQuery

func (r TaxBridgeConfigurationListParams) URLQuery() (v url.Values, err error)

URLQuery serializes TaxBridgeConfigurationListParams's query parameters as `url.Values`.

type TaxBridgeConfigurationListParamsXAPIVersion

type TaxBridgeConfigurationListParamsXAPIVersion string
const (
	TaxBridgeConfigurationListParamsXAPIVersion2026_03_01 TaxBridgeConfigurationListParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeConfigurationListResponse

type TaxBridgeConfigurationListResponse struct {
	BridgeConfigurations []TaxBridgeConfigurationListResponseBridgeConfiguration `json:"bridge_configurations" api:"required"`
	HasMore              bool                                                    `json:"has_more" api:"required"`
	// Any of "list".
	Object     TaxBridgeConfigurationListResponseObject `json:"object" api:"required"`
	NextCursor string                                   `json:"next_cursor"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BridgeConfigurations respjson.Field
		HasMore              respjson.Field
		Object               respjson.Field
		NextCursor           respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponse) UnmarshalJSON

func (r *TaxBridgeConfigurationListResponse) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationListResponseBridgeConfiguration

type TaxBridgeConfigurationListResponseBridgeConfiguration struct {
	ID            string    `json:"id" api:"required"`
	ActiveVersion int64     `json:"active_version" api:"required"`
	CreatedAt     time.Time `json:"created_at" api:"required" format:"date-time"`
	// Mutable draft. Fields may be omitted while editing, but publish requires a
	// complete valid payload.
	DraftPayload TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayload `json:"draft_payload" api:"required"`
	Livemode     bool                                                              `json:"livemode" api:"required"`
	Name         string                                                            `json:"name" api:"required"`
	// Any of "tax.bridge_configuration".
	Object string `json:"object" api:"required"`
	// Any of "draft", "published", "archived".
	Status           string                                                                `json:"status" api:"required"`
	UpdatedAt        time.Time                                                             `json:"updated_at" api:"required" format:"date-time"`
	PublishedPayload TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayload `json:"published_payload"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		ActiveVersion    respjson.Field
		CreatedAt        respjson.Field
		DraftPayload     respjson.Field
		Livemode         respjson.Field
		Name             respjson.Field
		Object           respjson.Field
		Status           respjson.Field
		UpdatedAt        respjson.Field
		PublishedPayload respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfiguration) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfiguration) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayload

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayload struct {
	AllowedOrigins         []string                                                                         `json:"allowed_origins" format:"uri"`
	AllowedRedirectOrigins []string                                                                         `json:"allowed_redirect_origins" format:"uri"`
	Appearance             map[string]any                                                                   `json:"appearance"`
	CancelURL              string                                                                           `json:"cancel_url" format:"uri"`
	DefaultOfferID         string                                                                           `json:"default_offer_id"`
	DefaultProductCategory string                                                                           `json:"default_product_category"`
	ExemptionPolicy        TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadExemptionPolicy `json:"exemption_policy"`
	LocaleDefault          string                                                                           `json:"locale_default"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                                         `json:"mode"`
	Offers        []TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOffer       `json:"offers"`
	OriginAddress TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOriginAddress `json:"origin_address"`
	// Any of 1.
	SchemaVersion        int64                                                                              `json:"schema_version"`
	SessionExpiryMinutes int64                                                                              `json:"session_expiry_minutes"`
	SuccessURL           string                                                                             `json:"success_url" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxIdentityPolicy `json:"tax_identity_policy"`
	TaxLocationPolicy    TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxLocationPolicy `json:"tax_location_policy"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedOrigins         respjson.Field
		AllowedRedirectOrigins respjson.Field
		Appearance             respjson.Field
		CancelURL              respjson.Field
		DefaultOfferID         respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		LocaleDefault          respjson.Field
		Mode                   respjson.Field
		Offers                 respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Mutable draft. Fields may be omitted while editing, but publish requires a complete valid payload.

func (TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayload) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadExemptionPolicy

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOffer

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOriginAddress

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxIdentityPolicy

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxLocationPolicy

type TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationDraftPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayload

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayload struct {
	AllowedRedirectOrigins []string                                                                             `json:"allowed_redirect_origins" api:"required" format:"uri"`
	CancelURL              string                                                                               `json:"cancel_url" api:"required" format:"uri"`
	DefaultProductCategory string                                                                               `json:"default_product_category" api:"required"`
	ExemptionPolicy        TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadExemptionPolicy `json:"exemption_policy" api:"required"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                                             `json:"mode" api:"required"`
	OriginAddress TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOriginAddress `json:"origin_address" api:"required"`
	// Any of 1.
	SchemaVersion        int64                                                                                  `json:"schema_version" api:"required"`
	SessionExpiryMinutes int64                                                                                  `json:"session_expiry_minutes" api:"required"`
	SuccessURL           string                                                                                 `json:"success_url" api:"required" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxIdentityPolicy `json:"tax_identity_policy" api:"required"`
	TaxLocationPolicy    TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxLocationPolicy `json:"tax_location_policy" api:"required"`
	AllowedOrigins       []string                                                                               `json:"allowed_origins" format:"uri"`
	Appearance           map[string]any                                                                         `json:"appearance"`
	DefaultOfferID       string                                                                                 `json:"default_offer_id"`
	LocaleDefault        string                                                                                 `json:"locale_default"`
	Offers               []TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOffer           `json:"offers"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedRedirectOrigins respjson.Field
		CancelURL              respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		Mode                   respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		AllowedOrigins         respjson.Field
		Appearance             respjson.Field
		DefaultOfferID         respjson.Field
		LocaleDefault          respjson.Field
		Offers                 respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayload) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadExemptionPolicy

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOffer

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOriginAddress

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxIdentityPolicy

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxLocationPolicy

type TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationListResponseBridgeConfigurationPublishedPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationListResponseObject

type TaxBridgeConfigurationListResponseObject string
const (
	TaxBridgeConfigurationListResponseObjectList TaxBridgeConfigurationListResponseObject = "list"
)

type TaxBridgeConfigurationNewParams

type TaxBridgeConfigurationNewParams struct {
	Name string `json:"name" api:"required"`
	// Any of "2026-03-01".
	XAPIVersion TaxBridgeConfigurationNewParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	// Mutable draft. Fields may be omitted while editing, but publish requires a
	// complete valid payload.
	DraftPayload TaxBridgeConfigurationNewParamsDraftPayload `json:"draft_payload,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeConfigurationNewParams) MarshalJSON

func (r TaxBridgeConfigurationNewParams) MarshalJSON() (data []byte, err error)

func (*TaxBridgeConfigurationNewParams) UnmarshalJSON

func (r *TaxBridgeConfigurationNewParams) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationNewParamsDraftPayload

type TaxBridgeConfigurationNewParamsDraftPayload struct {
	CancelURL              param.Opt[string]                                          `json:"cancel_url,omitzero" format:"uri"`
	DefaultOfferID         param.Opt[string]                                          `json:"default_offer_id,omitzero"`
	DefaultProductCategory param.Opt[string]                                          `json:"default_product_category,omitzero"`
	LocaleDefault          param.Opt[string]                                          `json:"locale_default,omitzero"`
	SessionExpiryMinutes   param.Opt[int64]                                           `json:"session_expiry_minutes,omitzero"`
	SuccessURL             param.Opt[string]                                          `json:"success_url,omitzero" format:"uri"`
	AllowedOrigins         []string                                                   `json:"allowed_origins,omitzero" format:"uri"`
	AllowedRedirectOrigins []string                                                   `json:"allowed_redirect_origins,omitzero" format:"uri"`
	Appearance             map[string]any                                             `json:"appearance,omitzero"`
	ExemptionPolicy        TaxBridgeConfigurationNewParamsDraftPayloadExemptionPolicy `json:"exemption_policy,omitzero"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                   `json:"mode,omitzero"`
	Offers        []TaxBridgeConfigurationNewParamsDraftPayloadOffer       `json:"offers,omitzero"`
	OriginAddress TaxBridgeConfigurationNewParamsDraftPayloadOriginAddress `json:"origin_address,omitzero"`
	// Any of 1.
	SchemaVersion     int64                                                        `json:"schema_version,omitzero"`
	TaxIdentityPolicy TaxBridgeConfigurationNewParamsDraftPayloadTaxIdentityPolicy `json:"tax_identity_policy,omitzero"`
	TaxLocationPolicy TaxBridgeConfigurationNewParamsDraftPayloadTaxLocationPolicy `json:"tax_location_policy,omitzero"`
	// contains filtered or unexported fields
}

Mutable draft. Fields may be omitted while editing, but publish requires a complete valid payload.

func (TaxBridgeConfigurationNewParamsDraftPayload) MarshalJSON

func (r TaxBridgeConfigurationNewParamsDraftPayload) MarshalJSON() (data []byte, err error)

func (*TaxBridgeConfigurationNewParamsDraftPayload) UnmarshalJSON

func (r *TaxBridgeConfigurationNewParamsDraftPayload) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationNewParamsDraftPayloadExemptionPolicy

type TaxBridgeConfigurationNewParamsDraftPayloadExemptionPolicy struct {
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeConfigurationNewParamsDraftPayloadExemptionPolicy) MarshalJSON

func (*TaxBridgeConfigurationNewParamsDraftPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationNewParamsDraftPayloadOffer

type TaxBridgeConfigurationNewParamsDraftPayloadOffer struct {
	ID              string           `json:"id" api:"required"`
	PriceID         string           `json:"price_id" api:"required"`
	ProductCategory string           `json:"product_category" api:"required"`
	DefaultQuantity param.Opt[int64] `json:"default_quantity,omitzero"`
	MaxQuantity     param.Opt[int64] `json:"max_quantity,omitzero"`
	MinQuantity     param.Opt[int64] `json:"min_quantity,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, PriceID, ProductCategory are required.

func (TaxBridgeConfigurationNewParamsDraftPayloadOffer) MarshalJSON

func (r TaxBridgeConfigurationNewParamsDraftPayloadOffer) MarshalJSON() (data []byte, err error)

func (*TaxBridgeConfigurationNewParamsDraftPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationNewParamsDraftPayloadOriginAddress

type TaxBridgeConfigurationNewParamsDraftPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string            `json:"country" api:"required"`
	City       param.Opt[string] `json:"city,omitzero"`
	Line1      param.Opt[string] `json:"line_1,omitzero"`
	Line2      param.Opt[string] `json:"line_2,omitzero"`
	PostalCode param.Opt[string] `json:"postal_code,omitzero"`
	// State, province, or region.
	Province param.Opt[string] `json:"province,omitzero"`
	// contains filtered or unexported fields
}

The property Country is required.

func (TaxBridgeConfigurationNewParamsDraftPayloadOriginAddress) MarshalJSON

func (*TaxBridgeConfigurationNewParamsDraftPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationNewParamsDraftPayloadTaxIdentityPolicy

type TaxBridgeConfigurationNewParamsDraftPayloadTaxIdentityPolicy struct {
	CollectCustomerType param.Opt[bool] `json:"collect_customer_type,omitzero"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id,omitzero"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeConfigurationNewParamsDraftPayloadTaxIdentityPolicy) MarshalJSON

func (*TaxBridgeConfigurationNewParamsDraftPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationNewParamsDraftPayloadTaxLocationPolicy

type TaxBridgeConfigurationNewParamsDraftPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string          `json:"basis,omitzero" api:"required"`
	AllowProviderCustomerAddress param.Opt[bool] `json:"allow_provider_customer_address,omitzero"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance,omitzero"`
	// contains filtered or unexported fields
}

The property Basis is required.

func (TaxBridgeConfigurationNewParamsDraftPayloadTaxLocationPolicy) MarshalJSON

func (*TaxBridgeConfigurationNewParamsDraftPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationNewParamsXAPIVersion

type TaxBridgeConfigurationNewParamsXAPIVersion string
const (
	TaxBridgeConfigurationNewParamsXAPIVersion2026_03_01 TaxBridgeConfigurationNewParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeConfigurationNewResponse

type TaxBridgeConfigurationNewResponse struct {
	ID            string    `json:"id" api:"required"`
	ActiveVersion int64     `json:"active_version" api:"required"`
	CreatedAt     time.Time `json:"created_at" api:"required" format:"date-time"`
	// Mutable draft. Fields may be omitted while editing, but publish requires a
	// complete valid payload.
	DraftPayload TaxBridgeConfigurationNewResponseDraftPayload `json:"draft_payload" api:"required"`
	Livemode     bool                                          `json:"livemode" api:"required"`
	Name         string                                        `json:"name" api:"required"`
	// Any of "tax.bridge_configuration".
	Object TaxBridgeConfigurationNewResponseObject `json:"object" api:"required"`
	// Any of "draft", "published", "archived".
	Status           TaxBridgeConfigurationNewResponseStatus           `json:"status" api:"required"`
	UpdatedAt        time.Time                                         `json:"updated_at" api:"required" format:"date-time"`
	PublishedPayload TaxBridgeConfigurationNewResponsePublishedPayload `json:"published_payload"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		ActiveVersion    respjson.Field
		CreatedAt        respjson.Field
		DraftPayload     respjson.Field
		Livemode         respjson.Field
		Name             respjson.Field
		Object           respjson.Field
		Status           respjson.Field
		UpdatedAt        respjson.Field
		PublishedPayload respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponse) UnmarshalJSON

func (r *TaxBridgeConfigurationNewResponse) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationNewResponseDraftPayload

type TaxBridgeConfigurationNewResponseDraftPayload struct {
	AllowedOrigins         []string                                                     `json:"allowed_origins" format:"uri"`
	AllowedRedirectOrigins []string                                                     `json:"allowed_redirect_origins" format:"uri"`
	Appearance             map[string]any                                               `json:"appearance"`
	CancelURL              string                                                       `json:"cancel_url" format:"uri"`
	DefaultOfferID         string                                                       `json:"default_offer_id"`
	DefaultProductCategory string                                                       `json:"default_product_category"`
	ExemptionPolicy        TaxBridgeConfigurationNewResponseDraftPayloadExemptionPolicy `json:"exemption_policy"`
	LocaleDefault          string                                                       `json:"locale_default"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                     `json:"mode"`
	Offers        []TaxBridgeConfigurationNewResponseDraftPayloadOffer       `json:"offers"`
	OriginAddress TaxBridgeConfigurationNewResponseDraftPayloadOriginAddress `json:"origin_address"`
	// Any of 1.
	SchemaVersion        int64                                                          `json:"schema_version"`
	SessionExpiryMinutes int64                                                          `json:"session_expiry_minutes"`
	SuccessURL           string                                                         `json:"success_url" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationNewResponseDraftPayloadTaxIdentityPolicy `json:"tax_identity_policy"`
	TaxLocationPolicy    TaxBridgeConfigurationNewResponseDraftPayloadTaxLocationPolicy `json:"tax_location_policy"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedOrigins         respjson.Field
		AllowedRedirectOrigins respjson.Field
		Appearance             respjson.Field
		CancelURL              respjson.Field
		DefaultOfferID         respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		LocaleDefault          respjson.Field
		Mode                   respjson.Field
		Offers                 respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Mutable draft. Fields may be omitted while editing, but publish requires a complete valid payload.

func (TaxBridgeConfigurationNewResponseDraftPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponseDraftPayload) UnmarshalJSON

func (r *TaxBridgeConfigurationNewResponseDraftPayload) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationNewResponseDraftPayloadExemptionPolicy

type TaxBridgeConfigurationNewResponseDraftPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponseDraftPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponseDraftPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationNewResponseDraftPayloadOffer

type TaxBridgeConfigurationNewResponseDraftPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponseDraftPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponseDraftPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationNewResponseDraftPayloadOriginAddress

type TaxBridgeConfigurationNewResponseDraftPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponseDraftPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponseDraftPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationNewResponseDraftPayloadTaxIdentityPolicy

type TaxBridgeConfigurationNewResponseDraftPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponseDraftPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponseDraftPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationNewResponseDraftPayloadTaxLocationPolicy

type TaxBridgeConfigurationNewResponseDraftPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponseDraftPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponseDraftPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationNewResponseObject

type TaxBridgeConfigurationNewResponseObject string
const (
	TaxBridgeConfigurationNewResponseObjectTaxBridgeConfiguration TaxBridgeConfigurationNewResponseObject = "tax.bridge_configuration"
)

type TaxBridgeConfigurationNewResponsePublishedPayload

type TaxBridgeConfigurationNewResponsePublishedPayload struct {
	AllowedRedirectOrigins []string                                                         `json:"allowed_redirect_origins" api:"required" format:"uri"`
	CancelURL              string                                                           `json:"cancel_url" api:"required" format:"uri"`
	DefaultProductCategory string                                                           `json:"default_product_category" api:"required"`
	ExemptionPolicy        TaxBridgeConfigurationNewResponsePublishedPayloadExemptionPolicy `json:"exemption_policy" api:"required"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                         `json:"mode" api:"required"`
	OriginAddress TaxBridgeConfigurationNewResponsePublishedPayloadOriginAddress `json:"origin_address" api:"required"`
	// Any of 1.
	SchemaVersion        int64                                                              `json:"schema_version" api:"required"`
	SessionExpiryMinutes int64                                                              `json:"session_expiry_minutes" api:"required"`
	SuccessURL           string                                                             `json:"success_url" api:"required" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationNewResponsePublishedPayloadTaxIdentityPolicy `json:"tax_identity_policy" api:"required"`
	TaxLocationPolicy    TaxBridgeConfigurationNewResponsePublishedPayloadTaxLocationPolicy `json:"tax_location_policy" api:"required"`
	AllowedOrigins       []string                                                           `json:"allowed_origins" format:"uri"`
	Appearance           map[string]any                                                     `json:"appearance"`
	DefaultOfferID       string                                                             `json:"default_offer_id"`
	LocaleDefault        string                                                             `json:"locale_default"`
	Offers               []TaxBridgeConfigurationNewResponsePublishedPayloadOffer           `json:"offers"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedRedirectOrigins respjson.Field
		CancelURL              respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		Mode                   respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		AllowedOrigins         respjson.Field
		Appearance             respjson.Field
		DefaultOfferID         respjson.Field
		LocaleDefault          respjson.Field
		Offers                 respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponsePublishedPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponsePublishedPayload) UnmarshalJSON

type TaxBridgeConfigurationNewResponsePublishedPayloadExemptionPolicy

type TaxBridgeConfigurationNewResponsePublishedPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponsePublishedPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponsePublishedPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationNewResponsePublishedPayloadOffer

type TaxBridgeConfigurationNewResponsePublishedPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponsePublishedPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponsePublishedPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationNewResponsePublishedPayloadOriginAddress

type TaxBridgeConfigurationNewResponsePublishedPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponsePublishedPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponsePublishedPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationNewResponsePublishedPayloadTaxIdentityPolicy

type TaxBridgeConfigurationNewResponsePublishedPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponsePublishedPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponsePublishedPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationNewResponsePublishedPayloadTaxLocationPolicy

type TaxBridgeConfigurationNewResponsePublishedPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationNewResponsePublishedPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationNewResponsePublishedPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationNewResponseStatus

type TaxBridgeConfigurationNewResponseStatus string
const (
	TaxBridgeConfigurationNewResponseStatusDraft     TaxBridgeConfigurationNewResponseStatus = "draft"
	TaxBridgeConfigurationNewResponseStatusPublished TaxBridgeConfigurationNewResponseStatus = "published"
	TaxBridgeConfigurationNewResponseStatusArchived  TaxBridgeConfigurationNewResponseStatus = "archived"
)

type TaxBridgeConfigurationPublishParams

type TaxBridgeConfigurationPublishParams struct {
	// Any of "2026-03-01".
	XAPIVersion TaxBridgeConfigurationPublishParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	// An existing Numeral Stripe connection ID. No Stripe secret key is accepted.
	StripeConnectionID param.Opt[string] `json:"stripe_connection_id,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeConfigurationPublishParams) MarshalJSON

func (r TaxBridgeConfigurationPublishParams) MarshalJSON() (data []byte, err error)

func (*TaxBridgeConfigurationPublishParams) UnmarshalJSON

func (r *TaxBridgeConfigurationPublishParams) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationPublishParamsXAPIVersion

type TaxBridgeConfigurationPublishParamsXAPIVersion string
const (
	TaxBridgeConfigurationPublishParamsXAPIVersion2026_03_01 TaxBridgeConfigurationPublishParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeConfigurationPublishResponse

type TaxBridgeConfigurationPublishResponse struct {
	ID            string    `json:"id" api:"required"`
	ActiveVersion int64     `json:"active_version" api:"required"`
	CreatedAt     time.Time `json:"created_at" api:"required" format:"date-time"`
	// Mutable draft. Fields may be omitted while editing, but publish requires a
	// complete valid payload.
	DraftPayload TaxBridgeConfigurationPublishResponseDraftPayload `json:"draft_payload" api:"required"`
	Livemode     bool                                              `json:"livemode" api:"required"`
	Name         string                                            `json:"name" api:"required"`
	// Any of "tax.bridge_configuration".
	Object TaxBridgeConfigurationPublishResponseObject `json:"object" api:"required"`
	// Any of "draft", "published", "archived".
	Status           TaxBridgeConfigurationPublishResponseStatus           `json:"status" api:"required"`
	UpdatedAt        time.Time                                             `json:"updated_at" api:"required" format:"date-time"`
	PublishedPayload TaxBridgeConfigurationPublishResponsePublishedPayload `json:"published_payload"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		ActiveVersion    respjson.Field
		CreatedAt        respjson.Field
		DraftPayload     respjson.Field
		Livemode         respjson.Field
		Name             respjson.Field
		Object           respjson.Field
		Status           respjson.Field
		UpdatedAt        respjson.Field
		PublishedPayload respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponse) UnmarshalJSON

func (r *TaxBridgeConfigurationPublishResponse) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationPublishResponseDraftPayload

type TaxBridgeConfigurationPublishResponseDraftPayload struct {
	AllowedOrigins         []string                                                         `json:"allowed_origins" format:"uri"`
	AllowedRedirectOrigins []string                                                         `json:"allowed_redirect_origins" format:"uri"`
	Appearance             map[string]any                                                   `json:"appearance"`
	CancelURL              string                                                           `json:"cancel_url" format:"uri"`
	DefaultOfferID         string                                                           `json:"default_offer_id"`
	DefaultProductCategory string                                                           `json:"default_product_category"`
	ExemptionPolicy        TaxBridgeConfigurationPublishResponseDraftPayloadExemptionPolicy `json:"exemption_policy"`
	LocaleDefault          string                                                           `json:"locale_default"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                         `json:"mode"`
	Offers        []TaxBridgeConfigurationPublishResponseDraftPayloadOffer       `json:"offers"`
	OriginAddress TaxBridgeConfigurationPublishResponseDraftPayloadOriginAddress `json:"origin_address"`
	// Any of 1.
	SchemaVersion        int64                                                              `json:"schema_version"`
	SessionExpiryMinutes int64                                                              `json:"session_expiry_minutes"`
	SuccessURL           string                                                             `json:"success_url" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationPublishResponseDraftPayloadTaxIdentityPolicy `json:"tax_identity_policy"`
	TaxLocationPolicy    TaxBridgeConfigurationPublishResponseDraftPayloadTaxLocationPolicy `json:"tax_location_policy"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedOrigins         respjson.Field
		AllowedRedirectOrigins respjson.Field
		Appearance             respjson.Field
		CancelURL              respjson.Field
		DefaultOfferID         respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		LocaleDefault          respjson.Field
		Mode                   respjson.Field
		Offers                 respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Mutable draft. Fields may be omitted while editing, but publish requires a complete valid payload.

func (TaxBridgeConfigurationPublishResponseDraftPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponseDraftPayload) UnmarshalJSON

type TaxBridgeConfigurationPublishResponseDraftPayloadExemptionPolicy

type TaxBridgeConfigurationPublishResponseDraftPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponseDraftPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponseDraftPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationPublishResponseDraftPayloadOffer

type TaxBridgeConfigurationPublishResponseDraftPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponseDraftPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponseDraftPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationPublishResponseDraftPayloadOriginAddress

type TaxBridgeConfigurationPublishResponseDraftPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponseDraftPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponseDraftPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationPublishResponseDraftPayloadTaxIdentityPolicy

type TaxBridgeConfigurationPublishResponseDraftPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponseDraftPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponseDraftPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationPublishResponseDraftPayloadTaxLocationPolicy

type TaxBridgeConfigurationPublishResponseDraftPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponseDraftPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponseDraftPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationPublishResponseObject

type TaxBridgeConfigurationPublishResponseObject string
const (
	TaxBridgeConfigurationPublishResponseObjectTaxBridgeConfiguration TaxBridgeConfigurationPublishResponseObject = "tax.bridge_configuration"
)

type TaxBridgeConfigurationPublishResponsePublishedPayload

type TaxBridgeConfigurationPublishResponsePublishedPayload struct {
	AllowedRedirectOrigins []string                                                             `json:"allowed_redirect_origins" api:"required" format:"uri"`
	CancelURL              string                                                               `json:"cancel_url" api:"required" format:"uri"`
	DefaultProductCategory string                                                               `json:"default_product_category" api:"required"`
	ExemptionPolicy        TaxBridgeConfigurationPublishResponsePublishedPayloadExemptionPolicy `json:"exemption_policy" api:"required"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                             `json:"mode" api:"required"`
	OriginAddress TaxBridgeConfigurationPublishResponsePublishedPayloadOriginAddress `json:"origin_address" api:"required"`
	// Any of 1.
	SchemaVersion        int64                                                                  `json:"schema_version" api:"required"`
	SessionExpiryMinutes int64                                                                  `json:"session_expiry_minutes" api:"required"`
	SuccessURL           string                                                                 `json:"success_url" api:"required" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationPublishResponsePublishedPayloadTaxIdentityPolicy `json:"tax_identity_policy" api:"required"`
	TaxLocationPolicy    TaxBridgeConfigurationPublishResponsePublishedPayloadTaxLocationPolicy `json:"tax_location_policy" api:"required"`
	AllowedOrigins       []string                                                               `json:"allowed_origins" format:"uri"`
	Appearance           map[string]any                                                         `json:"appearance"`
	DefaultOfferID       string                                                                 `json:"default_offer_id"`
	LocaleDefault        string                                                                 `json:"locale_default"`
	Offers               []TaxBridgeConfigurationPublishResponsePublishedPayloadOffer           `json:"offers"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedRedirectOrigins respjson.Field
		CancelURL              respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		Mode                   respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		AllowedOrigins         respjson.Field
		Appearance             respjson.Field
		DefaultOfferID         respjson.Field
		LocaleDefault          respjson.Field
		Offers                 respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponsePublishedPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponsePublishedPayload) UnmarshalJSON

type TaxBridgeConfigurationPublishResponsePublishedPayloadExemptionPolicy

type TaxBridgeConfigurationPublishResponsePublishedPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponsePublishedPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponsePublishedPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationPublishResponsePublishedPayloadOffer

type TaxBridgeConfigurationPublishResponsePublishedPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponsePublishedPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponsePublishedPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationPublishResponsePublishedPayloadOriginAddress

type TaxBridgeConfigurationPublishResponsePublishedPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponsePublishedPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponsePublishedPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationPublishResponsePublishedPayloadTaxIdentityPolicy

type TaxBridgeConfigurationPublishResponsePublishedPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponsePublishedPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponsePublishedPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationPublishResponsePublishedPayloadTaxLocationPolicy

type TaxBridgeConfigurationPublishResponsePublishedPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationPublishResponsePublishedPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationPublishResponsePublishedPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationPublishResponseStatus

type TaxBridgeConfigurationPublishResponseStatus string
const (
	TaxBridgeConfigurationPublishResponseStatusDraft     TaxBridgeConfigurationPublishResponseStatus = "draft"
	TaxBridgeConfigurationPublishResponseStatusPublished TaxBridgeConfigurationPublishResponseStatus = "published"
	TaxBridgeConfigurationPublishResponseStatusArchived  TaxBridgeConfigurationPublishResponseStatus = "archived"
)

type TaxBridgeConfigurationService

type TaxBridgeConfigurationService struct {
	Options []option.RequestOption
}

TaxBridgeConfigurationService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxBridgeConfigurationService method instead.

func NewTaxBridgeConfigurationService

func NewTaxBridgeConfigurationService(opts ...option.RequestOption) (r TaxBridgeConfigurationService)

NewTaxBridgeConfigurationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxBridgeConfigurationService) Get

Retrieve a Stripe Checkout configuration

func (*TaxBridgeConfigurationService) List

Lists Numeral for Stripe Checkout configurations for the authenticated account and API-key environment.

func (*TaxBridgeConfigurationService) New

Creates a mutable draft configuration. Publish it before creating sessions.

func (*TaxBridgeConfigurationService) Publish

Validates the draft, pins the selected existing Stripe connection, and publishes an immutable version. Stripe secret keys are never accepted by this endpoint.

func (*TaxBridgeConfigurationService) Update

Updates the mutable draft. Published versions already pinned to sessions do not change.

type TaxBridgeConfigurationUpdateParams

type TaxBridgeConfigurationUpdateParams struct {
	// Any of "2026-03-01".
	XAPIVersion TaxBridgeConfigurationUpdateParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	Name        param.Opt[string]                             `json:"name,omitzero"`
	// Mutable draft. Fields may be omitted while editing, but publish requires a
	// complete valid payload.
	DraftPayload TaxBridgeConfigurationUpdateParamsDraftPayload `json:"draft_payload,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeConfigurationUpdateParams) MarshalJSON

func (r TaxBridgeConfigurationUpdateParams) MarshalJSON() (data []byte, err error)

func (*TaxBridgeConfigurationUpdateParams) UnmarshalJSON

func (r *TaxBridgeConfigurationUpdateParams) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationUpdateParamsDraftPayload

type TaxBridgeConfigurationUpdateParamsDraftPayload struct {
	CancelURL              param.Opt[string]                                             `json:"cancel_url,omitzero" format:"uri"`
	DefaultOfferID         param.Opt[string]                                             `json:"default_offer_id,omitzero"`
	DefaultProductCategory param.Opt[string]                                             `json:"default_product_category,omitzero"`
	LocaleDefault          param.Opt[string]                                             `json:"locale_default,omitzero"`
	SessionExpiryMinutes   param.Opt[int64]                                              `json:"session_expiry_minutes,omitzero"`
	SuccessURL             param.Opt[string]                                             `json:"success_url,omitzero" format:"uri"`
	AllowedOrigins         []string                                                      `json:"allowed_origins,omitzero" format:"uri"`
	AllowedRedirectOrigins []string                                                      `json:"allowed_redirect_origins,omitzero" format:"uri"`
	Appearance             map[string]any                                                `json:"appearance,omitzero"`
	ExemptionPolicy        TaxBridgeConfigurationUpdateParamsDraftPayloadExemptionPolicy `json:"exemption_policy,omitzero"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                      `json:"mode,omitzero"`
	Offers        []TaxBridgeConfigurationUpdateParamsDraftPayloadOffer       `json:"offers,omitzero"`
	OriginAddress TaxBridgeConfigurationUpdateParamsDraftPayloadOriginAddress `json:"origin_address,omitzero"`
	// Any of 1.
	SchemaVersion     int64                                                           `json:"schema_version,omitzero"`
	TaxIdentityPolicy TaxBridgeConfigurationUpdateParamsDraftPayloadTaxIdentityPolicy `json:"tax_identity_policy,omitzero"`
	TaxLocationPolicy TaxBridgeConfigurationUpdateParamsDraftPayloadTaxLocationPolicy `json:"tax_location_policy,omitzero"`
	// contains filtered or unexported fields
}

Mutable draft. Fields may be omitted while editing, but publish requires a complete valid payload.

func (TaxBridgeConfigurationUpdateParamsDraftPayload) MarshalJSON

func (r TaxBridgeConfigurationUpdateParamsDraftPayload) MarshalJSON() (data []byte, err error)

func (*TaxBridgeConfigurationUpdateParamsDraftPayload) UnmarshalJSON

type TaxBridgeConfigurationUpdateParamsDraftPayloadExemptionPolicy

type TaxBridgeConfigurationUpdateParamsDraftPayloadExemptionPolicy struct {
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeConfigurationUpdateParamsDraftPayloadExemptionPolicy) MarshalJSON

func (*TaxBridgeConfigurationUpdateParamsDraftPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationUpdateParamsDraftPayloadOffer

type TaxBridgeConfigurationUpdateParamsDraftPayloadOffer struct {
	ID              string           `json:"id" api:"required"`
	PriceID         string           `json:"price_id" api:"required"`
	ProductCategory string           `json:"product_category" api:"required"`
	DefaultQuantity param.Opt[int64] `json:"default_quantity,omitzero"`
	MaxQuantity     param.Opt[int64] `json:"max_quantity,omitzero"`
	MinQuantity     param.Opt[int64] `json:"min_quantity,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, PriceID, ProductCategory are required.

func (TaxBridgeConfigurationUpdateParamsDraftPayloadOffer) MarshalJSON

func (r TaxBridgeConfigurationUpdateParamsDraftPayloadOffer) MarshalJSON() (data []byte, err error)

func (*TaxBridgeConfigurationUpdateParamsDraftPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationUpdateParamsDraftPayloadOriginAddress

type TaxBridgeConfigurationUpdateParamsDraftPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string            `json:"country" api:"required"`
	City       param.Opt[string] `json:"city,omitzero"`
	Line1      param.Opt[string] `json:"line_1,omitzero"`
	Line2      param.Opt[string] `json:"line_2,omitzero"`
	PostalCode param.Opt[string] `json:"postal_code,omitzero"`
	// State, province, or region.
	Province param.Opt[string] `json:"province,omitzero"`
	// contains filtered or unexported fields
}

The property Country is required.

func (TaxBridgeConfigurationUpdateParamsDraftPayloadOriginAddress) MarshalJSON

func (*TaxBridgeConfigurationUpdateParamsDraftPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationUpdateParamsDraftPayloadTaxIdentityPolicy

type TaxBridgeConfigurationUpdateParamsDraftPayloadTaxIdentityPolicy struct {
	CollectCustomerType param.Opt[bool] `json:"collect_customer_type,omitzero"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id,omitzero"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeConfigurationUpdateParamsDraftPayloadTaxIdentityPolicy) MarshalJSON

func (*TaxBridgeConfigurationUpdateParamsDraftPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationUpdateParamsDraftPayloadTaxLocationPolicy

type TaxBridgeConfigurationUpdateParamsDraftPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string          `json:"basis,omitzero" api:"required"`
	AllowProviderCustomerAddress param.Opt[bool] `json:"allow_provider_customer_address,omitzero"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance,omitzero"`
	// contains filtered or unexported fields
}

The property Basis is required.

func (TaxBridgeConfigurationUpdateParamsDraftPayloadTaxLocationPolicy) MarshalJSON

func (*TaxBridgeConfigurationUpdateParamsDraftPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationUpdateParamsXAPIVersion

type TaxBridgeConfigurationUpdateParamsXAPIVersion string
const (
	TaxBridgeConfigurationUpdateParamsXAPIVersion2026_03_01 TaxBridgeConfigurationUpdateParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeConfigurationUpdateResponse

type TaxBridgeConfigurationUpdateResponse struct {
	ID            string    `json:"id" api:"required"`
	ActiveVersion int64     `json:"active_version" api:"required"`
	CreatedAt     time.Time `json:"created_at" api:"required" format:"date-time"`
	// Mutable draft. Fields may be omitted while editing, but publish requires a
	// complete valid payload.
	DraftPayload TaxBridgeConfigurationUpdateResponseDraftPayload `json:"draft_payload" api:"required"`
	Livemode     bool                                             `json:"livemode" api:"required"`
	Name         string                                           `json:"name" api:"required"`
	// Any of "tax.bridge_configuration".
	Object TaxBridgeConfigurationUpdateResponseObject `json:"object" api:"required"`
	// Any of "draft", "published", "archived".
	Status           TaxBridgeConfigurationUpdateResponseStatus           `json:"status" api:"required"`
	UpdatedAt        time.Time                                            `json:"updated_at" api:"required" format:"date-time"`
	PublishedPayload TaxBridgeConfigurationUpdateResponsePublishedPayload `json:"published_payload"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		ActiveVersion    respjson.Field
		CreatedAt        respjson.Field
		DraftPayload     respjson.Field
		Livemode         respjson.Field
		Name             respjson.Field
		Object           respjson.Field
		Status           respjson.Field
		UpdatedAt        respjson.Field
		PublishedPayload respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponse) UnmarshalJSON

func (r *TaxBridgeConfigurationUpdateResponse) UnmarshalJSON(data []byte) error

type TaxBridgeConfigurationUpdateResponseDraftPayload

type TaxBridgeConfigurationUpdateResponseDraftPayload struct {
	AllowedOrigins         []string                                                        `json:"allowed_origins" format:"uri"`
	AllowedRedirectOrigins []string                                                        `json:"allowed_redirect_origins" format:"uri"`
	Appearance             map[string]any                                                  `json:"appearance"`
	CancelURL              string                                                          `json:"cancel_url" format:"uri"`
	DefaultOfferID         string                                                          `json:"default_offer_id"`
	DefaultProductCategory string                                                          `json:"default_product_category"`
	ExemptionPolicy        TaxBridgeConfigurationUpdateResponseDraftPayloadExemptionPolicy `json:"exemption_policy"`
	LocaleDefault          string                                                          `json:"locale_default"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                        `json:"mode"`
	Offers        []TaxBridgeConfigurationUpdateResponseDraftPayloadOffer       `json:"offers"`
	OriginAddress TaxBridgeConfigurationUpdateResponseDraftPayloadOriginAddress `json:"origin_address"`
	// Any of 1.
	SchemaVersion        int64                                                             `json:"schema_version"`
	SessionExpiryMinutes int64                                                             `json:"session_expiry_minutes"`
	SuccessURL           string                                                            `json:"success_url" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationUpdateResponseDraftPayloadTaxIdentityPolicy `json:"tax_identity_policy"`
	TaxLocationPolicy    TaxBridgeConfigurationUpdateResponseDraftPayloadTaxLocationPolicy `json:"tax_location_policy"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedOrigins         respjson.Field
		AllowedRedirectOrigins respjson.Field
		Appearance             respjson.Field
		CancelURL              respjson.Field
		DefaultOfferID         respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		LocaleDefault          respjson.Field
		Mode                   respjson.Field
		Offers                 respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Mutable draft. Fields may be omitted while editing, but publish requires a complete valid payload.

func (TaxBridgeConfigurationUpdateResponseDraftPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponseDraftPayload) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponseDraftPayloadExemptionPolicy

type TaxBridgeConfigurationUpdateResponseDraftPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponseDraftPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponseDraftPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponseDraftPayloadOffer

type TaxBridgeConfigurationUpdateResponseDraftPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponseDraftPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponseDraftPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponseDraftPayloadOriginAddress

type TaxBridgeConfigurationUpdateResponseDraftPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponseDraftPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponseDraftPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponseDraftPayloadTaxIdentityPolicy

type TaxBridgeConfigurationUpdateResponseDraftPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponseDraftPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponseDraftPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponseDraftPayloadTaxLocationPolicy

type TaxBridgeConfigurationUpdateResponseDraftPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponseDraftPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponseDraftPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponseObject

type TaxBridgeConfigurationUpdateResponseObject string
const (
	TaxBridgeConfigurationUpdateResponseObjectTaxBridgeConfiguration TaxBridgeConfigurationUpdateResponseObject = "tax.bridge_configuration"
)

type TaxBridgeConfigurationUpdateResponsePublishedPayload

type TaxBridgeConfigurationUpdateResponsePublishedPayload struct {
	AllowedRedirectOrigins []string                                                            `json:"allowed_redirect_origins" api:"required" format:"uri"`
	CancelURL              string                                                              `json:"cancel_url" api:"required" format:"uri"`
	DefaultProductCategory string                                                              `json:"default_product_category" api:"required"`
	ExemptionPolicy        TaxBridgeConfigurationUpdateResponsePublishedPayloadExemptionPolicy `json:"exemption_policy" api:"required"`
	// Default Stripe Checkout mode for sessions that do not explicitly provide
	// checkout.mode. Individual sessions may select payment or subscription.
	//
	// Any of "payment", "subscription".
	Mode          string                                                            `json:"mode" api:"required"`
	OriginAddress TaxBridgeConfigurationUpdateResponsePublishedPayloadOriginAddress `json:"origin_address" api:"required"`
	// Any of 1.
	SchemaVersion        int64                                                                 `json:"schema_version" api:"required"`
	SessionExpiryMinutes int64                                                                 `json:"session_expiry_minutes" api:"required"`
	SuccessURL           string                                                                `json:"success_url" api:"required" format:"uri"`
	TaxIdentityPolicy    TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxIdentityPolicy `json:"tax_identity_policy" api:"required"`
	TaxLocationPolicy    TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxLocationPolicy `json:"tax_location_policy" api:"required"`
	AllowedOrigins       []string                                                              `json:"allowed_origins" format:"uri"`
	Appearance           map[string]any                                                        `json:"appearance"`
	DefaultOfferID       string                                                                `json:"default_offer_id"`
	LocaleDefault        string                                                                `json:"locale_default"`
	Offers               []TaxBridgeConfigurationUpdateResponsePublishedPayloadOffer           `json:"offers"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedRedirectOrigins respjson.Field
		CancelURL              respjson.Field
		DefaultProductCategory respjson.Field
		ExemptionPolicy        respjson.Field
		Mode                   respjson.Field
		OriginAddress          respjson.Field
		SchemaVersion          respjson.Field
		SessionExpiryMinutes   respjson.Field
		SuccessURL             respjson.Field
		TaxIdentityPolicy      respjson.Field
		TaxLocationPolicy      respjson.Field
		AllowedOrigins         respjson.Field
		Appearance             respjson.Field
		DefaultOfferID         respjson.Field
		LocaleDefault          respjson.Field
		Offers                 respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponsePublishedPayload) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponsePublishedPayload) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponsePublishedPayloadExemptionPolicy

type TaxBridgeConfigurationUpdateResponsePublishedPayloadExemptionPolicy struct {
	Enabled bool `json:"enabled"`
	// Any of "charge_tax_until_approved", "block_until_approved", "merchant_review".
	Pending string `json:"pending"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Pending     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponsePublishedPayloadExemptionPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponsePublishedPayloadExemptionPolicy) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponsePublishedPayloadOffer

type TaxBridgeConfigurationUpdateResponsePublishedPayloadOffer struct {
	ID              string `json:"id" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	DefaultQuantity int64  `json:"default_quantity"`
	MaxQuantity     int64  `json:"max_quantity"`
	MinQuantity     int64  `json:"min_quantity"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		PriceID         respjson.Field
		ProductCategory respjson.Field
		DefaultQuantity respjson.Field
		MaxQuantity     respjson.Field
		MinQuantity     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponsePublishedPayloadOffer) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponsePublishedPayloadOffer) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponsePublishedPayloadOriginAddress

type TaxBridgeConfigurationUpdateResponsePublishedPayloadOriginAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponsePublishedPayloadOriginAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponsePublishedPayloadOriginAddress) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxIdentityPolicy

type TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxIdentityPolicy struct {
	CollectCustomerType bool `json:"collect_customer_type"`
	// Any of "when_business", "never".
	CollectTaxID string `json:"collect_tax_id"`
	// Any of "reject", "treat_as_consumer".
	InvalidTaxIDFallback string `json:"invalid_tax_id_fallback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CollectCustomerType  respjson.Field
		CollectTaxID         respjson.Field
		InvalidTaxIDFallback respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxIdentityPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxIdentityPolicy) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxLocationPolicy

type TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxLocationPolicy struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis                        string `json:"basis" api:"required"`
	AllowProviderCustomerAddress bool   `json:"allow_provider_customer_address"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	MinAssurance string `json:"min_assurance"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Basis                        respjson.Field
		AllowProviderCustomerAddress respjson.Field
		MinAssurance                 respjson.Field
		ExtraFields                  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxLocationPolicy) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeConfigurationUpdateResponsePublishedPayloadTaxLocationPolicy) UnmarshalJSON

type TaxBridgeConfigurationUpdateResponseStatus

type TaxBridgeConfigurationUpdateResponseStatus string
const (
	TaxBridgeConfigurationUpdateResponseStatusDraft     TaxBridgeConfigurationUpdateResponseStatus = "draft"
	TaxBridgeConfigurationUpdateResponseStatusPublished TaxBridgeConfigurationUpdateResponseStatus = "published"
	TaxBridgeConfigurationUpdateResponseStatusArchived  TaxBridgeConfigurationUpdateResponseStatus = "archived"
)

type TaxBridgeService

type TaxBridgeService struct {
	Options        []option.RequestOption
	Configurations TaxBridgeConfigurationService
	Sessions       TaxBridgeSessionService
}

TaxBridgeService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxBridgeService method instead.

func NewTaxBridgeService

func NewTaxBridgeService(opts ...option.RequestOption) (r TaxBridgeService)

NewTaxBridgeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type TaxBridgeSessionCancelParams

type TaxBridgeSessionCancelParams struct {
	// Any of "2026-03-01".
	XAPIVersion TaxBridgeSessionCancelParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	// Any of "requested".
	Reason TaxBridgeSessionCancelParamsReason `json:"reason,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionCancelParams) MarshalJSON

func (r TaxBridgeSessionCancelParams) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionCancelParams) UnmarshalJSON

func (r *TaxBridgeSessionCancelParams) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelParamsReason

type TaxBridgeSessionCancelParamsReason string
const (
	TaxBridgeSessionCancelParamsReasonRequested TaxBridgeSessionCancelParamsReason = "requested"
)

type TaxBridgeSessionCancelParamsXAPIVersion

type TaxBridgeSessionCancelParamsXAPIVersion string
const (
	TaxBridgeSessionCancelParamsXAPIVersion2026_03_01 TaxBridgeSessionCancelParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeSessionCancelResponse

type TaxBridgeSessionCancelResponse struct {
	ID string `json:"id" api:"required"`
	// Any of "requested", "superseded", "configuration_disabled".
	CancellationReason TaxBridgeSessionCancelResponseCancellationReason `json:"cancellation_reason" api:"required"`
	Checkout           TaxBridgeSessionCancelResponseCheckout           `json:"checkout" api:"required"`
	// Any of "hosted", "embedded".
	CollectionMode TaxBridgeSessionCancelResponseCollectionMode `json:"collection_mode" api:"required"`
	CompletedAt    time.Time                                    `json:"completed_at" api:"required" format:"date-time"`
	ConfigID       string                                       `json:"config_id" api:"required"`
	ConfigVersion  int64                                        `json:"config_version" api:"required"`
	// Any of "automatic", "manual".
	ConfirmationMethod TaxBridgeSessionCancelResponseConfirmationMethod `json:"confirmation_method" api:"required"`
	CreatedAt          time.Time                                        `json:"created_at" api:"required" format:"date-time"`
	CustomerContext    TaxBridgeSessionCancelResponseCustomerContext    `json:"customer_context" api:"required"`
	ExpiresAt          time.Time                                        `json:"expires_at" api:"required" format:"date-time"`
	ExternalReference  string                                           `json:"external_reference" api:"required"`
	LastError          TaxBridgeSessionCancelResponseLastError          `json:"last_error" api:"required"`
	NextAction         TaxBridgeSessionCancelResponseNextAction         `json:"next_action" api:"required"`
	// Any of "tax.bridge_session".
	Object TaxBridgeSessionCancelResponseObject `json:"object" api:"required"`
	// Any of "not_started", "unpaid", "processing", "paid", "failed",
	// "no_payment_required".
	PaymentStatus TaxBridgeSessionCancelResponsePaymentStatus `json:"payment_status" api:"required"`
	// Any of "requires_input", "requires_review", "ready_for_confirmation",
	// "processing", "provider_session_ready".
	Phase                TaxBridgeSessionCancelResponsePhase           `json:"phase" api:"required"`
	Provider             TaxBridgeSessionCancelResponseProvider        `json:"provider" api:"required"`
	ProviderSession      TaxBridgeSessionCancelResponseProviderSession `json:"provider_session" api:"required"`
	Quote                TaxBridgeSessionCancelResponseQuote           `json:"quote" api:"required"`
	ReplacementSessionID string                                        `json:"replacement_session_id" api:"required"`
	ReplacesSessionID    string                                        `json:"replaces_session_id" api:"required"`
	Requirements         []TaxBridgeSessionCancelResponseRequirement   `json:"requirements" api:"required"`
	// Any of "open", "complete", "expired", "canceled", "failed".
	Status     TaxBridgeSessionCancelResponseStatus     `json:"status" api:"required"`
	TaxContext TaxBridgeSessionCancelResponseTaxContext `json:"tax_context" api:"required"`
	// Any of "not_calculated", "requires_input", "pending_review", "calculated",
	// "provider_verified", "committed", "reconciled", "mismatch", "voided",
	// "not_applicable".
	TaxStatus TaxBridgeSessionCancelResponseTaxStatus `json:"tax_status" api:"required"`
	Testmode  bool                                    `json:"testmode" api:"required"`
	UpdatedAt time.Time                               `json:"updated_at" api:"required" format:"date-time"`
	// Opaque Stripe or Numeral URL. Redirect without inspecting the hostname.
	URL     string `json:"url" api:"required" format:"uri"`
	Version int64  `json:"version" api:"required"`
	// Returned exactly once on an embedded-mode create. Keep in memory and assign it
	// to the numeral-checkout element as a JavaScript property.
	ClientSecret string `json:"client_secret"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		CancellationReason   respjson.Field
		Checkout             respjson.Field
		CollectionMode       respjson.Field
		CompletedAt          respjson.Field
		ConfigID             respjson.Field
		ConfigVersion        respjson.Field
		ConfirmationMethod   respjson.Field
		CreatedAt            respjson.Field
		CustomerContext      respjson.Field
		ExpiresAt            respjson.Field
		ExternalReference    respjson.Field
		LastError            respjson.Field
		NextAction           respjson.Field
		Object               respjson.Field
		PaymentStatus        respjson.Field
		Phase                respjson.Field
		Provider             respjson.Field
		ProviderSession      respjson.Field
		Quote                respjson.Field
		ReplacementSessionID respjson.Field
		ReplacesSessionID    respjson.Field
		Requirements         respjson.Field
		Status               respjson.Field
		TaxContext           respjson.Field
		TaxStatus            respjson.Field
		Testmode             respjson.Field
		UpdatedAt            respjson.Field
		URL                  respjson.Field
		Version              respjson.Field
		ClientSecret         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponse) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponse) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseCancellationReason

type TaxBridgeSessionCancelResponseCancellationReason string
const (
	TaxBridgeSessionCancelResponseCancellationReasonRequested             TaxBridgeSessionCancelResponseCancellationReason = "requested"
	TaxBridgeSessionCancelResponseCancellationReasonSuperseded            TaxBridgeSessionCancelResponseCancellationReason = "superseded"
	TaxBridgeSessionCancelResponseCancellationReasonConfigurationDisabled TaxBridgeSessionCancelResponseCancellationReason = "configuration_disabled"
)

type TaxBridgeSessionCancelResponseCheckout

type TaxBridgeSessionCancelResponseCheckout struct {
	CancelURL string                                           `json:"cancel_url" api:"required" format:"uri"`
	Currency  string                                           `json:"currency" api:"required"`
	LineItems []TaxBridgeSessionCancelResponseCheckoutLineItem `json:"line_items" api:"required"`
	// Any of "payment", "subscription".
	Mode               string `json:"mode" api:"required"`
	SuccessURL         string `json:"success_url" api:"required" format:"uri"`
	ProviderCustomerID string `json:"provider_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CancelURL          respjson.Field
		Currency           respjson.Field
		LineItems          respjson.Field
		Mode               respjson.Field
		SuccessURL         respjson.Field
		ProviderCustomerID respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseCheckout) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseCheckout) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseCheckout) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseCheckoutLineItem

type TaxBridgeSessionCancelResponseCheckoutLineItem struct {
	Currency        string `json:"currency" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	ProductName     string `json:"product_name" api:"required"`
	Quantity        int64  `json:"quantity" api:"required"`
	// Per-unit amount in the currency's minor unit.
	UnitAmount        int64  `json:"unit_amount" api:"required"`
	ProviderProductID string `json:"provider_product_id"`
	// Stripe recurring interval for a recurring Price. Omitted for one-time Prices.
	RecurringInterval string `json:"recurring_interval"`
	// Number of recurring intervals between subscription billings. Omitted for
	// one-time Prices.
	RecurringIntervalCount int64 `json:"recurring_interval_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency               respjson.Field
		PriceID                respjson.Field
		ProductCategory        respjson.Field
		ProductName            respjson.Field
		Quantity               respjson.Field
		UnitAmount             respjson.Field
		ProviderProductID      respjson.Field
		RecurringInterval      respjson.Field
		RecurringIntervalCount respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseCheckoutLineItem) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseCheckoutLineItem) UnmarshalJSON

type TaxBridgeSessionCancelResponseCollectionMode

type TaxBridgeSessionCancelResponseCollectionMode string
const (
	TaxBridgeSessionCancelResponseCollectionModeHosted   TaxBridgeSessionCancelResponseCollectionMode = "hosted"
	TaxBridgeSessionCancelResponseCollectionModeEmbedded TaxBridgeSessionCancelResponseCollectionMode = "embedded"
)

type TaxBridgeSessionCancelResponseConfirmationMethod

type TaxBridgeSessionCancelResponseConfirmationMethod string
const (
	TaxBridgeSessionCancelResponseConfirmationMethodAutomatic TaxBridgeSessionCancelResponseConfirmationMethod = "automatic"
	TaxBridgeSessionCancelResponseConfirmationMethodManual    TaxBridgeSessionCancelResponseConfirmationMethod = "manual"
)

type TaxBridgeSessionCancelResponseCustomerContext

type TaxBridgeSessionCancelResponseCustomerContext struct {
	Email              string `json:"email" format:"email"`
	MerchantCustomerID string `json:"merchant_customer_id"`
	// Numeral customer ID (cust\_...).
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email              respjson.Field
		MerchantCustomerID respjson.Field
		NumeralCustomerID  respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseCustomerContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseCustomerContext) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseCustomerContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseLastError

type TaxBridgeSessionCancelResponseLastError struct {
	Code         string    `json:"code" api:"required"`
	Message      string    `json:"message" api:"required"`
	OccurredAt   time.Time `json:"occurred_at" api:"required" format:"date-time"`
	Retryable    bool      `json:"retryable" api:"required"`
	Provider     string    `json:"provider"`
	ProviderCode string    `json:"provider_code"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Code         respjson.Field
		Message      respjson.Field
		OccurredAt   respjson.Field
		Retryable    respjson.Field
		Provider     respjson.Field
		ProviderCode respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseLastError) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseLastError) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseLastError) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseNextAction

type TaxBridgeSessionCancelResponseNextAction struct {
	// Any of "collect_input", "review", "confirm", "redirect_to_provider", "wait",
	// "contact_merchant".
	Type string `json:"type" api:"required"`
	// Opaque URL. Do not branch on its hostname.
	URL string `json:"url" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseNextAction) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseNextAction) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseNextAction) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseObject

type TaxBridgeSessionCancelResponseObject string
const (
	TaxBridgeSessionCancelResponseObjectTaxBridgeSession TaxBridgeSessionCancelResponseObject = "tax.bridge_session"
)

type TaxBridgeSessionCancelResponsePaymentStatus

type TaxBridgeSessionCancelResponsePaymentStatus string
const (
	TaxBridgeSessionCancelResponsePaymentStatusNotStarted        TaxBridgeSessionCancelResponsePaymentStatus = "not_started"
	TaxBridgeSessionCancelResponsePaymentStatusUnpaid            TaxBridgeSessionCancelResponsePaymentStatus = "unpaid"
	TaxBridgeSessionCancelResponsePaymentStatusProcessing        TaxBridgeSessionCancelResponsePaymentStatus = "processing"
	TaxBridgeSessionCancelResponsePaymentStatusPaid              TaxBridgeSessionCancelResponsePaymentStatus = "paid"
	TaxBridgeSessionCancelResponsePaymentStatusFailed            TaxBridgeSessionCancelResponsePaymentStatus = "failed"
	TaxBridgeSessionCancelResponsePaymentStatusNoPaymentRequired TaxBridgeSessionCancelResponsePaymentStatus = "no_payment_required"
)

type TaxBridgeSessionCancelResponsePhase

type TaxBridgeSessionCancelResponsePhase string
const (
	TaxBridgeSessionCancelResponsePhaseRequiresInput        TaxBridgeSessionCancelResponsePhase = "requires_input"
	TaxBridgeSessionCancelResponsePhaseRequiresReview       TaxBridgeSessionCancelResponsePhase = "requires_review"
	TaxBridgeSessionCancelResponsePhaseReadyForConfirmation TaxBridgeSessionCancelResponsePhase = "ready_for_confirmation"
	TaxBridgeSessionCancelResponsePhaseProcessing           TaxBridgeSessionCancelResponsePhase = "processing"
	TaxBridgeSessionCancelResponsePhaseProviderSessionReady TaxBridgeSessionCancelResponsePhase = "provider_session_ready"
)

type TaxBridgeSessionCancelResponseProvider

type TaxBridgeSessionCancelResponseProvider struct {
	ConnectionID string `json:"connection_id" api:"required"`
	// Any of "stripe".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ConnectionID respjson.Field
		Type         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseProvider) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseProvider) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseProvider) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseProviderSession

type TaxBridgeSessionCancelResponseProviderSession struct {
	ID     string `json:"id" api:"required"`
	Status string `json:"status" api:"required"`
	// Any of "checkout".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseProviderSession) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseProviderSession) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseProviderSession) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseQuote

type TaxBridgeSessionCancelResponseQuote struct {
	CalculationID  string                                    `json:"calculation_id" api:"required"`
	Currency       string                                    `json:"currency" api:"required"`
	ExpiresAt      time.Time                                 `json:"expires_at" api:"required" format:"date-time"`
	Lines          []TaxBridgeSessionCancelResponseQuoteLine `json:"lines" api:"required"`
	Subtotal       int64                                     `json:"subtotal" api:"required"`
	Total          int64                                     `json:"total" api:"required"`
	TotalTaxAmount int64                                     `json:"total_tax_amount" api:"required"`
	// Any of "taxed", "not_taxed", "reverse_charge", "exempt", "zero_rated".
	Treatment string `json:"treatment" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CalculationID  respjson.Field
		Currency       respjson.Field
		ExpiresAt      respjson.Field
		Lines          respjson.Field
		Subtotal       respjson.Field
		Total          respjson.Field
		TotalTaxAmount respjson.Field
		Treatment      respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseQuote) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseQuote) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseQuote) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseQuoteLine

type TaxBridgeSessionCancelResponseQuoteLine struct {
	AmountExcludingTax int64                                         `json:"amount_excluding_tax" api:"required"`
	PriceID            string                                        `json:"price_id" api:"required"`
	Quantity           int64                                         `json:"quantity" api:"required"`
	Rates              []TaxBridgeSessionCancelResponseQuoteLineRate `json:"rates" api:"required"`
	TaxAmount          int64                                         `json:"tax_amount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		PriceID            respjson.Field
		Quantity           respjson.Field
		Rates              respjson.Field
		TaxAmount          respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseQuoteLine) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseQuoteLine) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseQuoteLine) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseQuoteLineRate

type TaxBridgeSessionCancelResponseQuoteLineRate struct {
	DisplayName      string `json:"display_name" api:"required"`
	JurisdictionName string `json:"jurisdiction_name" api:"required"`
	// Decimal fraction, for example 0.08875.
	Rate     float64 `json:"rate" api:"required"`
	RateType string  `json:"rate_type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisplayName      respjson.Field
		JurisdictionName respjson.Field
		Rate             respjson.Field
		RateType         respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseQuoteLineRate) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseQuoteLineRate) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseQuoteLineRate) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseRequirement

type TaxBridgeSessionCancelResponseRequirement struct {
	ID       string `json:"id" api:"required"`
	Blocking bool   `json:"blocking" api:"required"`
	// Any of "tax_location", "tax_identity", "exemption".
	Category string `json:"category" api:"required"`
	// Any of "tax_location.country", "tax_location.postal_code",
	// "tax_location.province", "tax_location.city", "tax_location.line_1",
	// "tax_identity.customer_type", "tax_identity.tax_id", "exemption.evidence".
	Code string `json:"code" api:"required"`
	// JSON Pointer rooted at /tax_context.
	FieldPath string `json:"field_path" api:"required"`
	// Any of "country", "postal_code", "province", "city", "address_line",
	// "customer_type", "tax_id", "text".
	InputKind    string                                                `json:"input_kind" api:"required"`
	Presentation TaxBridgeSessionCancelResponseRequirementPresentation `json:"presentation" api:"required"`
	ReasonCode   string                                                `json:"reason_code" api:"required"`
	// Any of "required", "optional".
	Status string `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		Blocking     respjson.Field
		Category     respjson.Field
		Code         respjson.Field
		FieldPath    respjson.Field
		InputKind    respjson.Field
		Presentation respjson.Field
		ReasonCode   respjson.Field
		Status       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseRequirement) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseRequirement) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseRequirement) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseRequirementPresentation

type TaxBridgeSessionCancelResponseRequirementPresentation struct {
	LabelKey string `json:"label_key" api:"required"`
	HelpKey  string `json:"help_key"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		LabelKey    respjson.Field
		HelpKey     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseRequirementPresentation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseRequirementPresentation) UnmarshalJSON

type TaxBridgeSessionCancelResponseStatus

type TaxBridgeSessionCancelResponseStatus string
const (
	TaxBridgeSessionCancelResponseStatusOpen     TaxBridgeSessionCancelResponseStatus = "open"
	TaxBridgeSessionCancelResponseStatusComplete TaxBridgeSessionCancelResponseStatus = "complete"
	TaxBridgeSessionCancelResponseStatusExpired  TaxBridgeSessionCancelResponseStatus = "expired"
	TaxBridgeSessionCancelResponseStatusCanceled TaxBridgeSessionCancelResponseStatus = "canceled"
	TaxBridgeSessionCancelResponseStatusFailed   TaxBridgeSessionCancelResponseStatus = "failed"
)

type TaxBridgeSessionCancelResponseTaxContext

type TaxBridgeSessionCancelResponseTaxContext struct {
	Exemption TaxBridgeSessionCancelResponseTaxContextExemption `json:"exemption"`
	Identity  TaxBridgeSessionCancelResponseTaxContextIdentity  `json:"identity"`
	// Canonical tax location. After IP resolution a response may contain both the
	// original IP and its derived address.
	Location TaxBridgeSessionCancelResponseTaxContextLocation `json:"location"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Exemption   respjson.Field
		Identity    respjson.Field
		Location    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseTaxContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseTaxContext) UnmarshalJSON

func (r *TaxBridgeSessionCancelResponseTaxContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionCancelResponseTaxContextExemption

type TaxBridgeSessionCancelResponseTaxContextExemption struct {
	Claimed           bool   `json:"claimed" api:"required"`
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Claimed           respjson.Field
		NumeralCustomerID respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseTaxContextExemption) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseTaxContextExemption) UnmarshalJSON

type TaxBridgeSessionCancelResponseTaxContextIdentity

type TaxBridgeSessionCancelResponseTaxContextIdentity struct {
	// Any of "individual", "business".
	CustomerType string                                                  `json:"customer_type"`
	TaxIDs       []TaxBridgeSessionCancelResponseTaxContextIdentityTaxID `json:"tax_ids"`
	// Any of "not_checked", "format_valid", "valid", "invalid", "unavailable",
	// "pending".
	ValidationStatus string `json:"validation_status"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CustomerType     respjson.Field
		TaxIDs           respjson.Field
		ValidationStatus respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseTaxContextIdentity) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseTaxContextIdentity) UnmarshalJSON

type TaxBridgeSessionCancelResponseTaxContextIdentityTaxID

type TaxBridgeSessionCancelResponseTaxContextIdentityTaxID struct {
	Type  string `json:"type" api:"required"`
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseTaxContextIdentityTaxID) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseTaxContextIdentityTaxID) UnmarshalJSON

type TaxBridgeSessionCancelResponseTaxContextLocation

type TaxBridgeSessionCancelResponseTaxContextLocation struct {
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance" api:"required"`
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis" api:"required"`
	// Any of "merchant", "ip", "numeral_profile", "buyer", "provider_customer".
	Source      string                                                  `json:"source" api:"required"`
	Address     TaxBridgeSessionCancelResponseTaxContextLocationAddress `json:"address"`
	CollectedAt time.Time                                               `json:"collected_at" format:"date-time"`
	// The customer's public IPv4 or IPv6 address. Capture it on the merchant server;
	// do not send the merchant server's IP.
	IP TaxBridgeSessionCancelResponseTaxContextLocationIP `json:"ip"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Assurance   respjson.Field
		Basis       respjson.Field
		Source      respjson.Field
		Address     respjson.Field
		CollectedAt respjson.Field
		IP          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Canonical tax location. After IP resolution a response may contain both the original IP and its derived address.

func (TaxBridgeSessionCancelResponseTaxContextLocation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseTaxContextLocation) UnmarshalJSON

type TaxBridgeSessionCancelResponseTaxContextLocationAddress

type TaxBridgeSessionCancelResponseTaxContextLocationAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionCancelResponseTaxContextLocationAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseTaxContextLocationAddress) UnmarshalJSON

type TaxBridgeSessionCancelResponseTaxContextLocationIP

type TaxBridgeSessionCancelResponseTaxContextLocationIP struct {
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The customer's public IPv4 or IPv6 address. Capture it on the merchant server; do not send the merchant server's IP.

func (TaxBridgeSessionCancelResponseTaxContextLocationIP) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionCancelResponseTaxContextLocationIP) UnmarshalJSON

type TaxBridgeSessionCancelResponseTaxStatus

type TaxBridgeSessionCancelResponseTaxStatus string
const (
	TaxBridgeSessionCancelResponseTaxStatusNotCalculated    TaxBridgeSessionCancelResponseTaxStatus = "not_calculated"
	TaxBridgeSessionCancelResponseTaxStatusRequiresInput    TaxBridgeSessionCancelResponseTaxStatus = "requires_input"
	TaxBridgeSessionCancelResponseTaxStatusPendingReview    TaxBridgeSessionCancelResponseTaxStatus = "pending_review"
	TaxBridgeSessionCancelResponseTaxStatusCalculated       TaxBridgeSessionCancelResponseTaxStatus = "calculated"
	TaxBridgeSessionCancelResponseTaxStatusProviderVerified TaxBridgeSessionCancelResponseTaxStatus = "provider_verified"
	TaxBridgeSessionCancelResponseTaxStatusCommitted        TaxBridgeSessionCancelResponseTaxStatus = "committed"
	TaxBridgeSessionCancelResponseTaxStatusReconciled       TaxBridgeSessionCancelResponseTaxStatus = "reconciled"
	TaxBridgeSessionCancelResponseTaxStatusMismatch         TaxBridgeSessionCancelResponseTaxStatus = "mismatch"
	TaxBridgeSessionCancelResponseTaxStatusVoided           TaxBridgeSessionCancelResponseTaxStatus = "voided"
	TaxBridgeSessionCancelResponseTaxStatusNotApplicable    TaxBridgeSessionCancelResponseTaxStatus = "not_applicable"
)

type TaxBridgeSessionConfirmParams

type TaxBridgeSessionConfirmParams struct {
	// Any of "2026-03-01".
	XAPIVersion TaxBridgeSessionConfirmParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	// Accepted total in the checkout currency's minor unit.
	AcceptedTotal param.Opt[int64]  `json:"accepted_total,omitzero"`
	CalculationID param.Opt[string] `json:"calculation_id,omitzero"`
	Version       param.Opt[int64]  `json:"version,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionConfirmParams) MarshalJSON

func (r TaxBridgeSessionConfirmParams) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionConfirmParams) UnmarshalJSON

func (r *TaxBridgeSessionConfirmParams) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmParamsXAPIVersion

type TaxBridgeSessionConfirmParamsXAPIVersion string
const (
	TaxBridgeSessionConfirmParamsXAPIVersion2026_03_01 TaxBridgeSessionConfirmParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeSessionConfirmResponse

type TaxBridgeSessionConfirmResponse struct {
	ID string `json:"id" api:"required"`
	// Any of "requested", "superseded", "configuration_disabled".
	CancellationReason TaxBridgeSessionConfirmResponseCancellationReason `json:"cancellation_reason" api:"required"`
	Checkout           TaxBridgeSessionConfirmResponseCheckout           `json:"checkout" api:"required"`
	// Any of "hosted", "embedded".
	CollectionMode TaxBridgeSessionConfirmResponseCollectionMode `json:"collection_mode" api:"required"`
	CompletedAt    time.Time                                     `json:"completed_at" api:"required" format:"date-time"`
	ConfigID       string                                        `json:"config_id" api:"required"`
	ConfigVersion  int64                                         `json:"config_version" api:"required"`
	// Any of "automatic", "manual".
	ConfirmationMethod TaxBridgeSessionConfirmResponseConfirmationMethod `json:"confirmation_method" api:"required"`
	CreatedAt          time.Time                                         `json:"created_at" api:"required" format:"date-time"`
	CustomerContext    TaxBridgeSessionConfirmResponseCustomerContext    `json:"customer_context" api:"required"`
	ExpiresAt          time.Time                                         `json:"expires_at" api:"required" format:"date-time"`
	ExternalReference  string                                            `json:"external_reference" api:"required"`
	LastError          TaxBridgeSessionConfirmResponseLastError          `json:"last_error" api:"required"`
	NextAction         TaxBridgeSessionConfirmResponseNextAction         `json:"next_action" api:"required"`
	// Any of "tax.bridge_session".
	Object TaxBridgeSessionConfirmResponseObject `json:"object" api:"required"`
	// Any of "not_started", "unpaid", "processing", "paid", "failed",
	// "no_payment_required".
	PaymentStatus TaxBridgeSessionConfirmResponsePaymentStatus `json:"payment_status" api:"required"`
	// Any of "requires_input", "requires_review", "ready_for_confirmation",
	// "processing", "provider_session_ready".
	Phase                TaxBridgeSessionConfirmResponsePhase           `json:"phase" api:"required"`
	Provider             TaxBridgeSessionConfirmResponseProvider        `json:"provider" api:"required"`
	ProviderSession      TaxBridgeSessionConfirmResponseProviderSession `json:"provider_session" api:"required"`
	Quote                TaxBridgeSessionConfirmResponseQuote           `json:"quote" api:"required"`
	ReplacementSessionID string                                         `json:"replacement_session_id" api:"required"`
	ReplacesSessionID    string                                         `json:"replaces_session_id" api:"required"`
	Requirements         []TaxBridgeSessionConfirmResponseRequirement   `json:"requirements" api:"required"`
	// Any of "open", "complete", "expired", "canceled", "failed".
	Status     TaxBridgeSessionConfirmResponseStatus     `json:"status" api:"required"`
	TaxContext TaxBridgeSessionConfirmResponseTaxContext `json:"tax_context" api:"required"`
	// Any of "not_calculated", "requires_input", "pending_review", "calculated",
	// "provider_verified", "committed", "reconciled", "mismatch", "voided",
	// "not_applicable".
	TaxStatus TaxBridgeSessionConfirmResponseTaxStatus `json:"tax_status" api:"required"`
	Testmode  bool                                     `json:"testmode" api:"required"`
	UpdatedAt time.Time                                `json:"updated_at" api:"required" format:"date-time"`
	// Opaque Stripe or Numeral URL. Redirect without inspecting the hostname.
	URL     string `json:"url" api:"required" format:"uri"`
	Version int64  `json:"version" api:"required"`
	// Returned exactly once on an embedded-mode create. Keep in memory and assign it
	// to the numeral-checkout element as a JavaScript property.
	ClientSecret string `json:"client_secret"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		CancellationReason   respjson.Field
		Checkout             respjson.Field
		CollectionMode       respjson.Field
		CompletedAt          respjson.Field
		ConfigID             respjson.Field
		ConfigVersion        respjson.Field
		ConfirmationMethod   respjson.Field
		CreatedAt            respjson.Field
		CustomerContext      respjson.Field
		ExpiresAt            respjson.Field
		ExternalReference    respjson.Field
		LastError            respjson.Field
		NextAction           respjson.Field
		Object               respjson.Field
		PaymentStatus        respjson.Field
		Phase                respjson.Field
		Provider             respjson.Field
		ProviderSession      respjson.Field
		Quote                respjson.Field
		ReplacementSessionID respjson.Field
		ReplacesSessionID    respjson.Field
		Requirements         respjson.Field
		Status               respjson.Field
		TaxContext           respjson.Field
		TaxStatus            respjson.Field
		Testmode             respjson.Field
		UpdatedAt            respjson.Field
		URL                  respjson.Field
		Version              respjson.Field
		ClientSecret         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponse) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponse) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseCancellationReason

type TaxBridgeSessionConfirmResponseCancellationReason string
const (
	TaxBridgeSessionConfirmResponseCancellationReasonRequested             TaxBridgeSessionConfirmResponseCancellationReason = "requested"
	TaxBridgeSessionConfirmResponseCancellationReasonSuperseded            TaxBridgeSessionConfirmResponseCancellationReason = "superseded"
	TaxBridgeSessionConfirmResponseCancellationReasonConfigurationDisabled TaxBridgeSessionConfirmResponseCancellationReason = "configuration_disabled"
)

type TaxBridgeSessionConfirmResponseCheckout

type TaxBridgeSessionConfirmResponseCheckout struct {
	CancelURL string                                            `json:"cancel_url" api:"required" format:"uri"`
	Currency  string                                            `json:"currency" api:"required"`
	LineItems []TaxBridgeSessionConfirmResponseCheckoutLineItem `json:"line_items" api:"required"`
	// Any of "payment", "subscription".
	Mode               string `json:"mode" api:"required"`
	SuccessURL         string `json:"success_url" api:"required" format:"uri"`
	ProviderCustomerID string `json:"provider_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CancelURL          respjson.Field
		Currency           respjson.Field
		LineItems          respjson.Field
		Mode               respjson.Field
		SuccessURL         respjson.Field
		ProviderCustomerID respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseCheckout) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseCheckout) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponseCheckout) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseCheckoutLineItem

type TaxBridgeSessionConfirmResponseCheckoutLineItem struct {
	Currency        string `json:"currency" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	ProductName     string `json:"product_name" api:"required"`
	Quantity        int64  `json:"quantity" api:"required"`
	// Per-unit amount in the currency's minor unit.
	UnitAmount        int64  `json:"unit_amount" api:"required"`
	ProviderProductID string `json:"provider_product_id"`
	// Stripe recurring interval for a recurring Price. Omitted for one-time Prices.
	RecurringInterval string `json:"recurring_interval"`
	// Number of recurring intervals between subscription billings. Omitted for
	// one-time Prices.
	RecurringIntervalCount int64 `json:"recurring_interval_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency               respjson.Field
		PriceID                respjson.Field
		ProductCategory        respjson.Field
		ProductName            respjson.Field
		Quantity               respjson.Field
		UnitAmount             respjson.Field
		ProviderProductID      respjson.Field
		RecurringInterval      respjson.Field
		RecurringIntervalCount respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseCheckoutLineItem) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseCheckoutLineItem) UnmarshalJSON

type TaxBridgeSessionConfirmResponseCollectionMode

type TaxBridgeSessionConfirmResponseCollectionMode string
const (
	TaxBridgeSessionConfirmResponseCollectionModeHosted   TaxBridgeSessionConfirmResponseCollectionMode = "hosted"
	TaxBridgeSessionConfirmResponseCollectionModeEmbedded TaxBridgeSessionConfirmResponseCollectionMode = "embedded"
)

type TaxBridgeSessionConfirmResponseConfirmationMethod

type TaxBridgeSessionConfirmResponseConfirmationMethod string
const (
	TaxBridgeSessionConfirmResponseConfirmationMethodAutomatic TaxBridgeSessionConfirmResponseConfirmationMethod = "automatic"
	TaxBridgeSessionConfirmResponseConfirmationMethodManual    TaxBridgeSessionConfirmResponseConfirmationMethod = "manual"
)

type TaxBridgeSessionConfirmResponseCustomerContext

type TaxBridgeSessionConfirmResponseCustomerContext struct {
	Email              string `json:"email" format:"email"`
	MerchantCustomerID string `json:"merchant_customer_id"`
	// Numeral customer ID (cust\_...).
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email              respjson.Field
		MerchantCustomerID respjson.Field
		NumeralCustomerID  respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseCustomerContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseCustomerContext) UnmarshalJSON

type TaxBridgeSessionConfirmResponseLastError

type TaxBridgeSessionConfirmResponseLastError struct {
	Code         string    `json:"code" api:"required"`
	Message      string    `json:"message" api:"required"`
	OccurredAt   time.Time `json:"occurred_at" api:"required" format:"date-time"`
	Retryable    bool      `json:"retryable" api:"required"`
	Provider     string    `json:"provider"`
	ProviderCode string    `json:"provider_code"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Code         respjson.Field
		Message      respjson.Field
		OccurredAt   respjson.Field
		Retryable    respjson.Field
		Provider     respjson.Field
		ProviderCode respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseLastError) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseLastError) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponseLastError) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseNextAction

type TaxBridgeSessionConfirmResponseNextAction struct {
	// Any of "collect_input", "review", "confirm", "redirect_to_provider", "wait",
	// "contact_merchant".
	Type string `json:"type" api:"required"`
	// Opaque URL. Do not branch on its hostname.
	URL string `json:"url" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseNextAction) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseNextAction) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponseNextAction) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseObject

type TaxBridgeSessionConfirmResponseObject string
const (
	TaxBridgeSessionConfirmResponseObjectTaxBridgeSession TaxBridgeSessionConfirmResponseObject = "tax.bridge_session"
)

type TaxBridgeSessionConfirmResponsePaymentStatus

type TaxBridgeSessionConfirmResponsePaymentStatus string
const (
	TaxBridgeSessionConfirmResponsePaymentStatusNotStarted        TaxBridgeSessionConfirmResponsePaymentStatus = "not_started"
	TaxBridgeSessionConfirmResponsePaymentStatusUnpaid            TaxBridgeSessionConfirmResponsePaymentStatus = "unpaid"
	TaxBridgeSessionConfirmResponsePaymentStatusProcessing        TaxBridgeSessionConfirmResponsePaymentStatus = "processing"
	TaxBridgeSessionConfirmResponsePaymentStatusPaid              TaxBridgeSessionConfirmResponsePaymentStatus = "paid"
	TaxBridgeSessionConfirmResponsePaymentStatusFailed            TaxBridgeSessionConfirmResponsePaymentStatus = "failed"
	TaxBridgeSessionConfirmResponsePaymentStatusNoPaymentRequired TaxBridgeSessionConfirmResponsePaymentStatus = "no_payment_required"
)

type TaxBridgeSessionConfirmResponsePhase

type TaxBridgeSessionConfirmResponsePhase string
const (
	TaxBridgeSessionConfirmResponsePhaseRequiresInput        TaxBridgeSessionConfirmResponsePhase = "requires_input"
	TaxBridgeSessionConfirmResponsePhaseRequiresReview       TaxBridgeSessionConfirmResponsePhase = "requires_review"
	TaxBridgeSessionConfirmResponsePhaseReadyForConfirmation TaxBridgeSessionConfirmResponsePhase = "ready_for_confirmation"
	TaxBridgeSessionConfirmResponsePhaseProcessing           TaxBridgeSessionConfirmResponsePhase = "processing"
	TaxBridgeSessionConfirmResponsePhaseProviderSessionReady TaxBridgeSessionConfirmResponsePhase = "provider_session_ready"
)

type TaxBridgeSessionConfirmResponseProvider

type TaxBridgeSessionConfirmResponseProvider struct {
	ConnectionID string `json:"connection_id" api:"required"`
	// Any of "stripe".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ConnectionID respjson.Field
		Type         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseProvider) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseProvider) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponseProvider) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseProviderSession

type TaxBridgeSessionConfirmResponseProviderSession struct {
	ID     string `json:"id" api:"required"`
	Status string `json:"status" api:"required"`
	// Any of "checkout".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseProviderSession) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseProviderSession) UnmarshalJSON

type TaxBridgeSessionConfirmResponseQuote

type TaxBridgeSessionConfirmResponseQuote struct {
	CalculationID  string                                     `json:"calculation_id" api:"required"`
	Currency       string                                     `json:"currency" api:"required"`
	ExpiresAt      time.Time                                  `json:"expires_at" api:"required" format:"date-time"`
	Lines          []TaxBridgeSessionConfirmResponseQuoteLine `json:"lines" api:"required"`
	Subtotal       int64                                      `json:"subtotal" api:"required"`
	Total          int64                                      `json:"total" api:"required"`
	TotalTaxAmount int64                                      `json:"total_tax_amount" api:"required"`
	// Any of "taxed", "not_taxed", "reverse_charge", "exempt", "zero_rated".
	Treatment string `json:"treatment" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CalculationID  respjson.Field
		Currency       respjson.Field
		ExpiresAt      respjson.Field
		Lines          respjson.Field
		Subtotal       respjson.Field
		Total          respjson.Field
		TotalTaxAmount respjson.Field
		Treatment      respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseQuote) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseQuote) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponseQuote) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseQuoteLine

type TaxBridgeSessionConfirmResponseQuoteLine struct {
	AmountExcludingTax int64                                          `json:"amount_excluding_tax" api:"required"`
	PriceID            string                                         `json:"price_id" api:"required"`
	Quantity           int64                                          `json:"quantity" api:"required"`
	Rates              []TaxBridgeSessionConfirmResponseQuoteLineRate `json:"rates" api:"required"`
	TaxAmount          int64                                          `json:"tax_amount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		PriceID            respjson.Field
		Quantity           respjson.Field
		Rates              respjson.Field
		TaxAmount          respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseQuoteLine) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseQuoteLine) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponseQuoteLine) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseQuoteLineRate

type TaxBridgeSessionConfirmResponseQuoteLineRate struct {
	DisplayName      string `json:"display_name" api:"required"`
	JurisdictionName string `json:"jurisdiction_name" api:"required"`
	// Decimal fraction, for example 0.08875.
	Rate     float64 `json:"rate" api:"required"`
	RateType string  `json:"rate_type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisplayName      respjson.Field
		JurisdictionName respjson.Field
		Rate             respjson.Field
		RateType         respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseQuoteLineRate) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseQuoteLineRate) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponseQuoteLineRate) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseRequirement

type TaxBridgeSessionConfirmResponseRequirement struct {
	ID       string `json:"id" api:"required"`
	Blocking bool   `json:"blocking" api:"required"`
	// Any of "tax_location", "tax_identity", "exemption".
	Category string `json:"category" api:"required"`
	// Any of "tax_location.country", "tax_location.postal_code",
	// "tax_location.province", "tax_location.city", "tax_location.line_1",
	// "tax_identity.customer_type", "tax_identity.tax_id", "exemption.evidence".
	Code string `json:"code" api:"required"`
	// JSON Pointer rooted at /tax_context.
	FieldPath string `json:"field_path" api:"required"`
	// Any of "country", "postal_code", "province", "city", "address_line",
	// "customer_type", "tax_id", "text".
	InputKind    string                                                 `json:"input_kind" api:"required"`
	Presentation TaxBridgeSessionConfirmResponseRequirementPresentation `json:"presentation" api:"required"`
	ReasonCode   string                                                 `json:"reason_code" api:"required"`
	// Any of "required", "optional".
	Status string `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		Blocking     respjson.Field
		Category     respjson.Field
		Code         respjson.Field
		FieldPath    respjson.Field
		InputKind    respjson.Field
		Presentation respjson.Field
		ReasonCode   respjson.Field
		Status       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseRequirement) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseRequirement) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponseRequirement) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseRequirementPresentation

type TaxBridgeSessionConfirmResponseRequirementPresentation struct {
	LabelKey string `json:"label_key" api:"required"`
	HelpKey  string `json:"help_key"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		LabelKey    respjson.Field
		HelpKey     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseRequirementPresentation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseRequirementPresentation) UnmarshalJSON

type TaxBridgeSessionConfirmResponseStatus

type TaxBridgeSessionConfirmResponseStatus string
const (
	TaxBridgeSessionConfirmResponseStatusOpen     TaxBridgeSessionConfirmResponseStatus = "open"
	TaxBridgeSessionConfirmResponseStatusComplete TaxBridgeSessionConfirmResponseStatus = "complete"
	TaxBridgeSessionConfirmResponseStatusExpired  TaxBridgeSessionConfirmResponseStatus = "expired"
	TaxBridgeSessionConfirmResponseStatusCanceled TaxBridgeSessionConfirmResponseStatus = "canceled"
	TaxBridgeSessionConfirmResponseStatusFailed   TaxBridgeSessionConfirmResponseStatus = "failed"
)

type TaxBridgeSessionConfirmResponseTaxContext

type TaxBridgeSessionConfirmResponseTaxContext struct {
	Exemption TaxBridgeSessionConfirmResponseTaxContextExemption `json:"exemption"`
	Identity  TaxBridgeSessionConfirmResponseTaxContextIdentity  `json:"identity"`
	// Canonical tax location. After IP resolution a response may contain both the
	// original IP and its derived address.
	Location TaxBridgeSessionConfirmResponseTaxContextLocation `json:"location"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Exemption   respjson.Field
		Identity    respjson.Field
		Location    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseTaxContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseTaxContext) UnmarshalJSON

func (r *TaxBridgeSessionConfirmResponseTaxContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionConfirmResponseTaxContextExemption

type TaxBridgeSessionConfirmResponseTaxContextExemption struct {
	Claimed           bool   `json:"claimed" api:"required"`
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Claimed           respjson.Field
		NumeralCustomerID respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseTaxContextExemption) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseTaxContextExemption) UnmarshalJSON

type TaxBridgeSessionConfirmResponseTaxContextIdentity

type TaxBridgeSessionConfirmResponseTaxContextIdentity struct {
	// Any of "individual", "business".
	CustomerType string                                                   `json:"customer_type"`
	TaxIDs       []TaxBridgeSessionConfirmResponseTaxContextIdentityTaxID `json:"tax_ids"`
	// Any of "not_checked", "format_valid", "valid", "invalid", "unavailable",
	// "pending".
	ValidationStatus string `json:"validation_status"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CustomerType     respjson.Field
		TaxIDs           respjson.Field
		ValidationStatus respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseTaxContextIdentity) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseTaxContextIdentity) UnmarshalJSON

type TaxBridgeSessionConfirmResponseTaxContextIdentityTaxID

type TaxBridgeSessionConfirmResponseTaxContextIdentityTaxID struct {
	Type  string `json:"type" api:"required"`
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseTaxContextIdentityTaxID) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseTaxContextIdentityTaxID) UnmarshalJSON

type TaxBridgeSessionConfirmResponseTaxContextLocation

type TaxBridgeSessionConfirmResponseTaxContextLocation struct {
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance" api:"required"`
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis" api:"required"`
	// Any of "merchant", "ip", "numeral_profile", "buyer", "provider_customer".
	Source      string                                                   `json:"source" api:"required"`
	Address     TaxBridgeSessionConfirmResponseTaxContextLocationAddress `json:"address"`
	CollectedAt time.Time                                                `json:"collected_at" format:"date-time"`
	// The customer's public IPv4 or IPv6 address. Capture it on the merchant server;
	// do not send the merchant server's IP.
	IP TaxBridgeSessionConfirmResponseTaxContextLocationIP `json:"ip"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Assurance   respjson.Field
		Basis       respjson.Field
		Source      respjson.Field
		Address     respjson.Field
		CollectedAt respjson.Field
		IP          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Canonical tax location. After IP resolution a response may contain both the original IP and its derived address.

func (TaxBridgeSessionConfirmResponseTaxContextLocation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseTaxContextLocation) UnmarshalJSON

type TaxBridgeSessionConfirmResponseTaxContextLocationAddress

type TaxBridgeSessionConfirmResponseTaxContextLocationAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionConfirmResponseTaxContextLocationAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseTaxContextLocationAddress) UnmarshalJSON

type TaxBridgeSessionConfirmResponseTaxContextLocationIP

type TaxBridgeSessionConfirmResponseTaxContextLocationIP struct {
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The customer's public IPv4 or IPv6 address. Capture it on the merchant server; do not send the merchant server's IP.

func (TaxBridgeSessionConfirmResponseTaxContextLocationIP) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionConfirmResponseTaxContextLocationIP) UnmarshalJSON

type TaxBridgeSessionConfirmResponseTaxStatus

type TaxBridgeSessionConfirmResponseTaxStatus string
const (
	TaxBridgeSessionConfirmResponseTaxStatusNotCalculated    TaxBridgeSessionConfirmResponseTaxStatus = "not_calculated"
	TaxBridgeSessionConfirmResponseTaxStatusRequiresInput    TaxBridgeSessionConfirmResponseTaxStatus = "requires_input"
	TaxBridgeSessionConfirmResponseTaxStatusPendingReview    TaxBridgeSessionConfirmResponseTaxStatus = "pending_review"
	TaxBridgeSessionConfirmResponseTaxStatusCalculated       TaxBridgeSessionConfirmResponseTaxStatus = "calculated"
	TaxBridgeSessionConfirmResponseTaxStatusProviderVerified TaxBridgeSessionConfirmResponseTaxStatus = "provider_verified"
	TaxBridgeSessionConfirmResponseTaxStatusCommitted        TaxBridgeSessionConfirmResponseTaxStatus = "committed"
	TaxBridgeSessionConfirmResponseTaxStatusReconciled       TaxBridgeSessionConfirmResponseTaxStatus = "reconciled"
	TaxBridgeSessionConfirmResponseTaxStatusMismatch         TaxBridgeSessionConfirmResponseTaxStatus = "mismatch"
	TaxBridgeSessionConfirmResponseTaxStatusVoided           TaxBridgeSessionConfirmResponseTaxStatus = "voided"
	TaxBridgeSessionConfirmResponseTaxStatusNotApplicable    TaxBridgeSessionConfirmResponseTaxStatus = "not_applicable"
)

type TaxBridgeSessionGetParams

type TaxBridgeSessionGetParams struct {
	// Any of "2026-03-01".
	XAPIVersion TaxBridgeSessionGetParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type TaxBridgeSessionGetParamsXAPIVersion

type TaxBridgeSessionGetParamsXAPIVersion string
const (
	TaxBridgeSessionGetParamsXAPIVersion2026_03_01 TaxBridgeSessionGetParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeSessionGetResponse

type TaxBridgeSessionGetResponse struct {
	ID string `json:"id" api:"required"`
	// Any of "requested", "superseded", "configuration_disabled".
	CancellationReason TaxBridgeSessionGetResponseCancellationReason `json:"cancellation_reason" api:"required"`
	Checkout           TaxBridgeSessionGetResponseCheckout           `json:"checkout" api:"required"`
	// Any of "hosted", "embedded".
	CollectionMode TaxBridgeSessionGetResponseCollectionMode `json:"collection_mode" api:"required"`
	CompletedAt    time.Time                                 `json:"completed_at" api:"required" format:"date-time"`
	ConfigID       string                                    `json:"config_id" api:"required"`
	ConfigVersion  int64                                     `json:"config_version" api:"required"`
	// Any of "automatic", "manual".
	ConfirmationMethod TaxBridgeSessionGetResponseConfirmationMethod `json:"confirmation_method" api:"required"`
	CreatedAt          time.Time                                     `json:"created_at" api:"required" format:"date-time"`
	CustomerContext    TaxBridgeSessionGetResponseCustomerContext    `json:"customer_context" api:"required"`
	ExpiresAt          time.Time                                     `json:"expires_at" api:"required" format:"date-time"`
	ExternalReference  string                                        `json:"external_reference" api:"required"`
	LastError          TaxBridgeSessionGetResponseLastError          `json:"last_error" api:"required"`
	NextAction         TaxBridgeSessionGetResponseNextAction         `json:"next_action" api:"required"`
	// Any of "tax.bridge_session".
	Object TaxBridgeSessionGetResponseObject `json:"object" api:"required"`
	// Any of "not_started", "unpaid", "processing", "paid", "failed",
	// "no_payment_required".
	PaymentStatus TaxBridgeSessionGetResponsePaymentStatus `json:"payment_status" api:"required"`
	// Any of "requires_input", "requires_review", "ready_for_confirmation",
	// "processing", "provider_session_ready".
	Phase                TaxBridgeSessionGetResponsePhase           `json:"phase" api:"required"`
	Provider             TaxBridgeSessionGetResponseProvider        `json:"provider" api:"required"`
	ProviderSession      TaxBridgeSessionGetResponseProviderSession `json:"provider_session" api:"required"`
	Quote                TaxBridgeSessionGetResponseQuote           `json:"quote" api:"required"`
	ReplacementSessionID string                                     `json:"replacement_session_id" api:"required"`
	ReplacesSessionID    string                                     `json:"replaces_session_id" api:"required"`
	Requirements         []TaxBridgeSessionGetResponseRequirement   `json:"requirements" api:"required"`
	// Any of "open", "complete", "expired", "canceled", "failed".
	Status     TaxBridgeSessionGetResponseStatus     `json:"status" api:"required"`
	TaxContext TaxBridgeSessionGetResponseTaxContext `json:"tax_context" api:"required"`
	// Any of "not_calculated", "requires_input", "pending_review", "calculated",
	// "provider_verified", "committed", "reconciled", "mismatch", "voided",
	// "not_applicable".
	TaxStatus TaxBridgeSessionGetResponseTaxStatus `json:"tax_status" api:"required"`
	Testmode  bool                                 `json:"testmode" api:"required"`
	UpdatedAt time.Time                            `json:"updated_at" api:"required" format:"date-time"`
	// Opaque Stripe or Numeral URL. Redirect without inspecting the hostname.
	URL     string `json:"url" api:"required" format:"uri"`
	Version int64  `json:"version" api:"required"`
	// Returned exactly once on an embedded-mode create. Keep in memory and assign it
	// to the numeral-checkout element as a JavaScript property.
	ClientSecret string `json:"client_secret"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		CancellationReason   respjson.Field
		Checkout             respjson.Field
		CollectionMode       respjson.Field
		CompletedAt          respjson.Field
		ConfigID             respjson.Field
		ConfigVersion        respjson.Field
		ConfirmationMethod   respjson.Field
		CreatedAt            respjson.Field
		CustomerContext      respjson.Field
		ExpiresAt            respjson.Field
		ExternalReference    respjson.Field
		LastError            respjson.Field
		NextAction           respjson.Field
		Object               respjson.Field
		PaymentStatus        respjson.Field
		Phase                respjson.Field
		Provider             respjson.Field
		ProviderSession      respjson.Field
		Quote                respjson.Field
		ReplacementSessionID respjson.Field
		ReplacesSessionID    respjson.Field
		Requirements         respjson.Field
		Status               respjson.Field
		TaxContext           respjson.Field
		TaxStatus            respjson.Field
		Testmode             respjson.Field
		UpdatedAt            respjson.Field
		URL                  respjson.Field
		Version              respjson.Field
		ClientSecret         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponse) RawJSON

func (r TaxBridgeSessionGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponse) UnmarshalJSON

func (r *TaxBridgeSessionGetResponse) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseCancellationReason

type TaxBridgeSessionGetResponseCancellationReason string
const (
	TaxBridgeSessionGetResponseCancellationReasonRequested             TaxBridgeSessionGetResponseCancellationReason = "requested"
	TaxBridgeSessionGetResponseCancellationReasonSuperseded            TaxBridgeSessionGetResponseCancellationReason = "superseded"
	TaxBridgeSessionGetResponseCancellationReasonConfigurationDisabled TaxBridgeSessionGetResponseCancellationReason = "configuration_disabled"
)

type TaxBridgeSessionGetResponseCheckout

type TaxBridgeSessionGetResponseCheckout struct {
	CancelURL string                                        `json:"cancel_url" api:"required" format:"uri"`
	Currency  string                                        `json:"currency" api:"required"`
	LineItems []TaxBridgeSessionGetResponseCheckoutLineItem `json:"line_items" api:"required"`
	// Any of "payment", "subscription".
	Mode               string `json:"mode" api:"required"`
	SuccessURL         string `json:"success_url" api:"required" format:"uri"`
	ProviderCustomerID string `json:"provider_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CancelURL          respjson.Field
		Currency           respjson.Field
		LineItems          respjson.Field
		Mode               respjson.Field
		SuccessURL         respjson.Field
		ProviderCustomerID respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseCheckout) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseCheckout) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseCheckout) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseCheckoutLineItem

type TaxBridgeSessionGetResponseCheckoutLineItem struct {
	Currency        string `json:"currency" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	ProductName     string `json:"product_name" api:"required"`
	Quantity        int64  `json:"quantity" api:"required"`
	// Per-unit amount in the currency's minor unit.
	UnitAmount        int64  `json:"unit_amount" api:"required"`
	ProviderProductID string `json:"provider_product_id"`
	// Stripe recurring interval for a recurring Price. Omitted for one-time Prices.
	RecurringInterval string `json:"recurring_interval"`
	// Number of recurring intervals between subscription billings. Omitted for
	// one-time Prices.
	RecurringIntervalCount int64 `json:"recurring_interval_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency               respjson.Field
		PriceID                respjson.Field
		ProductCategory        respjson.Field
		ProductName            respjson.Field
		Quantity               respjson.Field
		UnitAmount             respjson.Field
		ProviderProductID      respjson.Field
		RecurringInterval      respjson.Field
		RecurringIntervalCount respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseCheckoutLineItem) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseCheckoutLineItem) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseCheckoutLineItem) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseCollectionMode

type TaxBridgeSessionGetResponseCollectionMode string
const (
	TaxBridgeSessionGetResponseCollectionModeHosted   TaxBridgeSessionGetResponseCollectionMode = "hosted"
	TaxBridgeSessionGetResponseCollectionModeEmbedded TaxBridgeSessionGetResponseCollectionMode = "embedded"
)

type TaxBridgeSessionGetResponseConfirmationMethod

type TaxBridgeSessionGetResponseConfirmationMethod string
const (
	TaxBridgeSessionGetResponseConfirmationMethodAutomatic TaxBridgeSessionGetResponseConfirmationMethod = "automatic"
	TaxBridgeSessionGetResponseConfirmationMethodManual    TaxBridgeSessionGetResponseConfirmationMethod = "manual"
)

type TaxBridgeSessionGetResponseCustomerContext

type TaxBridgeSessionGetResponseCustomerContext struct {
	Email              string `json:"email" format:"email"`
	MerchantCustomerID string `json:"merchant_customer_id"`
	// Numeral customer ID (cust\_...).
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email              respjson.Field
		MerchantCustomerID respjson.Field
		NumeralCustomerID  respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseCustomerContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseCustomerContext) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseCustomerContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseLastError

type TaxBridgeSessionGetResponseLastError struct {
	Code         string    `json:"code" api:"required"`
	Message      string    `json:"message" api:"required"`
	OccurredAt   time.Time `json:"occurred_at" api:"required" format:"date-time"`
	Retryable    bool      `json:"retryable" api:"required"`
	Provider     string    `json:"provider"`
	ProviderCode string    `json:"provider_code"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Code         respjson.Field
		Message      respjson.Field
		OccurredAt   respjson.Field
		Retryable    respjson.Field
		Provider     respjson.Field
		ProviderCode respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseLastError) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseLastError) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseLastError) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseNextAction

type TaxBridgeSessionGetResponseNextAction struct {
	// Any of "collect_input", "review", "confirm", "redirect_to_provider", "wait",
	// "contact_merchant".
	Type string `json:"type" api:"required"`
	// Opaque URL. Do not branch on its hostname.
	URL string `json:"url" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseNextAction) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseNextAction) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseNextAction) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseObject

type TaxBridgeSessionGetResponseObject string
const (
	TaxBridgeSessionGetResponseObjectTaxBridgeSession TaxBridgeSessionGetResponseObject = "tax.bridge_session"
)

type TaxBridgeSessionGetResponsePaymentStatus

type TaxBridgeSessionGetResponsePaymentStatus string
const (
	TaxBridgeSessionGetResponsePaymentStatusNotStarted        TaxBridgeSessionGetResponsePaymentStatus = "not_started"
	TaxBridgeSessionGetResponsePaymentStatusUnpaid            TaxBridgeSessionGetResponsePaymentStatus = "unpaid"
	TaxBridgeSessionGetResponsePaymentStatusProcessing        TaxBridgeSessionGetResponsePaymentStatus = "processing"
	TaxBridgeSessionGetResponsePaymentStatusPaid              TaxBridgeSessionGetResponsePaymentStatus = "paid"
	TaxBridgeSessionGetResponsePaymentStatusFailed            TaxBridgeSessionGetResponsePaymentStatus = "failed"
	TaxBridgeSessionGetResponsePaymentStatusNoPaymentRequired TaxBridgeSessionGetResponsePaymentStatus = "no_payment_required"
)

type TaxBridgeSessionGetResponsePhase

type TaxBridgeSessionGetResponsePhase string
const (
	TaxBridgeSessionGetResponsePhaseRequiresInput        TaxBridgeSessionGetResponsePhase = "requires_input"
	TaxBridgeSessionGetResponsePhaseRequiresReview       TaxBridgeSessionGetResponsePhase = "requires_review"
	TaxBridgeSessionGetResponsePhaseReadyForConfirmation TaxBridgeSessionGetResponsePhase = "ready_for_confirmation"
	TaxBridgeSessionGetResponsePhaseProcessing           TaxBridgeSessionGetResponsePhase = "processing"
	TaxBridgeSessionGetResponsePhaseProviderSessionReady TaxBridgeSessionGetResponsePhase = "provider_session_ready"
)

type TaxBridgeSessionGetResponseProvider

type TaxBridgeSessionGetResponseProvider struct {
	ConnectionID string `json:"connection_id" api:"required"`
	// Any of "stripe".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ConnectionID respjson.Field
		Type         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseProvider) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseProvider) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseProvider) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseProviderSession

type TaxBridgeSessionGetResponseProviderSession struct {
	ID     string `json:"id" api:"required"`
	Status string `json:"status" api:"required"`
	// Any of "checkout".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseProviderSession) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseProviderSession) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseProviderSession) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseQuote

type TaxBridgeSessionGetResponseQuote struct {
	CalculationID  string                                 `json:"calculation_id" api:"required"`
	Currency       string                                 `json:"currency" api:"required"`
	ExpiresAt      time.Time                              `json:"expires_at" api:"required" format:"date-time"`
	Lines          []TaxBridgeSessionGetResponseQuoteLine `json:"lines" api:"required"`
	Subtotal       int64                                  `json:"subtotal" api:"required"`
	Total          int64                                  `json:"total" api:"required"`
	TotalTaxAmount int64                                  `json:"total_tax_amount" api:"required"`
	// Any of "taxed", "not_taxed", "reverse_charge", "exempt", "zero_rated".
	Treatment string `json:"treatment" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CalculationID  respjson.Field
		Currency       respjson.Field
		ExpiresAt      respjson.Field
		Lines          respjson.Field
		Subtotal       respjson.Field
		Total          respjson.Field
		TotalTaxAmount respjson.Field
		Treatment      respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseQuote) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseQuote) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseQuote) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseQuoteLine

type TaxBridgeSessionGetResponseQuoteLine struct {
	AmountExcludingTax int64                                      `json:"amount_excluding_tax" api:"required"`
	PriceID            string                                     `json:"price_id" api:"required"`
	Quantity           int64                                      `json:"quantity" api:"required"`
	Rates              []TaxBridgeSessionGetResponseQuoteLineRate `json:"rates" api:"required"`
	TaxAmount          int64                                      `json:"tax_amount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		PriceID            respjson.Field
		Quantity           respjson.Field
		Rates              respjson.Field
		TaxAmount          respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseQuoteLine) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseQuoteLine) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseQuoteLine) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseQuoteLineRate

type TaxBridgeSessionGetResponseQuoteLineRate struct {
	DisplayName      string `json:"display_name" api:"required"`
	JurisdictionName string `json:"jurisdiction_name" api:"required"`
	// Decimal fraction, for example 0.08875.
	Rate     float64 `json:"rate" api:"required"`
	RateType string  `json:"rate_type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisplayName      respjson.Field
		JurisdictionName respjson.Field
		Rate             respjson.Field
		RateType         respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseQuoteLineRate) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseQuoteLineRate) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseQuoteLineRate) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseRequirement

type TaxBridgeSessionGetResponseRequirement struct {
	ID       string `json:"id" api:"required"`
	Blocking bool   `json:"blocking" api:"required"`
	// Any of "tax_location", "tax_identity", "exemption".
	Category string `json:"category" api:"required"`
	// Any of "tax_location.country", "tax_location.postal_code",
	// "tax_location.province", "tax_location.city", "tax_location.line_1",
	// "tax_identity.customer_type", "tax_identity.tax_id", "exemption.evidence".
	Code string `json:"code" api:"required"`
	// JSON Pointer rooted at /tax_context.
	FieldPath string `json:"field_path" api:"required"`
	// Any of "country", "postal_code", "province", "city", "address_line",
	// "customer_type", "tax_id", "text".
	InputKind    string                                             `json:"input_kind" api:"required"`
	Presentation TaxBridgeSessionGetResponseRequirementPresentation `json:"presentation" api:"required"`
	ReasonCode   string                                             `json:"reason_code" api:"required"`
	// Any of "required", "optional".
	Status string `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		Blocking     respjson.Field
		Category     respjson.Field
		Code         respjson.Field
		FieldPath    respjson.Field
		InputKind    respjson.Field
		Presentation respjson.Field
		ReasonCode   respjson.Field
		Status       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseRequirement) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseRequirement) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseRequirement) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseRequirementPresentation

type TaxBridgeSessionGetResponseRequirementPresentation struct {
	LabelKey string `json:"label_key" api:"required"`
	HelpKey  string `json:"help_key"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		LabelKey    respjson.Field
		HelpKey     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseRequirementPresentation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseRequirementPresentation) UnmarshalJSON

type TaxBridgeSessionGetResponseStatus

type TaxBridgeSessionGetResponseStatus string
const (
	TaxBridgeSessionGetResponseStatusOpen     TaxBridgeSessionGetResponseStatus = "open"
	TaxBridgeSessionGetResponseStatusComplete TaxBridgeSessionGetResponseStatus = "complete"
	TaxBridgeSessionGetResponseStatusExpired  TaxBridgeSessionGetResponseStatus = "expired"
	TaxBridgeSessionGetResponseStatusCanceled TaxBridgeSessionGetResponseStatus = "canceled"
	TaxBridgeSessionGetResponseStatusFailed   TaxBridgeSessionGetResponseStatus = "failed"
)

type TaxBridgeSessionGetResponseTaxContext

type TaxBridgeSessionGetResponseTaxContext struct {
	Exemption TaxBridgeSessionGetResponseTaxContextExemption `json:"exemption"`
	Identity  TaxBridgeSessionGetResponseTaxContextIdentity  `json:"identity"`
	// Canonical tax location. After IP resolution a response may contain both the
	// original IP and its derived address.
	Location TaxBridgeSessionGetResponseTaxContextLocation `json:"location"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Exemption   respjson.Field
		Identity    respjson.Field
		Location    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseTaxContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseTaxContext) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseTaxContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseTaxContextExemption

type TaxBridgeSessionGetResponseTaxContextExemption struct {
	Claimed           bool   `json:"claimed" api:"required"`
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Claimed           respjson.Field
		NumeralCustomerID respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseTaxContextExemption) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseTaxContextExemption) UnmarshalJSON

type TaxBridgeSessionGetResponseTaxContextIdentity

type TaxBridgeSessionGetResponseTaxContextIdentity struct {
	// Any of "individual", "business".
	CustomerType string                                               `json:"customer_type"`
	TaxIDs       []TaxBridgeSessionGetResponseTaxContextIdentityTaxID `json:"tax_ids"`
	// Any of "not_checked", "format_valid", "valid", "invalid", "unavailable",
	// "pending".
	ValidationStatus string `json:"validation_status"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CustomerType     respjson.Field
		TaxIDs           respjson.Field
		ValidationStatus respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseTaxContextIdentity) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseTaxContextIdentity) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseTaxContextIdentity) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseTaxContextIdentityTaxID

type TaxBridgeSessionGetResponseTaxContextIdentityTaxID struct {
	Type  string `json:"type" api:"required"`
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseTaxContextIdentityTaxID) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseTaxContextIdentityTaxID) UnmarshalJSON

type TaxBridgeSessionGetResponseTaxContextLocation

type TaxBridgeSessionGetResponseTaxContextLocation struct {
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance" api:"required"`
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis" api:"required"`
	// Any of "merchant", "ip", "numeral_profile", "buyer", "provider_customer".
	Source      string                                               `json:"source" api:"required"`
	Address     TaxBridgeSessionGetResponseTaxContextLocationAddress `json:"address"`
	CollectedAt time.Time                                            `json:"collected_at" format:"date-time"`
	// The customer's public IPv4 or IPv6 address. Capture it on the merchant server;
	// do not send the merchant server's IP.
	IP TaxBridgeSessionGetResponseTaxContextLocationIP `json:"ip"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Assurance   respjson.Field
		Basis       respjson.Field
		Source      respjson.Field
		Address     respjson.Field
		CollectedAt respjson.Field
		IP          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Canonical tax location. After IP resolution a response may contain both the original IP and its derived address.

func (TaxBridgeSessionGetResponseTaxContextLocation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseTaxContextLocation) UnmarshalJSON

func (r *TaxBridgeSessionGetResponseTaxContextLocation) UnmarshalJSON(data []byte) error

type TaxBridgeSessionGetResponseTaxContextLocationAddress

type TaxBridgeSessionGetResponseTaxContextLocationAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionGetResponseTaxContextLocationAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseTaxContextLocationAddress) UnmarshalJSON

type TaxBridgeSessionGetResponseTaxContextLocationIP

type TaxBridgeSessionGetResponseTaxContextLocationIP struct {
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The customer's public IPv4 or IPv6 address. Capture it on the merchant server; do not send the merchant server's IP.

func (TaxBridgeSessionGetResponseTaxContextLocationIP) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionGetResponseTaxContextLocationIP) UnmarshalJSON

type TaxBridgeSessionGetResponseTaxStatus

type TaxBridgeSessionGetResponseTaxStatus string
const (
	TaxBridgeSessionGetResponseTaxStatusNotCalculated    TaxBridgeSessionGetResponseTaxStatus = "not_calculated"
	TaxBridgeSessionGetResponseTaxStatusRequiresInput    TaxBridgeSessionGetResponseTaxStatus = "requires_input"
	TaxBridgeSessionGetResponseTaxStatusPendingReview    TaxBridgeSessionGetResponseTaxStatus = "pending_review"
	TaxBridgeSessionGetResponseTaxStatusCalculated       TaxBridgeSessionGetResponseTaxStatus = "calculated"
	TaxBridgeSessionGetResponseTaxStatusProviderVerified TaxBridgeSessionGetResponseTaxStatus = "provider_verified"
	TaxBridgeSessionGetResponseTaxStatusCommitted        TaxBridgeSessionGetResponseTaxStatus = "committed"
	TaxBridgeSessionGetResponseTaxStatusReconciled       TaxBridgeSessionGetResponseTaxStatus = "reconciled"
	TaxBridgeSessionGetResponseTaxStatusMismatch         TaxBridgeSessionGetResponseTaxStatus = "mismatch"
	TaxBridgeSessionGetResponseTaxStatusVoided           TaxBridgeSessionGetResponseTaxStatus = "voided"
	TaxBridgeSessionGetResponseTaxStatusNotApplicable    TaxBridgeSessionGetResponseTaxStatus = "not_applicable"
)

type TaxBridgeSessionListParams

type TaxBridgeSessionListParams struct {
	// Any of "2026-03-01".
	XAPIVersion TaxBridgeSessionListParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	// Opaque cursor from the previous page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by public session status.
	//
	// Any of "open", "complete", "expired", "canceled", "failed".
	Status TaxBridgeSessionListParamsStatus `query:"status,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionListParams) URLQuery

func (r TaxBridgeSessionListParams) URLQuery() (v url.Values, err error)

URLQuery serializes TaxBridgeSessionListParams's query parameters as `url.Values`.

type TaxBridgeSessionListParamsStatus

type TaxBridgeSessionListParamsStatus string

Filter by public session status.

const (
	TaxBridgeSessionListParamsStatusOpen     TaxBridgeSessionListParamsStatus = "open"
	TaxBridgeSessionListParamsStatusComplete TaxBridgeSessionListParamsStatus = "complete"
	TaxBridgeSessionListParamsStatusExpired  TaxBridgeSessionListParamsStatus = "expired"
	TaxBridgeSessionListParamsStatusCanceled TaxBridgeSessionListParamsStatus = "canceled"
	TaxBridgeSessionListParamsStatusFailed   TaxBridgeSessionListParamsStatus = "failed"
)

type TaxBridgeSessionListParamsXAPIVersion

type TaxBridgeSessionListParamsXAPIVersion string
const (
	TaxBridgeSessionListParamsXAPIVersion2026_03_01 TaxBridgeSessionListParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeSessionListResponse

type TaxBridgeSessionListResponse struct {
	BridgeSessions []TaxBridgeSessionListResponseBridgeSession `json:"bridge_sessions" api:"required"`
	HasMore        bool                                        `json:"has_more" api:"required"`
	// Any of "list".
	Object     TaxBridgeSessionListResponseObject `json:"object" api:"required"`
	NextCursor string                             `json:"next_cursor"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BridgeSessions respjson.Field
		HasMore        respjson.Field
		Object         respjson.Field
		NextCursor     respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponse) UnmarshalJSON

func (r *TaxBridgeSessionListResponse) UnmarshalJSON(data []byte) error

type TaxBridgeSessionListResponseBridgeSession

type TaxBridgeSessionListResponseBridgeSession struct {
	ID string `json:"id" api:"required"`
	// Any of "requested", "superseded", "configuration_disabled".
	CancellationReason string                                            `json:"cancellation_reason" api:"required"`
	Checkout           TaxBridgeSessionListResponseBridgeSessionCheckout `json:"checkout" api:"required"`
	// Any of "hosted", "embedded".
	CollectionMode string    `json:"collection_mode" api:"required"`
	CompletedAt    time.Time `json:"completed_at" api:"required" format:"date-time"`
	ConfigID       string    `json:"config_id" api:"required"`
	ConfigVersion  int64     `json:"config_version" api:"required"`
	// Any of "automatic", "manual".
	ConfirmationMethod string                                                   `json:"confirmation_method" api:"required"`
	CreatedAt          time.Time                                                `json:"created_at" api:"required" format:"date-time"`
	CustomerContext    TaxBridgeSessionListResponseBridgeSessionCustomerContext `json:"customer_context" api:"required"`
	ExpiresAt          time.Time                                                `json:"expires_at" api:"required" format:"date-time"`
	ExternalReference  string                                                   `json:"external_reference" api:"required"`
	LastError          TaxBridgeSessionListResponseBridgeSessionLastError       `json:"last_error" api:"required"`
	NextAction         TaxBridgeSessionListResponseBridgeSessionNextAction      `json:"next_action" api:"required"`
	// Any of "tax.bridge_session".
	Object string `json:"object" api:"required"`
	// Any of "not_started", "unpaid", "processing", "paid", "failed",
	// "no_payment_required".
	PaymentStatus string `json:"payment_status" api:"required"`
	// Any of "requires_input", "requires_review", "ready_for_confirmation",
	// "processing", "provider_session_ready".
	Phase                string                                                   `json:"phase" api:"required"`
	Provider             TaxBridgeSessionListResponseBridgeSessionProvider        `json:"provider" api:"required"`
	ProviderSession      TaxBridgeSessionListResponseBridgeSessionProviderSession `json:"provider_session" api:"required"`
	Quote                TaxBridgeSessionListResponseBridgeSessionQuote           `json:"quote" api:"required"`
	ReplacementSessionID string                                                   `json:"replacement_session_id" api:"required"`
	ReplacesSessionID    string                                                   `json:"replaces_session_id" api:"required"`
	Requirements         []TaxBridgeSessionListResponseBridgeSessionRequirement   `json:"requirements" api:"required"`
	// Any of "open", "complete", "expired", "canceled", "failed".
	Status     string                                              `json:"status" api:"required"`
	TaxContext TaxBridgeSessionListResponseBridgeSessionTaxContext `json:"tax_context" api:"required"`
	// Any of "not_calculated", "requires_input", "pending_review", "calculated",
	// "provider_verified", "committed", "reconciled", "mismatch", "voided",
	// "not_applicable".
	TaxStatus string    `json:"tax_status" api:"required"`
	Testmode  bool      `json:"testmode" api:"required"`
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Opaque Stripe or Numeral URL. Redirect without inspecting the hostname.
	URL     string `json:"url" api:"required" format:"uri"`
	Version int64  `json:"version" api:"required"`
	// Returned exactly once on an embedded-mode create. Keep in memory and assign it
	// to the numeral-checkout element as a JavaScript property.
	ClientSecret string `json:"client_secret"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		CancellationReason   respjson.Field
		Checkout             respjson.Field
		CollectionMode       respjson.Field
		CompletedAt          respjson.Field
		ConfigID             respjson.Field
		ConfigVersion        respjson.Field
		ConfirmationMethod   respjson.Field
		CreatedAt            respjson.Field
		CustomerContext      respjson.Field
		ExpiresAt            respjson.Field
		ExternalReference    respjson.Field
		LastError            respjson.Field
		NextAction           respjson.Field
		Object               respjson.Field
		PaymentStatus        respjson.Field
		Phase                respjson.Field
		Provider             respjson.Field
		ProviderSession      respjson.Field
		Quote                respjson.Field
		ReplacementSessionID respjson.Field
		ReplacesSessionID    respjson.Field
		Requirements         respjson.Field
		Status               respjson.Field
		TaxContext           respjson.Field
		TaxStatus            respjson.Field
		Testmode             respjson.Field
		UpdatedAt            respjson.Field
		URL                  respjson.Field
		Version              respjson.Field
		ClientSecret         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSession) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSession) UnmarshalJSON

func (r *TaxBridgeSessionListResponseBridgeSession) UnmarshalJSON(data []byte) error

type TaxBridgeSessionListResponseBridgeSessionCheckout

type TaxBridgeSessionListResponseBridgeSessionCheckout struct {
	CancelURL string                                                      `json:"cancel_url" api:"required" format:"uri"`
	Currency  string                                                      `json:"currency" api:"required"`
	LineItems []TaxBridgeSessionListResponseBridgeSessionCheckoutLineItem `json:"line_items" api:"required"`
	// Any of "payment", "subscription".
	Mode               string `json:"mode" api:"required"`
	SuccessURL         string `json:"success_url" api:"required" format:"uri"`
	ProviderCustomerID string `json:"provider_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CancelURL          respjson.Field
		Currency           respjson.Field
		LineItems          respjson.Field
		Mode               respjson.Field
		SuccessURL         respjson.Field
		ProviderCustomerID respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionCheckout) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionCheckout) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionCheckoutLineItem

type TaxBridgeSessionListResponseBridgeSessionCheckoutLineItem struct {
	Currency        string `json:"currency" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	ProductName     string `json:"product_name" api:"required"`
	Quantity        int64  `json:"quantity" api:"required"`
	// Per-unit amount in the currency's minor unit.
	UnitAmount        int64  `json:"unit_amount" api:"required"`
	ProviderProductID string `json:"provider_product_id"`
	// Stripe recurring interval for a recurring Price. Omitted for one-time Prices.
	RecurringInterval string `json:"recurring_interval"`
	// Number of recurring intervals between subscription billings. Omitted for
	// one-time Prices.
	RecurringIntervalCount int64 `json:"recurring_interval_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency               respjson.Field
		PriceID                respjson.Field
		ProductCategory        respjson.Field
		ProductName            respjson.Field
		Quantity               respjson.Field
		UnitAmount             respjson.Field
		ProviderProductID      respjson.Field
		RecurringInterval      respjson.Field
		RecurringIntervalCount respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionCheckoutLineItem) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionCheckoutLineItem) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionCustomerContext

type TaxBridgeSessionListResponseBridgeSessionCustomerContext struct {
	Email              string `json:"email" format:"email"`
	MerchantCustomerID string `json:"merchant_customer_id"`
	// Numeral customer ID (cust\_...).
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email              respjson.Field
		MerchantCustomerID respjson.Field
		NumeralCustomerID  respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionCustomerContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionCustomerContext) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionLastError

type TaxBridgeSessionListResponseBridgeSessionLastError struct {
	Code         string    `json:"code" api:"required"`
	Message      string    `json:"message" api:"required"`
	OccurredAt   time.Time `json:"occurred_at" api:"required" format:"date-time"`
	Retryable    bool      `json:"retryable" api:"required"`
	Provider     string    `json:"provider"`
	ProviderCode string    `json:"provider_code"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Code         respjson.Field
		Message      respjson.Field
		OccurredAt   respjson.Field
		Retryable    respjson.Field
		Provider     respjson.Field
		ProviderCode respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionLastError) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionLastError) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionNextAction

type TaxBridgeSessionListResponseBridgeSessionNextAction struct {
	// Any of "collect_input", "review", "confirm", "redirect_to_provider", "wait",
	// "contact_merchant".
	Type string `json:"type" api:"required"`
	// Opaque URL. Do not branch on its hostname.
	URL string `json:"url" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionNextAction) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionNextAction) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionProvider

type TaxBridgeSessionListResponseBridgeSessionProvider struct {
	ConnectionID string `json:"connection_id" api:"required"`
	// Any of "stripe".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ConnectionID respjson.Field
		Type         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionProvider) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionProvider) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionProviderSession

type TaxBridgeSessionListResponseBridgeSessionProviderSession struct {
	ID     string `json:"id" api:"required"`
	Status string `json:"status" api:"required"`
	// Any of "checkout".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionProviderSession) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionProviderSession) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionQuote

type TaxBridgeSessionListResponseBridgeSessionQuote struct {
	CalculationID  string                                               `json:"calculation_id" api:"required"`
	Currency       string                                               `json:"currency" api:"required"`
	ExpiresAt      time.Time                                            `json:"expires_at" api:"required" format:"date-time"`
	Lines          []TaxBridgeSessionListResponseBridgeSessionQuoteLine `json:"lines" api:"required"`
	Subtotal       int64                                                `json:"subtotal" api:"required"`
	Total          int64                                                `json:"total" api:"required"`
	TotalTaxAmount int64                                                `json:"total_tax_amount" api:"required"`
	// Any of "taxed", "not_taxed", "reverse_charge", "exempt", "zero_rated".
	Treatment string `json:"treatment" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CalculationID  respjson.Field
		Currency       respjson.Field
		ExpiresAt      respjson.Field
		Lines          respjson.Field
		Subtotal       respjson.Field
		Total          respjson.Field
		TotalTaxAmount respjson.Field
		Treatment      respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionQuote) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionQuote) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionQuoteLine

type TaxBridgeSessionListResponseBridgeSessionQuoteLine struct {
	AmountExcludingTax int64                                                    `json:"amount_excluding_tax" api:"required"`
	PriceID            string                                                   `json:"price_id" api:"required"`
	Quantity           int64                                                    `json:"quantity" api:"required"`
	Rates              []TaxBridgeSessionListResponseBridgeSessionQuoteLineRate `json:"rates" api:"required"`
	TaxAmount          int64                                                    `json:"tax_amount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		PriceID            respjson.Field
		Quantity           respjson.Field
		Rates              respjson.Field
		TaxAmount          respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionQuoteLine) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionQuoteLine) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionQuoteLineRate

type TaxBridgeSessionListResponseBridgeSessionQuoteLineRate struct {
	DisplayName      string `json:"display_name" api:"required"`
	JurisdictionName string `json:"jurisdiction_name" api:"required"`
	// Decimal fraction, for example 0.08875.
	Rate     float64 `json:"rate" api:"required"`
	RateType string  `json:"rate_type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisplayName      respjson.Field
		JurisdictionName respjson.Field
		Rate             respjson.Field
		RateType         respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionQuoteLineRate) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionQuoteLineRate) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionRequirement

type TaxBridgeSessionListResponseBridgeSessionRequirement struct {
	ID       string `json:"id" api:"required"`
	Blocking bool   `json:"blocking" api:"required"`
	// Any of "tax_location", "tax_identity", "exemption".
	Category string `json:"category" api:"required"`
	// Any of "tax_location.country", "tax_location.postal_code",
	// "tax_location.province", "tax_location.city", "tax_location.line_1",
	// "tax_identity.customer_type", "tax_identity.tax_id", "exemption.evidence".
	Code string `json:"code" api:"required"`
	// JSON Pointer rooted at /tax_context.
	FieldPath string `json:"field_path" api:"required"`
	// Any of "country", "postal_code", "province", "city", "address_line",
	// "customer_type", "tax_id", "text".
	InputKind    string                                                           `json:"input_kind" api:"required"`
	Presentation TaxBridgeSessionListResponseBridgeSessionRequirementPresentation `json:"presentation" api:"required"`
	ReasonCode   string                                                           `json:"reason_code" api:"required"`
	// Any of "required", "optional".
	Status string `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		Blocking     respjson.Field
		Category     respjson.Field
		Code         respjson.Field
		FieldPath    respjson.Field
		InputKind    respjson.Field
		Presentation respjson.Field
		ReasonCode   respjson.Field
		Status       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionRequirement) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionRequirement) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionRequirementPresentation

type TaxBridgeSessionListResponseBridgeSessionRequirementPresentation struct {
	LabelKey string `json:"label_key" api:"required"`
	HelpKey  string `json:"help_key"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		LabelKey    respjson.Field
		HelpKey     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionRequirementPresentation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionRequirementPresentation) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionTaxContext

type TaxBridgeSessionListResponseBridgeSessionTaxContext struct {
	Exemption TaxBridgeSessionListResponseBridgeSessionTaxContextExemption `json:"exemption"`
	Identity  TaxBridgeSessionListResponseBridgeSessionTaxContextIdentity  `json:"identity"`
	// Canonical tax location. After IP resolution a response may contain both the
	// original IP and its derived address.
	Location TaxBridgeSessionListResponseBridgeSessionTaxContextLocation `json:"location"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Exemption   respjson.Field
		Identity    respjson.Field
		Location    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionTaxContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionTaxContext) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionTaxContextExemption

type TaxBridgeSessionListResponseBridgeSessionTaxContextExemption struct {
	Claimed           bool   `json:"claimed" api:"required"`
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Claimed           respjson.Field
		NumeralCustomerID respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionTaxContextExemption) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionTaxContextExemption) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionTaxContextIdentity

type TaxBridgeSessionListResponseBridgeSessionTaxContextIdentity struct {
	// Any of "individual", "business".
	CustomerType string                                                             `json:"customer_type"`
	TaxIDs       []TaxBridgeSessionListResponseBridgeSessionTaxContextIdentityTaxID `json:"tax_ids"`
	// Any of "not_checked", "format_valid", "valid", "invalid", "unavailable",
	// "pending".
	ValidationStatus string `json:"validation_status"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CustomerType     respjson.Field
		TaxIDs           respjson.Field
		ValidationStatus respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionTaxContextIdentity) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionTaxContextIdentity) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionTaxContextIdentityTaxID

type TaxBridgeSessionListResponseBridgeSessionTaxContextIdentityTaxID struct {
	Type  string `json:"type" api:"required"`
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionTaxContextIdentityTaxID) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionTaxContextIdentityTaxID) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionTaxContextLocation

type TaxBridgeSessionListResponseBridgeSessionTaxContextLocation struct {
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance" api:"required"`
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis" api:"required"`
	// Any of "merchant", "ip", "numeral_profile", "buyer", "provider_customer".
	Source      string                                                             `json:"source" api:"required"`
	Address     TaxBridgeSessionListResponseBridgeSessionTaxContextLocationAddress `json:"address"`
	CollectedAt time.Time                                                          `json:"collected_at" format:"date-time"`
	// The customer's public IPv4 or IPv6 address. Capture it on the merchant server;
	// do not send the merchant server's IP.
	IP TaxBridgeSessionListResponseBridgeSessionTaxContextLocationIP `json:"ip"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Assurance   respjson.Field
		Basis       respjson.Field
		Source      respjson.Field
		Address     respjson.Field
		CollectedAt respjson.Field
		IP          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Canonical tax location. After IP resolution a response may contain both the original IP and its derived address.

func (TaxBridgeSessionListResponseBridgeSessionTaxContextLocation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionTaxContextLocation) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionTaxContextLocationAddress

type TaxBridgeSessionListResponseBridgeSessionTaxContextLocationAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionListResponseBridgeSessionTaxContextLocationAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionTaxContextLocationAddress) UnmarshalJSON

type TaxBridgeSessionListResponseBridgeSessionTaxContextLocationIP

type TaxBridgeSessionListResponseBridgeSessionTaxContextLocationIP struct {
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The customer's public IPv4 or IPv6 address. Capture it on the merchant server; do not send the merchant server's IP.

func (TaxBridgeSessionListResponseBridgeSessionTaxContextLocationIP) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionListResponseBridgeSessionTaxContextLocationIP) UnmarshalJSON

type TaxBridgeSessionListResponseObject

type TaxBridgeSessionListResponseObject string
const (
	TaxBridgeSessionListResponseObjectList TaxBridgeSessionListResponseObject = "list"
)

type TaxBridgeSessionNewParams

type TaxBridgeSessionNewParams struct {
	Checkout TaxBridgeSessionNewParamsCheckout `json:"checkout,omitzero" api:"required"`
	// hosted redirects through Numeral when buyer input is needed; embedded returns a
	// one-time client_secret for the Numeral custom element.
	//
	// Any of "hosted", "embedded".
	CollectionMode TaxBridgeSessionNewParamsCollectionMode `json:"collection_mode,omitzero" api:"required"`
	ConfigID       string                                  `json:"config_id" api:"required"`
	// Any of "2026-03-01".
	XAPIVersion       TaxBridgeSessionNewParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	ExternalReference param.Opt[string]                    `json:"external_reference,omitzero"`
	ReplacesSessionID param.Opt[string]                    `json:"replaces_session_id,omitzero"`
	IdempotencyKey    param.Opt[string]                    `header:"Idempotency-Key,omitzero" json:"-"`
	// Any of "automatic", "manual".
	ConfirmationMethod TaxBridgeSessionNewParamsConfirmationMethod `json:"confirmation_method,omitzero"`
	CustomerContext    TaxBridgeSessionNewParamsCustomerContext    `json:"customer_context,omitzero"`
	TaxContext         TaxBridgeSessionNewParamsTaxContext         `json:"tax_context,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionNewParams) MarshalJSON

func (r TaxBridgeSessionNewParams) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParams) UnmarshalJSON

func (r *TaxBridgeSessionNewParams) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewParamsCheckout

type TaxBridgeSessionNewParamsCheckout struct {
	LineItems []TaxBridgeSessionNewParamsCheckoutLineItem `json:"line_items,omitzero" api:"required"`
	// Stripe Checkout mode. Use payment for a one-time purchase or subscription for
	// recurring Stripe Prices. Subscription mode requires at least one recurring
	// Price. All recurring Prices must share the same billing interval and interval
	// count; fixed one-time Prices may be included as setup charges.
	//
	// Any of "payment", "subscription".
	Mode string `json:"mode,omitzero" api:"required"`
	// Must use an origin in allowed_redirect_origins.
	CancelURL param.Opt[string] `json:"cancel_url,omitzero" format:"uri"`
	// Stripe Customer ID (cus\_...) from the connected account.
	Customer      param.Opt[string] `json:"customer,omitzero"`
	CustomerEmail param.Opt[string] `json:"customer_email,omitzero" format:"email"`
	// Must use an origin in allowed_redirect_origins.
	SuccessURL param.Opt[string] `json:"success_url,omitzero" format:"uri"`
	// contains filtered or unexported fields
}

The properties LineItems, Mode are required.

func (TaxBridgeSessionNewParamsCheckout) MarshalJSON

func (r TaxBridgeSessionNewParamsCheckout) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParamsCheckout) UnmarshalJSON

func (r *TaxBridgeSessionNewParamsCheckout) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewParamsCheckoutLineItem

type TaxBridgeSessionNewParamsCheckoutLineItem struct {
	// Stripe Price ID from the connected Stripe account.
	Price    string `json:"price" api:"required"`
	Quantity int64  `json:"quantity" api:"required"`
	// Numeral product category. Falls back to the configuration default.
	ProductCategory param.Opt[string] `json:"product_category,omitzero"`
	// contains filtered or unexported fields
}

The properties Price, Quantity are required.

func (TaxBridgeSessionNewParamsCheckoutLineItem) MarshalJSON

func (r TaxBridgeSessionNewParamsCheckoutLineItem) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParamsCheckoutLineItem) UnmarshalJSON

func (r *TaxBridgeSessionNewParamsCheckoutLineItem) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewParamsCollectionMode

type TaxBridgeSessionNewParamsCollectionMode string

hosted redirects through Numeral when buyer input is needed; embedded returns a one-time client_secret for the Numeral custom element.

const (
	TaxBridgeSessionNewParamsCollectionModeHosted   TaxBridgeSessionNewParamsCollectionMode = "hosted"
	TaxBridgeSessionNewParamsCollectionModeEmbedded TaxBridgeSessionNewParamsCollectionMode = "embedded"
)

type TaxBridgeSessionNewParamsConfirmationMethod

type TaxBridgeSessionNewParamsConfirmationMethod string
const (
	TaxBridgeSessionNewParamsConfirmationMethodAutomatic TaxBridgeSessionNewParamsConfirmationMethod = "automatic"
	TaxBridgeSessionNewParamsConfirmationMethodManual    TaxBridgeSessionNewParamsConfirmationMethod = "manual"
)

type TaxBridgeSessionNewParamsCustomerContext

type TaxBridgeSessionNewParamsCustomerContext struct {
	Email              param.Opt[string] `json:"email,omitzero" format:"email"`
	MerchantCustomerID param.Opt[string] `json:"merchant_customer_id,omitzero"`
	// Numeral customer ID (cust\_...).
	NumeralCustomerID param.Opt[string] `json:"numeral_customer_id,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionNewParamsCustomerContext) MarshalJSON

func (r TaxBridgeSessionNewParamsCustomerContext) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParamsCustomerContext) UnmarshalJSON

func (r *TaxBridgeSessionNewParamsCustomerContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewParamsTaxContext

type TaxBridgeSessionNewParamsTaxContext struct {
	Identity TaxBridgeSessionNewParamsTaxContextIdentity `json:"identity,omitzero"`
	// Provide exactly one of address or ip. If IP resolution is insufficient, the
	// selected collection mode obtains the missing address fields.
	Location TaxBridgeSessionNewParamsTaxContextLocationUnion `json:"location,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionNewParamsTaxContext) MarshalJSON

func (r TaxBridgeSessionNewParamsTaxContext) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParamsTaxContext) UnmarshalJSON

func (r *TaxBridgeSessionNewParamsTaxContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewParamsTaxContextIdentity

type TaxBridgeSessionNewParamsTaxContextIdentity struct {
	// Any of "individual", "business".
	CustomerType string                                             `json:"customer_type,omitzero"`
	TaxIDs       []TaxBridgeSessionNewParamsTaxContextIdentityTaxID `json:"tax_ids,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionNewParamsTaxContextIdentity) MarshalJSON

func (r TaxBridgeSessionNewParamsTaxContextIdentity) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParamsTaxContextIdentity) UnmarshalJSON

func (r *TaxBridgeSessionNewParamsTaxContextIdentity) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewParamsTaxContextIdentityTaxID

type TaxBridgeSessionNewParamsTaxContextIdentityTaxID struct {
	Type  string `json:"type" api:"required"`
	Value string `json:"value" api:"required"`
	// contains filtered or unexported fields
}

The properties Type, Value are required.

func (TaxBridgeSessionNewParamsTaxContextIdentityTaxID) MarshalJSON

func (r TaxBridgeSessionNewParamsTaxContextIdentityTaxID) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParamsTaxContextIdentityTaxID) UnmarshalJSON

type TaxBridgeSessionNewParamsTaxContextLocationObject

type TaxBridgeSessionNewParamsTaxContextLocationObject struct {
	Address TaxBridgeSessionNewParamsTaxContextLocationObjectAddress `json:"address,omitzero" api:"required"`
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis,omitzero" api:"required"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance,omitzero"`
	// Any of "merchant".
	Source string `json:"source,omitzero"`
	// contains filtered or unexported fields
}

The properties Address, Basis are required.

func (TaxBridgeSessionNewParamsTaxContextLocationObject) MarshalJSON

func (r TaxBridgeSessionNewParamsTaxContextLocationObject) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParamsTaxContextLocationObject) UnmarshalJSON

type TaxBridgeSessionNewParamsTaxContextLocationObject2

type TaxBridgeSessionNewParamsTaxContextLocationObject2 struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis,omitzero" api:"required"`
	// The customer's public IPv4 or IPv6 address. Capture it on the merchant server;
	// do not send the merchant server's IP.
	IP TaxBridgeSessionNewParamsTaxContextLocationObject2IP `json:"ip,omitzero" api:"required"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance,omitzero"`
	// Any of "merchant".
	Source string `json:"source,omitzero"`
	// contains filtered or unexported fields
}

The properties Basis, IP are required.

func (TaxBridgeSessionNewParamsTaxContextLocationObject2) MarshalJSON

func (r TaxBridgeSessionNewParamsTaxContextLocationObject2) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParamsTaxContextLocationObject2) UnmarshalJSON

type TaxBridgeSessionNewParamsTaxContextLocationObject2IP

type TaxBridgeSessionNewParamsTaxContextLocationObject2IP struct {
	Value string `json:"value" api:"required"`
	// contains filtered or unexported fields
}

The customer's public IPv4 or IPv6 address. Capture it on the merchant server; do not send the merchant server's IP.

The property Value is required.

func (TaxBridgeSessionNewParamsTaxContextLocationObject2IP) MarshalJSON

func (r TaxBridgeSessionNewParamsTaxContextLocationObject2IP) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionNewParamsTaxContextLocationObject2IP) UnmarshalJSON

type TaxBridgeSessionNewParamsTaxContextLocationObjectAddress

type TaxBridgeSessionNewParamsTaxContextLocationObjectAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string            `json:"country" api:"required"`
	City       param.Opt[string] `json:"city,omitzero"`
	Line1      param.Opt[string] `json:"line_1,omitzero"`
	Line2      param.Opt[string] `json:"line_2,omitzero"`
	PostalCode param.Opt[string] `json:"postal_code,omitzero"`
	// State, province, or region.
	Province param.Opt[string] `json:"province,omitzero"`
	// contains filtered or unexported fields
}

The property Country is required.

func (TaxBridgeSessionNewParamsTaxContextLocationObjectAddress) MarshalJSON

func (*TaxBridgeSessionNewParamsTaxContextLocationObjectAddress) UnmarshalJSON

type TaxBridgeSessionNewParamsTaxContextLocationUnion

type TaxBridgeSessionNewParamsTaxContextLocationUnion struct {
	OfTaxBridgeSessionNewsTaxContextLocationObject  *TaxBridgeSessionNewParamsTaxContextLocationObject  `json:",omitzero,inline"`
	OfTaxBridgeSessionNewsTaxContextLocationObject2 *TaxBridgeSessionNewParamsTaxContextLocationObject2 `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (TaxBridgeSessionNewParamsTaxContextLocationUnion) GetAddress

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionNewParamsTaxContextLocationUnion) GetAssurance

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionNewParamsTaxContextLocationUnion) GetBasis

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionNewParamsTaxContextLocationUnion) GetIP

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionNewParamsTaxContextLocationUnion) GetSource

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionNewParamsTaxContextLocationUnion) MarshalJSON

func (*TaxBridgeSessionNewParamsTaxContextLocationUnion) UnmarshalJSON

type TaxBridgeSessionNewParamsXAPIVersion

type TaxBridgeSessionNewParamsXAPIVersion string
const (
	TaxBridgeSessionNewParamsXAPIVersion2026_03_01 TaxBridgeSessionNewParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeSessionNewResponse

type TaxBridgeSessionNewResponse struct {
	ID string `json:"id" api:"required"`
	// Any of "requested", "superseded", "configuration_disabled".
	CancellationReason TaxBridgeSessionNewResponseCancellationReason `json:"cancellation_reason" api:"required"`
	Checkout           TaxBridgeSessionNewResponseCheckout           `json:"checkout" api:"required"`
	// Any of "hosted", "embedded".
	CollectionMode TaxBridgeSessionNewResponseCollectionMode `json:"collection_mode" api:"required"`
	CompletedAt    time.Time                                 `json:"completed_at" api:"required" format:"date-time"`
	ConfigID       string                                    `json:"config_id" api:"required"`
	ConfigVersion  int64                                     `json:"config_version" api:"required"`
	// Any of "automatic", "manual".
	ConfirmationMethod TaxBridgeSessionNewResponseConfirmationMethod `json:"confirmation_method" api:"required"`
	CreatedAt          time.Time                                     `json:"created_at" api:"required" format:"date-time"`
	CustomerContext    TaxBridgeSessionNewResponseCustomerContext    `json:"customer_context" api:"required"`
	ExpiresAt          time.Time                                     `json:"expires_at" api:"required" format:"date-time"`
	ExternalReference  string                                        `json:"external_reference" api:"required"`
	LastError          TaxBridgeSessionNewResponseLastError          `json:"last_error" api:"required"`
	NextAction         TaxBridgeSessionNewResponseNextAction         `json:"next_action" api:"required"`
	// Any of "tax.bridge_session".
	Object TaxBridgeSessionNewResponseObject `json:"object" api:"required"`
	// Any of "not_started", "unpaid", "processing", "paid", "failed",
	// "no_payment_required".
	PaymentStatus TaxBridgeSessionNewResponsePaymentStatus `json:"payment_status" api:"required"`
	// Any of "requires_input", "requires_review", "ready_for_confirmation",
	// "processing", "provider_session_ready".
	Phase                TaxBridgeSessionNewResponsePhase           `json:"phase" api:"required"`
	Provider             TaxBridgeSessionNewResponseProvider        `json:"provider" api:"required"`
	ProviderSession      TaxBridgeSessionNewResponseProviderSession `json:"provider_session" api:"required"`
	Quote                TaxBridgeSessionNewResponseQuote           `json:"quote" api:"required"`
	ReplacementSessionID string                                     `json:"replacement_session_id" api:"required"`
	ReplacesSessionID    string                                     `json:"replaces_session_id" api:"required"`
	Requirements         []TaxBridgeSessionNewResponseRequirement   `json:"requirements" api:"required"`
	// Any of "open", "complete", "expired", "canceled", "failed".
	Status     TaxBridgeSessionNewResponseStatus     `json:"status" api:"required"`
	TaxContext TaxBridgeSessionNewResponseTaxContext `json:"tax_context" api:"required"`
	// Any of "not_calculated", "requires_input", "pending_review", "calculated",
	// "provider_verified", "committed", "reconciled", "mismatch", "voided",
	// "not_applicable".
	TaxStatus TaxBridgeSessionNewResponseTaxStatus `json:"tax_status" api:"required"`
	Testmode  bool                                 `json:"testmode" api:"required"`
	UpdatedAt time.Time                            `json:"updated_at" api:"required" format:"date-time"`
	// Opaque Stripe or Numeral URL. Redirect without inspecting the hostname.
	URL     string `json:"url" api:"required" format:"uri"`
	Version int64  `json:"version" api:"required"`
	// Returned exactly once on an embedded-mode create. Keep in memory and assign it
	// to the numeral-checkout element as a JavaScript property.
	ClientSecret string `json:"client_secret"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		CancellationReason   respjson.Field
		Checkout             respjson.Field
		CollectionMode       respjson.Field
		CompletedAt          respjson.Field
		ConfigID             respjson.Field
		ConfigVersion        respjson.Field
		ConfirmationMethod   respjson.Field
		CreatedAt            respjson.Field
		CustomerContext      respjson.Field
		ExpiresAt            respjson.Field
		ExternalReference    respjson.Field
		LastError            respjson.Field
		NextAction           respjson.Field
		Object               respjson.Field
		PaymentStatus        respjson.Field
		Phase                respjson.Field
		Provider             respjson.Field
		ProviderSession      respjson.Field
		Quote                respjson.Field
		ReplacementSessionID respjson.Field
		ReplacesSessionID    respjson.Field
		Requirements         respjson.Field
		Status               respjson.Field
		TaxContext           respjson.Field
		TaxStatus            respjson.Field
		Testmode             respjson.Field
		UpdatedAt            respjson.Field
		URL                  respjson.Field
		Version              respjson.Field
		ClientSecret         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponse) RawJSON

func (r TaxBridgeSessionNewResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponse) UnmarshalJSON

func (r *TaxBridgeSessionNewResponse) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseCancellationReason

type TaxBridgeSessionNewResponseCancellationReason string
const (
	TaxBridgeSessionNewResponseCancellationReasonRequested             TaxBridgeSessionNewResponseCancellationReason = "requested"
	TaxBridgeSessionNewResponseCancellationReasonSuperseded            TaxBridgeSessionNewResponseCancellationReason = "superseded"
	TaxBridgeSessionNewResponseCancellationReasonConfigurationDisabled TaxBridgeSessionNewResponseCancellationReason = "configuration_disabled"
)

type TaxBridgeSessionNewResponseCheckout

type TaxBridgeSessionNewResponseCheckout struct {
	CancelURL string                                        `json:"cancel_url" api:"required" format:"uri"`
	Currency  string                                        `json:"currency" api:"required"`
	LineItems []TaxBridgeSessionNewResponseCheckoutLineItem `json:"line_items" api:"required"`
	// Any of "payment", "subscription".
	Mode               string `json:"mode" api:"required"`
	SuccessURL         string `json:"success_url" api:"required" format:"uri"`
	ProviderCustomerID string `json:"provider_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CancelURL          respjson.Field
		Currency           respjson.Field
		LineItems          respjson.Field
		Mode               respjson.Field
		SuccessURL         respjson.Field
		ProviderCustomerID respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseCheckout) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseCheckout) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseCheckout) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseCheckoutLineItem

type TaxBridgeSessionNewResponseCheckoutLineItem struct {
	Currency        string `json:"currency" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	ProductName     string `json:"product_name" api:"required"`
	Quantity        int64  `json:"quantity" api:"required"`
	// Per-unit amount in the currency's minor unit.
	UnitAmount        int64  `json:"unit_amount" api:"required"`
	ProviderProductID string `json:"provider_product_id"`
	// Stripe recurring interval for a recurring Price. Omitted for one-time Prices.
	RecurringInterval string `json:"recurring_interval"`
	// Number of recurring intervals between subscription billings. Omitted for
	// one-time Prices.
	RecurringIntervalCount int64 `json:"recurring_interval_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency               respjson.Field
		PriceID                respjson.Field
		ProductCategory        respjson.Field
		ProductName            respjson.Field
		Quantity               respjson.Field
		UnitAmount             respjson.Field
		ProviderProductID      respjson.Field
		RecurringInterval      respjson.Field
		RecurringIntervalCount respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseCheckoutLineItem) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseCheckoutLineItem) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseCheckoutLineItem) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseCollectionMode

type TaxBridgeSessionNewResponseCollectionMode string
const (
	TaxBridgeSessionNewResponseCollectionModeHosted   TaxBridgeSessionNewResponseCollectionMode = "hosted"
	TaxBridgeSessionNewResponseCollectionModeEmbedded TaxBridgeSessionNewResponseCollectionMode = "embedded"
)

type TaxBridgeSessionNewResponseConfirmationMethod

type TaxBridgeSessionNewResponseConfirmationMethod string
const (
	TaxBridgeSessionNewResponseConfirmationMethodAutomatic TaxBridgeSessionNewResponseConfirmationMethod = "automatic"
	TaxBridgeSessionNewResponseConfirmationMethodManual    TaxBridgeSessionNewResponseConfirmationMethod = "manual"
)

type TaxBridgeSessionNewResponseCustomerContext

type TaxBridgeSessionNewResponseCustomerContext struct {
	Email              string `json:"email" format:"email"`
	MerchantCustomerID string `json:"merchant_customer_id"`
	// Numeral customer ID (cust\_...).
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email              respjson.Field
		MerchantCustomerID respjson.Field
		NumeralCustomerID  respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseCustomerContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseCustomerContext) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseCustomerContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseLastError

type TaxBridgeSessionNewResponseLastError struct {
	Code         string    `json:"code" api:"required"`
	Message      string    `json:"message" api:"required"`
	OccurredAt   time.Time `json:"occurred_at" api:"required" format:"date-time"`
	Retryable    bool      `json:"retryable" api:"required"`
	Provider     string    `json:"provider"`
	ProviderCode string    `json:"provider_code"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Code         respjson.Field
		Message      respjson.Field
		OccurredAt   respjson.Field
		Retryable    respjson.Field
		Provider     respjson.Field
		ProviderCode respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseLastError) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseLastError) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseLastError) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseNextAction

type TaxBridgeSessionNewResponseNextAction struct {
	// Any of "collect_input", "review", "confirm", "redirect_to_provider", "wait",
	// "contact_merchant".
	Type string `json:"type" api:"required"`
	// Opaque URL. Do not branch on its hostname.
	URL string `json:"url" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseNextAction) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseNextAction) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseNextAction) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseObject

type TaxBridgeSessionNewResponseObject string
const (
	TaxBridgeSessionNewResponseObjectTaxBridgeSession TaxBridgeSessionNewResponseObject = "tax.bridge_session"
)

type TaxBridgeSessionNewResponsePaymentStatus

type TaxBridgeSessionNewResponsePaymentStatus string
const (
	TaxBridgeSessionNewResponsePaymentStatusNotStarted        TaxBridgeSessionNewResponsePaymentStatus = "not_started"
	TaxBridgeSessionNewResponsePaymentStatusUnpaid            TaxBridgeSessionNewResponsePaymentStatus = "unpaid"
	TaxBridgeSessionNewResponsePaymentStatusProcessing        TaxBridgeSessionNewResponsePaymentStatus = "processing"
	TaxBridgeSessionNewResponsePaymentStatusPaid              TaxBridgeSessionNewResponsePaymentStatus = "paid"
	TaxBridgeSessionNewResponsePaymentStatusFailed            TaxBridgeSessionNewResponsePaymentStatus = "failed"
	TaxBridgeSessionNewResponsePaymentStatusNoPaymentRequired TaxBridgeSessionNewResponsePaymentStatus = "no_payment_required"
)

type TaxBridgeSessionNewResponsePhase

type TaxBridgeSessionNewResponsePhase string
const (
	TaxBridgeSessionNewResponsePhaseRequiresInput        TaxBridgeSessionNewResponsePhase = "requires_input"
	TaxBridgeSessionNewResponsePhaseRequiresReview       TaxBridgeSessionNewResponsePhase = "requires_review"
	TaxBridgeSessionNewResponsePhaseReadyForConfirmation TaxBridgeSessionNewResponsePhase = "ready_for_confirmation"
	TaxBridgeSessionNewResponsePhaseProcessing           TaxBridgeSessionNewResponsePhase = "processing"
	TaxBridgeSessionNewResponsePhaseProviderSessionReady TaxBridgeSessionNewResponsePhase = "provider_session_ready"
)

type TaxBridgeSessionNewResponseProvider

type TaxBridgeSessionNewResponseProvider struct {
	ConnectionID string `json:"connection_id" api:"required"`
	// Any of "stripe".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ConnectionID respjson.Field
		Type         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseProvider) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseProvider) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseProvider) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseProviderSession

type TaxBridgeSessionNewResponseProviderSession struct {
	ID     string `json:"id" api:"required"`
	Status string `json:"status" api:"required"`
	// Any of "checkout".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseProviderSession) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseProviderSession) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseProviderSession) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseQuote

type TaxBridgeSessionNewResponseQuote struct {
	CalculationID  string                                 `json:"calculation_id" api:"required"`
	Currency       string                                 `json:"currency" api:"required"`
	ExpiresAt      time.Time                              `json:"expires_at" api:"required" format:"date-time"`
	Lines          []TaxBridgeSessionNewResponseQuoteLine `json:"lines" api:"required"`
	Subtotal       int64                                  `json:"subtotal" api:"required"`
	Total          int64                                  `json:"total" api:"required"`
	TotalTaxAmount int64                                  `json:"total_tax_amount" api:"required"`
	// Any of "taxed", "not_taxed", "reverse_charge", "exempt", "zero_rated".
	Treatment string `json:"treatment" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CalculationID  respjson.Field
		Currency       respjson.Field
		ExpiresAt      respjson.Field
		Lines          respjson.Field
		Subtotal       respjson.Field
		Total          respjson.Field
		TotalTaxAmount respjson.Field
		Treatment      respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseQuote) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseQuote) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseQuote) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseQuoteLine

type TaxBridgeSessionNewResponseQuoteLine struct {
	AmountExcludingTax int64                                      `json:"amount_excluding_tax" api:"required"`
	PriceID            string                                     `json:"price_id" api:"required"`
	Quantity           int64                                      `json:"quantity" api:"required"`
	Rates              []TaxBridgeSessionNewResponseQuoteLineRate `json:"rates" api:"required"`
	TaxAmount          int64                                      `json:"tax_amount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		PriceID            respjson.Field
		Quantity           respjson.Field
		Rates              respjson.Field
		TaxAmount          respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseQuoteLine) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseQuoteLine) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseQuoteLine) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseQuoteLineRate

type TaxBridgeSessionNewResponseQuoteLineRate struct {
	DisplayName      string `json:"display_name" api:"required"`
	JurisdictionName string `json:"jurisdiction_name" api:"required"`
	// Decimal fraction, for example 0.08875.
	Rate     float64 `json:"rate" api:"required"`
	RateType string  `json:"rate_type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisplayName      respjson.Field
		JurisdictionName respjson.Field
		Rate             respjson.Field
		RateType         respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseQuoteLineRate) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseQuoteLineRate) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseQuoteLineRate) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseRequirement

type TaxBridgeSessionNewResponseRequirement struct {
	ID       string `json:"id" api:"required"`
	Blocking bool   `json:"blocking" api:"required"`
	// Any of "tax_location", "tax_identity", "exemption".
	Category string `json:"category" api:"required"`
	// Any of "tax_location.country", "tax_location.postal_code",
	// "tax_location.province", "tax_location.city", "tax_location.line_1",
	// "tax_identity.customer_type", "tax_identity.tax_id", "exemption.evidence".
	Code string `json:"code" api:"required"`
	// JSON Pointer rooted at /tax_context.
	FieldPath string `json:"field_path" api:"required"`
	// Any of "country", "postal_code", "province", "city", "address_line",
	// "customer_type", "tax_id", "text".
	InputKind    string                                             `json:"input_kind" api:"required"`
	Presentation TaxBridgeSessionNewResponseRequirementPresentation `json:"presentation" api:"required"`
	ReasonCode   string                                             `json:"reason_code" api:"required"`
	// Any of "required", "optional".
	Status string `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		Blocking     respjson.Field
		Category     respjson.Field
		Code         respjson.Field
		FieldPath    respjson.Field
		InputKind    respjson.Field
		Presentation respjson.Field
		ReasonCode   respjson.Field
		Status       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseRequirement) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseRequirement) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseRequirement) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseRequirementPresentation

type TaxBridgeSessionNewResponseRequirementPresentation struct {
	LabelKey string `json:"label_key" api:"required"`
	HelpKey  string `json:"help_key"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		LabelKey    respjson.Field
		HelpKey     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseRequirementPresentation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseRequirementPresentation) UnmarshalJSON

type TaxBridgeSessionNewResponseStatus

type TaxBridgeSessionNewResponseStatus string
const (
	TaxBridgeSessionNewResponseStatusOpen     TaxBridgeSessionNewResponseStatus = "open"
	TaxBridgeSessionNewResponseStatusComplete TaxBridgeSessionNewResponseStatus = "complete"
	TaxBridgeSessionNewResponseStatusExpired  TaxBridgeSessionNewResponseStatus = "expired"
	TaxBridgeSessionNewResponseStatusCanceled TaxBridgeSessionNewResponseStatus = "canceled"
	TaxBridgeSessionNewResponseStatusFailed   TaxBridgeSessionNewResponseStatus = "failed"
)

type TaxBridgeSessionNewResponseTaxContext

type TaxBridgeSessionNewResponseTaxContext struct {
	Exemption TaxBridgeSessionNewResponseTaxContextExemption `json:"exemption"`
	Identity  TaxBridgeSessionNewResponseTaxContextIdentity  `json:"identity"`
	// Canonical tax location. After IP resolution a response may contain both the
	// original IP and its derived address.
	Location TaxBridgeSessionNewResponseTaxContextLocation `json:"location"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Exemption   respjson.Field
		Identity    respjson.Field
		Location    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseTaxContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseTaxContext) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseTaxContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseTaxContextExemption

type TaxBridgeSessionNewResponseTaxContextExemption struct {
	Claimed           bool   `json:"claimed" api:"required"`
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Claimed           respjson.Field
		NumeralCustomerID respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseTaxContextExemption) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseTaxContextExemption) UnmarshalJSON

type TaxBridgeSessionNewResponseTaxContextIdentity

type TaxBridgeSessionNewResponseTaxContextIdentity struct {
	// Any of "individual", "business".
	CustomerType string                                               `json:"customer_type"`
	TaxIDs       []TaxBridgeSessionNewResponseTaxContextIdentityTaxID `json:"tax_ids"`
	// Any of "not_checked", "format_valid", "valid", "invalid", "unavailable",
	// "pending".
	ValidationStatus string `json:"validation_status"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CustomerType     respjson.Field
		TaxIDs           respjson.Field
		ValidationStatus respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseTaxContextIdentity) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseTaxContextIdentity) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseTaxContextIdentity) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseTaxContextIdentityTaxID

type TaxBridgeSessionNewResponseTaxContextIdentityTaxID struct {
	Type  string `json:"type" api:"required"`
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseTaxContextIdentityTaxID) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseTaxContextIdentityTaxID) UnmarshalJSON

type TaxBridgeSessionNewResponseTaxContextLocation

type TaxBridgeSessionNewResponseTaxContextLocation struct {
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance" api:"required"`
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis" api:"required"`
	// Any of "merchant", "ip", "numeral_profile", "buyer", "provider_customer".
	Source      string                                               `json:"source" api:"required"`
	Address     TaxBridgeSessionNewResponseTaxContextLocationAddress `json:"address"`
	CollectedAt time.Time                                            `json:"collected_at" format:"date-time"`
	// The customer's public IPv4 or IPv6 address. Capture it on the merchant server;
	// do not send the merchant server's IP.
	IP TaxBridgeSessionNewResponseTaxContextLocationIP `json:"ip"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Assurance   respjson.Field
		Basis       respjson.Field
		Source      respjson.Field
		Address     respjson.Field
		CollectedAt respjson.Field
		IP          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Canonical tax location. After IP resolution a response may contain both the original IP and its derived address.

func (TaxBridgeSessionNewResponseTaxContextLocation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseTaxContextLocation) UnmarshalJSON

func (r *TaxBridgeSessionNewResponseTaxContextLocation) UnmarshalJSON(data []byte) error

type TaxBridgeSessionNewResponseTaxContextLocationAddress

type TaxBridgeSessionNewResponseTaxContextLocationAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionNewResponseTaxContextLocationAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseTaxContextLocationAddress) UnmarshalJSON

type TaxBridgeSessionNewResponseTaxContextLocationIP

type TaxBridgeSessionNewResponseTaxContextLocationIP struct {
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The customer's public IPv4 or IPv6 address. Capture it on the merchant server; do not send the merchant server's IP.

func (TaxBridgeSessionNewResponseTaxContextLocationIP) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionNewResponseTaxContextLocationIP) UnmarshalJSON

type TaxBridgeSessionNewResponseTaxStatus

type TaxBridgeSessionNewResponseTaxStatus string
const (
	TaxBridgeSessionNewResponseTaxStatusNotCalculated    TaxBridgeSessionNewResponseTaxStatus = "not_calculated"
	TaxBridgeSessionNewResponseTaxStatusRequiresInput    TaxBridgeSessionNewResponseTaxStatus = "requires_input"
	TaxBridgeSessionNewResponseTaxStatusPendingReview    TaxBridgeSessionNewResponseTaxStatus = "pending_review"
	TaxBridgeSessionNewResponseTaxStatusCalculated       TaxBridgeSessionNewResponseTaxStatus = "calculated"
	TaxBridgeSessionNewResponseTaxStatusProviderVerified TaxBridgeSessionNewResponseTaxStatus = "provider_verified"
	TaxBridgeSessionNewResponseTaxStatusCommitted        TaxBridgeSessionNewResponseTaxStatus = "committed"
	TaxBridgeSessionNewResponseTaxStatusReconciled       TaxBridgeSessionNewResponseTaxStatus = "reconciled"
	TaxBridgeSessionNewResponseTaxStatusMismatch         TaxBridgeSessionNewResponseTaxStatus = "mismatch"
	TaxBridgeSessionNewResponseTaxStatusVoided           TaxBridgeSessionNewResponseTaxStatus = "voided"
	TaxBridgeSessionNewResponseTaxStatusNotApplicable    TaxBridgeSessionNewResponseTaxStatus = "not_applicable"
)

type TaxBridgeSessionService

type TaxBridgeSessionService struct {
	Options []option.RequestOption
}

TaxBridgeSessionService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxBridgeSessionService method instead.

func NewTaxBridgeSessionService

func NewTaxBridgeSessionService(opts ...option.RequestOption) (r TaxBridgeSessionService)

NewTaxBridgeSessionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxBridgeSessionService) Cancel

Cancel a Stripe Checkout session

func (*TaxBridgeSessionService) Confirm

Confirms a manual-confirmation session and binds the accepted calculation and total before creating Stripe Checkout.

func (*TaxBridgeSessionService) Get

Retrieve a Stripe Checkout session

func (*TaxBridgeSessionService) List

List Stripe Checkout sessions

func (*TaxBridgeSessionService) New

Creates a Stripe Checkout payment or subscription session with Numeral-calculated tax. collection_mode is required for new integrations. When a complete address or resolvable customer IP is supplied, url normally points directly to Stripe. Otherwise hosted mode returns an opaque Numeral collection URL and embedded mode returns a one-time client_secret.

func (*TaxBridgeSessionService) Update

Updates tax context or the external reference before the checkout URL is exposed. version is an optimistic-concurrency token from the latest session response.

type TaxBridgeSessionUpdateParams

type TaxBridgeSessionUpdateParams struct {
	// Optimistic-concurrency token from the latest session response.
	Version int64 `json:"version" api:"required"`
	// Any of "2026-03-01".
	XAPIVersion       TaxBridgeSessionUpdateParamsXAPIVersion `header:"X-API-Version,omitzero" api:"required" json:"-"`
	ExternalReference param.Opt[string]                       `json:"external_reference,omitzero"`
	TaxContext        TaxBridgeSessionUpdateParamsTaxContext  `json:"tax_context,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionUpdateParams) MarshalJSON

func (r TaxBridgeSessionUpdateParams) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionUpdateParams) UnmarshalJSON

func (r *TaxBridgeSessionUpdateParams) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateParamsTaxContext

type TaxBridgeSessionUpdateParamsTaxContext struct {
	Identity TaxBridgeSessionUpdateParamsTaxContextIdentity `json:"identity,omitzero"`
	// Provide exactly one of address or ip. If IP resolution is insufficient, the
	// selected collection mode obtains the missing address fields.
	Location TaxBridgeSessionUpdateParamsTaxContextLocationUnion `json:"location,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionUpdateParamsTaxContext) MarshalJSON

func (r TaxBridgeSessionUpdateParamsTaxContext) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionUpdateParamsTaxContext) UnmarshalJSON

func (r *TaxBridgeSessionUpdateParamsTaxContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateParamsTaxContextIdentity

type TaxBridgeSessionUpdateParamsTaxContextIdentity struct {
	// Any of "individual", "business".
	CustomerType string                                                `json:"customer_type,omitzero"`
	TaxIDs       []TaxBridgeSessionUpdateParamsTaxContextIdentityTaxID `json:"tax_ids,omitzero"`
	// contains filtered or unexported fields
}

func (TaxBridgeSessionUpdateParamsTaxContextIdentity) MarshalJSON

func (r TaxBridgeSessionUpdateParamsTaxContextIdentity) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionUpdateParamsTaxContextIdentity) UnmarshalJSON

type TaxBridgeSessionUpdateParamsTaxContextIdentityTaxID

type TaxBridgeSessionUpdateParamsTaxContextIdentityTaxID struct {
	Type  string `json:"type" api:"required"`
	Value string `json:"value" api:"required"`
	// contains filtered or unexported fields
}

The properties Type, Value are required.

func (TaxBridgeSessionUpdateParamsTaxContextIdentityTaxID) MarshalJSON

func (r TaxBridgeSessionUpdateParamsTaxContextIdentityTaxID) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionUpdateParamsTaxContextIdentityTaxID) UnmarshalJSON

type TaxBridgeSessionUpdateParamsTaxContextLocationObject

type TaxBridgeSessionUpdateParamsTaxContextLocationObject struct {
	Address TaxBridgeSessionUpdateParamsTaxContextLocationObjectAddress `json:"address,omitzero" api:"required"`
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis,omitzero" api:"required"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance,omitzero"`
	// Any of "merchant".
	Source string `json:"source,omitzero"`
	// contains filtered or unexported fields
}

The properties Address, Basis are required.

func (TaxBridgeSessionUpdateParamsTaxContextLocationObject) MarshalJSON

func (r TaxBridgeSessionUpdateParamsTaxContextLocationObject) MarshalJSON() (data []byte, err error)

func (*TaxBridgeSessionUpdateParamsTaxContextLocationObject) UnmarshalJSON

type TaxBridgeSessionUpdateParamsTaxContextLocationObject2

type TaxBridgeSessionUpdateParamsTaxContextLocationObject2 struct {
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis,omitzero" api:"required"`
	// The customer's public IPv4 or IPv6 address. Capture it on the merchant server;
	// do not send the merchant server's IP.
	IP TaxBridgeSessionUpdateParamsTaxContextLocationObject2IP `json:"ip,omitzero" api:"required"`
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance,omitzero"`
	// Any of "merchant".
	Source string `json:"source,omitzero"`
	// contains filtered or unexported fields
}

The properties Basis, IP are required.

func (TaxBridgeSessionUpdateParamsTaxContextLocationObject2) MarshalJSON

func (*TaxBridgeSessionUpdateParamsTaxContextLocationObject2) UnmarshalJSON

type TaxBridgeSessionUpdateParamsTaxContextLocationObject2IP

type TaxBridgeSessionUpdateParamsTaxContextLocationObject2IP struct {
	Value string `json:"value" api:"required"`
	// contains filtered or unexported fields
}

The customer's public IPv4 or IPv6 address. Capture it on the merchant server; do not send the merchant server's IP.

The property Value is required.

func (TaxBridgeSessionUpdateParamsTaxContextLocationObject2IP) MarshalJSON

func (*TaxBridgeSessionUpdateParamsTaxContextLocationObject2IP) UnmarshalJSON

type TaxBridgeSessionUpdateParamsTaxContextLocationObjectAddress

type TaxBridgeSessionUpdateParamsTaxContextLocationObjectAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string            `json:"country" api:"required"`
	City       param.Opt[string] `json:"city,omitzero"`
	Line1      param.Opt[string] `json:"line_1,omitzero"`
	Line2      param.Opt[string] `json:"line_2,omitzero"`
	PostalCode param.Opt[string] `json:"postal_code,omitzero"`
	// State, province, or region.
	Province param.Opt[string] `json:"province,omitzero"`
	// contains filtered or unexported fields
}

The property Country is required.

func (TaxBridgeSessionUpdateParamsTaxContextLocationObjectAddress) MarshalJSON

func (*TaxBridgeSessionUpdateParamsTaxContextLocationObjectAddress) UnmarshalJSON

type TaxBridgeSessionUpdateParamsTaxContextLocationUnion

type TaxBridgeSessionUpdateParamsTaxContextLocationUnion struct {
	OfTaxBridgeSessionUpdatesTaxContextLocationObject  *TaxBridgeSessionUpdateParamsTaxContextLocationObject  `json:",omitzero,inline"`
	OfTaxBridgeSessionUpdatesTaxContextLocationObject2 *TaxBridgeSessionUpdateParamsTaxContextLocationObject2 `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (TaxBridgeSessionUpdateParamsTaxContextLocationUnion) GetAddress

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionUpdateParamsTaxContextLocationUnion) GetAssurance

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionUpdateParamsTaxContextLocationUnion) GetBasis

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionUpdateParamsTaxContextLocationUnion) GetIP

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionUpdateParamsTaxContextLocationUnion) GetSource

Returns a pointer to the underlying variant's property, if present.

func (TaxBridgeSessionUpdateParamsTaxContextLocationUnion) MarshalJSON

func (*TaxBridgeSessionUpdateParamsTaxContextLocationUnion) UnmarshalJSON

type TaxBridgeSessionUpdateParamsXAPIVersion

type TaxBridgeSessionUpdateParamsXAPIVersion string
const (
	TaxBridgeSessionUpdateParamsXAPIVersion2026_03_01 TaxBridgeSessionUpdateParamsXAPIVersion = "2026-03-01"
)

type TaxBridgeSessionUpdateResponse

type TaxBridgeSessionUpdateResponse struct {
	ID string `json:"id" api:"required"`
	// Any of "requested", "superseded", "configuration_disabled".
	CancellationReason TaxBridgeSessionUpdateResponseCancellationReason `json:"cancellation_reason" api:"required"`
	Checkout           TaxBridgeSessionUpdateResponseCheckout           `json:"checkout" api:"required"`
	// Any of "hosted", "embedded".
	CollectionMode TaxBridgeSessionUpdateResponseCollectionMode `json:"collection_mode" api:"required"`
	CompletedAt    time.Time                                    `json:"completed_at" api:"required" format:"date-time"`
	ConfigID       string                                       `json:"config_id" api:"required"`
	ConfigVersion  int64                                        `json:"config_version" api:"required"`
	// Any of "automatic", "manual".
	ConfirmationMethod TaxBridgeSessionUpdateResponseConfirmationMethod `json:"confirmation_method" api:"required"`
	CreatedAt          time.Time                                        `json:"created_at" api:"required" format:"date-time"`
	CustomerContext    TaxBridgeSessionUpdateResponseCustomerContext    `json:"customer_context" api:"required"`
	ExpiresAt          time.Time                                        `json:"expires_at" api:"required" format:"date-time"`
	ExternalReference  string                                           `json:"external_reference" api:"required"`
	LastError          TaxBridgeSessionUpdateResponseLastError          `json:"last_error" api:"required"`
	NextAction         TaxBridgeSessionUpdateResponseNextAction         `json:"next_action" api:"required"`
	// Any of "tax.bridge_session".
	Object TaxBridgeSessionUpdateResponseObject `json:"object" api:"required"`
	// Any of "not_started", "unpaid", "processing", "paid", "failed",
	// "no_payment_required".
	PaymentStatus TaxBridgeSessionUpdateResponsePaymentStatus `json:"payment_status" api:"required"`
	// Any of "requires_input", "requires_review", "ready_for_confirmation",
	// "processing", "provider_session_ready".
	Phase                TaxBridgeSessionUpdateResponsePhase           `json:"phase" api:"required"`
	Provider             TaxBridgeSessionUpdateResponseProvider        `json:"provider" api:"required"`
	ProviderSession      TaxBridgeSessionUpdateResponseProviderSession `json:"provider_session" api:"required"`
	Quote                TaxBridgeSessionUpdateResponseQuote           `json:"quote" api:"required"`
	ReplacementSessionID string                                        `json:"replacement_session_id" api:"required"`
	ReplacesSessionID    string                                        `json:"replaces_session_id" api:"required"`
	Requirements         []TaxBridgeSessionUpdateResponseRequirement   `json:"requirements" api:"required"`
	// Any of "open", "complete", "expired", "canceled", "failed".
	Status     TaxBridgeSessionUpdateResponseStatus     `json:"status" api:"required"`
	TaxContext TaxBridgeSessionUpdateResponseTaxContext `json:"tax_context" api:"required"`
	// Any of "not_calculated", "requires_input", "pending_review", "calculated",
	// "provider_verified", "committed", "reconciled", "mismatch", "voided",
	// "not_applicable".
	TaxStatus TaxBridgeSessionUpdateResponseTaxStatus `json:"tax_status" api:"required"`
	Testmode  bool                                    `json:"testmode" api:"required"`
	UpdatedAt time.Time                               `json:"updated_at" api:"required" format:"date-time"`
	// Opaque Stripe or Numeral URL. Redirect without inspecting the hostname.
	URL     string `json:"url" api:"required" format:"uri"`
	Version int64  `json:"version" api:"required"`
	// Returned exactly once on an embedded-mode create. Keep in memory and assign it
	// to the numeral-checkout element as a JavaScript property.
	ClientSecret string `json:"client_secret"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		CancellationReason   respjson.Field
		Checkout             respjson.Field
		CollectionMode       respjson.Field
		CompletedAt          respjson.Field
		ConfigID             respjson.Field
		ConfigVersion        respjson.Field
		ConfirmationMethod   respjson.Field
		CreatedAt            respjson.Field
		CustomerContext      respjson.Field
		ExpiresAt            respjson.Field
		ExternalReference    respjson.Field
		LastError            respjson.Field
		NextAction           respjson.Field
		Object               respjson.Field
		PaymentStatus        respjson.Field
		Phase                respjson.Field
		Provider             respjson.Field
		ProviderSession      respjson.Field
		Quote                respjson.Field
		ReplacementSessionID respjson.Field
		ReplacesSessionID    respjson.Field
		Requirements         respjson.Field
		Status               respjson.Field
		TaxContext           respjson.Field
		TaxStatus            respjson.Field
		Testmode             respjson.Field
		UpdatedAt            respjson.Field
		URL                  respjson.Field
		Version              respjson.Field
		ClientSecret         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponse) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponse) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseCancellationReason

type TaxBridgeSessionUpdateResponseCancellationReason string
const (
	TaxBridgeSessionUpdateResponseCancellationReasonRequested             TaxBridgeSessionUpdateResponseCancellationReason = "requested"
	TaxBridgeSessionUpdateResponseCancellationReasonSuperseded            TaxBridgeSessionUpdateResponseCancellationReason = "superseded"
	TaxBridgeSessionUpdateResponseCancellationReasonConfigurationDisabled TaxBridgeSessionUpdateResponseCancellationReason = "configuration_disabled"
)

type TaxBridgeSessionUpdateResponseCheckout

type TaxBridgeSessionUpdateResponseCheckout struct {
	CancelURL string                                           `json:"cancel_url" api:"required" format:"uri"`
	Currency  string                                           `json:"currency" api:"required"`
	LineItems []TaxBridgeSessionUpdateResponseCheckoutLineItem `json:"line_items" api:"required"`
	// Any of "payment", "subscription".
	Mode               string `json:"mode" api:"required"`
	SuccessURL         string `json:"success_url" api:"required" format:"uri"`
	ProviderCustomerID string `json:"provider_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CancelURL          respjson.Field
		Currency           respjson.Field
		LineItems          respjson.Field
		Mode               respjson.Field
		SuccessURL         respjson.Field
		ProviderCustomerID respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseCheckout) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseCheckout) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseCheckout) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseCheckoutLineItem

type TaxBridgeSessionUpdateResponseCheckoutLineItem struct {
	Currency        string `json:"currency" api:"required"`
	PriceID         string `json:"price_id" api:"required"`
	ProductCategory string `json:"product_category" api:"required"`
	ProductName     string `json:"product_name" api:"required"`
	Quantity        int64  `json:"quantity" api:"required"`
	// Per-unit amount in the currency's minor unit.
	UnitAmount        int64  `json:"unit_amount" api:"required"`
	ProviderProductID string `json:"provider_product_id"`
	// Stripe recurring interval for a recurring Price. Omitted for one-time Prices.
	RecurringInterval string `json:"recurring_interval"`
	// Number of recurring intervals between subscription billings. Omitted for
	// one-time Prices.
	RecurringIntervalCount int64 `json:"recurring_interval_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency               respjson.Field
		PriceID                respjson.Field
		ProductCategory        respjson.Field
		ProductName            respjson.Field
		Quantity               respjson.Field
		UnitAmount             respjson.Field
		ProviderProductID      respjson.Field
		RecurringInterval      respjson.Field
		RecurringIntervalCount respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseCheckoutLineItem) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseCheckoutLineItem) UnmarshalJSON

type TaxBridgeSessionUpdateResponseCollectionMode

type TaxBridgeSessionUpdateResponseCollectionMode string
const (
	TaxBridgeSessionUpdateResponseCollectionModeHosted   TaxBridgeSessionUpdateResponseCollectionMode = "hosted"
	TaxBridgeSessionUpdateResponseCollectionModeEmbedded TaxBridgeSessionUpdateResponseCollectionMode = "embedded"
)

type TaxBridgeSessionUpdateResponseConfirmationMethod

type TaxBridgeSessionUpdateResponseConfirmationMethod string
const (
	TaxBridgeSessionUpdateResponseConfirmationMethodAutomatic TaxBridgeSessionUpdateResponseConfirmationMethod = "automatic"
	TaxBridgeSessionUpdateResponseConfirmationMethodManual    TaxBridgeSessionUpdateResponseConfirmationMethod = "manual"
)

type TaxBridgeSessionUpdateResponseCustomerContext

type TaxBridgeSessionUpdateResponseCustomerContext struct {
	Email              string `json:"email" format:"email"`
	MerchantCustomerID string `json:"merchant_customer_id"`
	// Numeral customer ID (cust\_...).
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email              respjson.Field
		MerchantCustomerID respjson.Field
		NumeralCustomerID  respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseCustomerContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseCustomerContext) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseCustomerContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseLastError

type TaxBridgeSessionUpdateResponseLastError struct {
	Code         string    `json:"code" api:"required"`
	Message      string    `json:"message" api:"required"`
	OccurredAt   time.Time `json:"occurred_at" api:"required" format:"date-time"`
	Retryable    bool      `json:"retryable" api:"required"`
	Provider     string    `json:"provider"`
	ProviderCode string    `json:"provider_code"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Code         respjson.Field
		Message      respjson.Field
		OccurredAt   respjson.Field
		Retryable    respjson.Field
		Provider     respjson.Field
		ProviderCode respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseLastError) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseLastError) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseLastError) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseNextAction

type TaxBridgeSessionUpdateResponseNextAction struct {
	// Any of "collect_input", "review", "confirm", "redirect_to_provider", "wait",
	// "contact_merchant".
	Type string `json:"type" api:"required"`
	// Opaque URL. Do not branch on its hostname.
	URL string `json:"url" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseNextAction) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseNextAction) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseNextAction) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseObject

type TaxBridgeSessionUpdateResponseObject string
const (
	TaxBridgeSessionUpdateResponseObjectTaxBridgeSession TaxBridgeSessionUpdateResponseObject = "tax.bridge_session"
)

type TaxBridgeSessionUpdateResponsePaymentStatus

type TaxBridgeSessionUpdateResponsePaymentStatus string
const (
	TaxBridgeSessionUpdateResponsePaymentStatusNotStarted        TaxBridgeSessionUpdateResponsePaymentStatus = "not_started"
	TaxBridgeSessionUpdateResponsePaymentStatusUnpaid            TaxBridgeSessionUpdateResponsePaymentStatus = "unpaid"
	TaxBridgeSessionUpdateResponsePaymentStatusProcessing        TaxBridgeSessionUpdateResponsePaymentStatus = "processing"
	TaxBridgeSessionUpdateResponsePaymentStatusPaid              TaxBridgeSessionUpdateResponsePaymentStatus = "paid"
	TaxBridgeSessionUpdateResponsePaymentStatusFailed            TaxBridgeSessionUpdateResponsePaymentStatus = "failed"
	TaxBridgeSessionUpdateResponsePaymentStatusNoPaymentRequired TaxBridgeSessionUpdateResponsePaymentStatus = "no_payment_required"
)

type TaxBridgeSessionUpdateResponsePhase

type TaxBridgeSessionUpdateResponsePhase string
const (
	TaxBridgeSessionUpdateResponsePhaseRequiresInput        TaxBridgeSessionUpdateResponsePhase = "requires_input"
	TaxBridgeSessionUpdateResponsePhaseRequiresReview       TaxBridgeSessionUpdateResponsePhase = "requires_review"
	TaxBridgeSessionUpdateResponsePhaseReadyForConfirmation TaxBridgeSessionUpdateResponsePhase = "ready_for_confirmation"
	TaxBridgeSessionUpdateResponsePhaseProcessing           TaxBridgeSessionUpdateResponsePhase = "processing"
	TaxBridgeSessionUpdateResponsePhaseProviderSessionReady TaxBridgeSessionUpdateResponsePhase = "provider_session_ready"
)

type TaxBridgeSessionUpdateResponseProvider

type TaxBridgeSessionUpdateResponseProvider struct {
	ConnectionID string `json:"connection_id" api:"required"`
	// Any of "stripe".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ConnectionID respjson.Field
		Type         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseProvider) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseProvider) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseProvider) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseProviderSession

type TaxBridgeSessionUpdateResponseProviderSession struct {
	ID     string `json:"id" api:"required"`
	Status string `json:"status" api:"required"`
	// Any of "checkout".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseProviderSession) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseProviderSession) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseProviderSession) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseQuote

type TaxBridgeSessionUpdateResponseQuote struct {
	CalculationID  string                                    `json:"calculation_id" api:"required"`
	Currency       string                                    `json:"currency" api:"required"`
	ExpiresAt      time.Time                                 `json:"expires_at" api:"required" format:"date-time"`
	Lines          []TaxBridgeSessionUpdateResponseQuoteLine `json:"lines" api:"required"`
	Subtotal       int64                                     `json:"subtotal" api:"required"`
	Total          int64                                     `json:"total" api:"required"`
	TotalTaxAmount int64                                     `json:"total_tax_amount" api:"required"`
	// Any of "taxed", "not_taxed", "reverse_charge", "exempt", "zero_rated".
	Treatment string `json:"treatment" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CalculationID  respjson.Field
		Currency       respjson.Field
		ExpiresAt      respjson.Field
		Lines          respjson.Field
		Subtotal       respjson.Field
		Total          respjson.Field
		TotalTaxAmount respjson.Field
		Treatment      respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseQuote) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseQuote) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseQuote) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseQuoteLine

type TaxBridgeSessionUpdateResponseQuoteLine struct {
	AmountExcludingTax int64                                         `json:"amount_excluding_tax" api:"required"`
	PriceID            string                                        `json:"price_id" api:"required"`
	Quantity           int64                                         `json:"quantity" api:"required"`
	Rates              []TaxBridgeSessionUpdateResponseQuoteLineRate `json:"rates" api:"required"`
	TaxAmount          int64                                         `json:"tax_amount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		PriceID            respjson.Field
		Quantity           respjson.Field
		Rates              respjson.Field
		TaxAmount          respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseQuoteLine) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseQuoteLine) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseQuoteLine) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseQuoteLineRate

type TaxBridgeSessionUpdateResponseQuoteLineRate struct {
	DisplayName      string `json:"display_name" api:"required"`
	JurisdictionName string `json:"jurisdiction_name" api:"required"`
	// Decimal fraction, for example 0.08875.
	Rate     float64 `json:"rate" api:"required"`
	RateType string  `json:"rate_type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisplayName      respjson.Field
		JurisdictionName respjson.Field
		Rate             respjson.Field
		RateType         respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseQuoteLineRate) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseQuoteLineRate) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseQuoteLineRate) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseRequirement

type TaxBridgeSessionUpdateResponseRequirement struct {
	ID       string `json:"id" api:"required"`
	Blocking bool   `json:"blocking" api:"required"`
	// Any of "tax_location", "tax_identity", "exemption".
	Category string `json:"category" api:"required"`
	// Any of "tax_location.country", "tax_location.postal_code",
	// "tax_location.province", "tax_location.city", "tax_location.line_1",
	// "tax_identity.customer_type", "tax_identity.tax_id", "exemption.evidence".
	Code string `json:"code" api:"required"`
	// JSON Pointer rooted at /tax_context.
	FieldPath string `json:"field_path" api:"required"`
	// Any of "country", "postal_code", "province", "city", "address_line",
	// "customer_type", "tax_id", "text".
	InputKind    string                                                `json:"input_kind" api:"required"`
	Presentation TaxBridgeSessionUpdateResponseRequirementPresentation `json:"presentation" api:"required"`
	ReasonCode   string                                                `json:"reason_code" api:"required"`
	// Any of "required", "optional".
	Status string `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		Blocking     respjson.Field
		Category     respjson.Field
		Code         respjson.Field
		FieldPath    respjson.Field
		InputKind    respjson.Field
		Presentation respjson.Field
		ReasonCode   respjson.Field
		Status       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseRequirement) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseRequirement) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseRequirement) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseRequirementPresentation

type TaxBridgeSessionUpdateResponseRequirementPresentation struct {
	LabelKey string `json:"label_key" api:"required"`
	HelpKey  string `json:"help_key"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		LabelKey    respjson.Field
		HelpKey     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseRequirementPresentation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseRequirementPresentation) UnmarshalJSON

type TaxBridgeSessionUpdateResponseStatus

type TaxBridgeSessionUpdateResponseStatus string
const (
	TaxBridgeSessionUpdateResponseStatusOpen     TaxBridgeSessionUpdateResponseStatus = "open"
	TaxBridgeSessionUpdateResponseStatusComplete TaxBridgeSessionUpdateResponseStatus = "complete"
	TaxBridgeSessionUpdateResponseStatusExpired  TaxBridgeSessionUpdateResponseStatus = "expired"
	TaxBridgeSessionUpdateResponseStatusCanceled TaxBridgeSessionUpdateResponseStatus = "canceled"
	TaxBridgeSessionUpdateResponseStatusFailed   TaxBridgeSessionUpdateResponseStatus = "failed"
)

type TaxBridgeSessionUpdateResponseTaxContext

type TaxBridgeSessionUpdateResponseTaxContext struct {
	Exemption TaxBridgeSessionUpdateResponseTaxContextExemption `json:"exemption"`
	Identity  TaxBridgeSessionUpdateResponseTaxContextIdentity  `json:"identity"`
	// Canonical tax location. After IP resolution a response may contain both the
	// original IP and its derived address.
	Location TaxBridgeSessionUpdateResponseTaxContextLocation `json:"location"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Exemption   respjson.Field
		Identity    respjson.Field
		Location    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseTaxContext) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseTaxContext) UnmarshalJSON

func (r *TaxBridgeSessionUpdateResponseTaxContext) UnmarshalJSON(data []byte) error

type TaxBridgeSessionUpdateResponseTaxContextExemption

type TaxBridgeSessionUpdateResponseTaxContextExemption struct {
	Claimed           bool   `json:"claimed" api:"required"`
	NumeralCustomerID string `json:"numeral_customer_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Claimed           respjson.Field
		NumeralCustomerID respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseTaxContextExemption) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseTaxContextExemption) UnmarshalJSON

type TaxBridgeSessionUpdateResponseTaxContextIdentity

type TaxBridgeSessionUpdateResponseTaxContextIdentity struct {
	// Any of "individual", "business".
	CustomerType string                                                  `json:"customer_type"`
	TaxIDs       []TaxBridgeSessionUpdateResponseTaxContextIdentityTaxID `json:"tax_ids"`
	// Any of "not_checked", "format_valid", "valid", "invalid", "unavailable",
	// "pending".
	ValidationStatus string `json:"validation_status"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CustomerType     respjson.Field
		TaxIDs           respjson.Field
		ValidationStatus respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseTaxContextIdentity) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseTaxContextIdentity) UnmarshalJSON

type TaxBridgeSessionUpdateResponseTaxContextIdentityTaxID

type TaxBridgeSessionUpdateResponseTaxContextIdentityTaxID struct {
	Type  string `json:"type" api:"required"`
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseTaxContextIdentityTaxID) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseTaxContextIdentityTaxID) UnmarshalJSON

type TaxBridgeSessionUpdateResponseTaxContextLocation

type TaxBridgeSessionUpdateResponseTaxContextLocation struct {
	// Any of "unverified", "self_attested", "validated", "merchant_verified".
	Assurance string `json:"assurance" api:"required"`
	// Any of "service_address", "billing_address", "shipping_address",
	// "merchant_asserted".
	Basis string `json:"basis" api:"required"`
	// Any of "merchant", "ip", "numeral_profile", "buyer", "provider_customer".
	Source      string                                                  `json:"source" api:"required"`
	Address     TaxBridgeSessionUpdateResponseTaxContextLocationAddress `json:"address"`
	CollectedAt time.Time                                               `json:"collected_at" format:"date-time"`
	// The customer's public IPv4 or IPv6 address. Capture it on the merchant server;
	// do not send the merchant server's IP.
	IP TaxBridgeSessionUpdateResponseTaxContextLocationIP `json:"ip"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Assurance   respjson.Field
		Basis       respjson.Field
		Source      respjson.Field
		Address     respjson.Field
		CollectedAt respjson.Field
		IP          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Canonical tax location. After IP resolution a response may contain both the original IP and its derived address.

func (TaxBridgeSessionUpdateResponseTaxContextLocation) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseTaxContextLocation) UnmarshalJSON

type TaxBridgeSessionUpdateResponseTaxContextLocationAddress

type TaxBridgeSessionUpdateResponseTaxContextLocationAddress struct {
	// ISO 3166-1 alpha-2 country code.
	Country    string `json:"country" api:"required"`
	City       string `json:"city"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
	PostalCode string `json:"postal_code"`
	// State, province, or region.
	Province string `json:"province"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		City        respjson.Field
		Line1       respjson.Field
		Line2       respjson.Field
		PostalCode  respjson.Field
		Province    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxBridgeSessionUpdateResponseTaxContextLocationAddress) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseTaxContextLocationAddress) UnmarshalJSON

type TaxBridgeSessionUpdateResponseTaxContextLocationIP

type TaxBridgeSessionUpdateResponseTaxContextLocationIP struct {
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The customer's public IPv4 or IPv6 address. Capture it on the merchant server; do not send the merchant server's IP.

func (TaxBridgeSessionUpdateResponseTaxContextLocationIP) RawJSON

Returns the unmodified JSON received from the API

func (*TaxBridgeSessionUpdateResponseTaxContextLocationIP) UnmarshalJSON

type TaxBridgeSessionUpdateResponseTaxStatus

type TaxBridgeSessionUpdateResponseTaxStatus string
const (
	TaxBridgeSessionUpdateResponseTaxStatusNotCalculated    TaxBridgeSessionUpdateResponseTaxStatus = "not_calculated"
	TaxBridgeSessionUpdateResponseTaxStatusRequiresInput    TaxBridgeSessionUpdateResponseTaxStatus = "requires_input"
	TaxBridgeSessionUpdateResponseTaxStatusPendingReview    TaxBridgeSessionUpdateResponseTaxStatus = "pending_review"
	TaxBridgeSessionUpdateResponseTaxStatusCalculated       TaxBridgeSessionUpdateResponseTaxStatus = "calculated"
	TaxBridgeSessionUpdateResponseTaxStatusProviderVerified TaxBridgeSessionUpdateResponseTaxStatus = "provider_verified"
	TaxBridgeSessionUpdateResponseTaxStatusCommitted        TaxBridgeSessionUpdateResponseTaxStatus = "committed"
	TaxBridgeSessionUpdateResponseTaxStatusReconciled       TaxBridgeSessionUpdateResponseTaxStatus = "reconciled"
	TaxBridgeSessionUpdateResponseTaxStatusMismatch         TaxBridgeSessionUpdateResponseTaxStatus = "mismatch"
	TaxBridgeSessionUpdateResponseTaxStatusVoided           TaxBridgeSessionUpdateResponseTaxStatus = "voided"
	TaxBridgeSessionUpdateResponseTaxStatusNotApplicable    TaxBridgeSessionUpdateResponseTaxStatus = "not_applicable"
)

type TaxCalculationNewParams

type TaxCalculationNewParams struct {
	// Customer details. Address is required. Optionally accepts a customer ID for
	// order tracking and exemptions.
	Customer     TaxCalculationNewParamsCustomer     `json:"customer,omitzero" api:"required"`
	OrderDetails TaxCalculationNewParamsOrderDetails `json:"order_details,omitzero" api:"required"`
	// You can store arbitrary keys and values in the metadata. Any valid JSON object
	// whose values are less than 255 characters long is accepted.
	Metadata MetadataParam `json:"metadata,omitzero"`
	// The address that a product is shipped from. Optional for API version 2024-09-01,
	// required for 2025-05-12.
	OriginAddress TaxCalculationNewParamsOriginAddress `json:"origin_address,omitzero"`
	// Any of "2025-05-12", "2024-09-01".
	XAPIVersion TaxCalculationNewParamsXAPIVersion `header:"X-API-Version,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (TaxCalculationNewParams) MarshalJSON

func (r TaxCalculationNewParams) MarshalJSON() (data []byte, err error)

func (*TaxCalculationNewParams) UnmarshalJSON

func (r *TaxCalculationNewParams) UnmarshalJSON(data []byte) error

type TaxCalculationNewParamsCustomer

type TaxCalculationNewParamsCustomer struct {
	Address TaxCalculationNewParamsCustomerAddress `json:"address,omitzero" api:"required"`
	// The ID of the customer that you created in our system. Can be used to log
	// customer information or indicate that a purchaser is tax exempt.
	ID param.Opt[string] `json:"id,omitzero"`
	// Array of tax identification numbers. Available with API version 2025-05-12. Only
	// available for BUSINESS customer types.
	TaxIDs []TaxCalculationNewParamsCustomerTaxID `json:"tax_ids,omitzero"`
	// The type of customer. Available with API version 2025-05-12. CONSUMER are
	// private individuals. BUSINESS are companies or legal entities registered for
	// VAT/GST.
	//
	// Any of "CONSUMER", "BUSINESS".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Customer details. Address is required. Optionally accepts a customer ID for order tracking and exemptions.

The property Address is required.

func (TaxCalculationNewParamsCustomer) MarshalJSON

func (r TaxCalculationNewParamsCustomer) MarshalJSON() (data []byte, err error)

func (*TaxCalculationNewParamsCustomer) UnmarshalJSON

func (r *TaxCalculationNewParamsCustomer) UnmarshalJSON(data []byte) error

type TaxCalculationNewParamsCustomerAddress

type TaxCalculationNewParamsCustomerAddress struct {
	AddressCity string `json:"address_city" api:"required"`
	// The country code. Must be a valid ISO 3166-1 alpha-2 country code.
	AddressCountry    string `json:"address_country" api:"required"`
	AddressLine1      string `json:"address_line_1" api:"required"`
	AddressPostalCode string `json:"address_postal_code" api:"required"`
	// The state, province, or region. Must be a valid 2 digit ISO 3166-2 subdivision
	// code.
	AddressProvince string `json:"address_province" api:"required"`
	// The type of address. Must be one of: shipping or billing.
	AddressType  string            `json:"address_type" api:"required"`
	AddressLine2 param.Opt[string] `json:"address_line_2,omitzero"`
	// contains filtered or unexported fields
}

The properties AddressCity, AddressCountry, AddressLine1, AddressPostalCode, AddressProvince, AddressType are required.

func (TaxCalculationNewParamsCustomerAddress) MarshalJSON

func (r TaxCalculationNewParamsCustomerAddress) MarshalJSON() (data []byte, err error)

func (*TaxCalculationNewParamsCustomerAddress) UnmarshalJSON

func (r *TaxCalculationNewParamsCustomerAddress) UnmarshalJSON(data []byte) error

type TaxCalculationNewParamsCustomerTaxID

type TaxCalculationNewParamsCustomerTaxID struct {
	// The type of tax ID.
	//
	// Any of "VAT", "GST", "EIN".
	Type string `json:"type,omitzero" api:"required"`
	// The tax ID value
	Value string `json:"value" api:"required"`
	// contains filtered or unexported fields
}

The properties Type, Value are required.

func (TaxCalculationNewParamsCustomerTaxID) MarshalJSON

func (r TaxCalculationNewParamsCustomerTaxID) MarshalJSON() (data []byte, err error)

func (*TaxCalculationNewParamsCustomerTaxID) UnmarshalJSON

func (r *TaxCalculationNewParamsCustomerTaxID) UnmarshalJSON(data []byte) error

type TaxCalculationNewParamsOrderDetails

type TaxCalculationNewParamsOrderDetails struct {
	// The currency code of the transaction. For API version 2024-09-01: Must be either
	// USD or CAD. For API version 2025-05-12: Supports 32 currencies.
	CustomerCurrencyCode string `json:"customer_currency_code" api:"required"`
	// Each line item should represent one type of product.
	LineItems []TaxCalculationNewParamsOrderDetailsLineItem `json:"line_items,omitzero" api:"required"`
	// For the line items in this transaction, does the amount include tax?
	TaxIncludedInAmount bool `json:"tax_included_in_amount" api:"required"`
	// Controls automatic tax behavior. Available with API version 2025-05-12.
	//
	// Any of "auto", "disabled".
	AutomaticTax string `json:"automatic_tax,omitzero"`
	// contains filtered or unexported fields
}

The properties CustomerCurrencyCode, LineItems, TaxIncludedInAmount are required.

func (TaxCalculationNewParamsOrderDetails) MarshalJSON

func (r TaxCalculationNewParamsOrderDetails) MarshalJSON() (data []byte, err error)

func (*TaxCalculationNewParamsOrderDetails) UnmarshalJSON

func (r *TaxCalculationNewParamsOrderDetails) UnmarshalJSON(data []byte) error

type TaxCalculationNewParamsOrderDetailsLineItem

type TaxCalculationNewParamsOrderDetailsLineItem struct {
	// The price of this line item in the currency's smallest unit.
	Amount float64 `json:"amount" api:"required"`
	// The quantity of this product being sold.
	Quantity float64 `json:"quantity" api:"required"`
	// A tax category from our category taxonomy. Required if no reference_product_id.
	ProductCategory param.Opt[string] `json:"product_category,omitzero"`
	// The ID of the line item from your system.
	ReferenceLineItemID param.Opt[string] `json:"reference_line_item_id,omitzero"`
	// The product ID used to uniquely reference this product. Required if no
	// product_category.
	ReferenceProductID param.Opt[string] `json:"reference_product_id,omitzero"`
	// contains filtered or unexported fields
}

The properties Amount, Quantity are required.

func (TaxCalculationNewParamsOrderDetailsLineItem) MarshalJSON

func (r TaxCalculationNewParamsOrderDetailsLineItem) MarshalJSON() (data []byte, err error)

func (*TaxCalculationNewParamsOrderDetailsLineItem) UnmarshalJSON

func (r *TaxCalculationNewParamsOrderDetailsLineItem) UnmarshalJSON(data []byte) error

type TaxCalculationNewParamsOriginAddress

type TaxCalculationNewParamsOriginAddress struct {
	AddressCity string `json:"address_city" api:"required"`
	// The country code. Must be a valid ISO 3166-1 alpha-2 country code.
	AddressCountry    string `json:"address_country" api:"required"`
	AddressLine1      string `json:"address_line_1" api:"required"`
	AddressPostalCode string `json:"address_postal_code" api:"required"`
	// The state, province, or region. Must be a valid 2 digit ISO 3166-2 subdivision
	// code.
	AddressProvince string            `json:"address_province" api:"required"`
	AddressLine2    param.Opt[string] `json:"address_line_2,omitzero"`
	// contains filtered or unexported fields
}

The address that a product is shipped from. Optional for API version 2024-09-01, required for 2025-05-12.

The properties AddressCity, AddressCountry, AddressLine1, AddressPostalCode, AddressProvince are required.

func (TaxCalculationNewParamsOriginAddress) MarshalJSON

func (r TaxCalculationNewParamsOriginAddress) MarshalJSON() (data []byte, err error)

func (*TaxCalculationNewParamsOriginAddress) UnmarshalJSON

func (r *TaxCalculationNewParamsOriginAddress) UnmarshalJSON(data []byte) error

type TaxCalculationNewParamsXAPIVersion

type TaxCalculationNewParamsXAPIVersion string
const (
	TaxCalculationNewParamsXAPIVersion2025_05_12 TaxCalculationNewParamsXAPIVersion = "2025-05-12"
	TaxCalculationNewParamsXAPIVersion2024_09_01 TaxCalculationNewParamsXAPIVersion = "2024-09-01"
)

type TaxCalculationService

type TaxCalculationService struct {
	Options []option.RequestOption
}

TaxCalculationService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxCalculationService method instead.

func NewTaxCalculationService

func NewTaxCalculationService(opts ...option.RequestOption) (r TaxCalculationService)

NewTaxCalculationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxCalculationService) New

Get tax information for a given product and address

type TaxCustomerDeleteResponse

type TaxCustomerDeleteResponse struct {
	// Epoch datetime representing the date and time the object was deleted
	DeletedAt float64 `json:"deleted_at"`
	// The type of object deleted
	Object string `json:"object"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DeletedAt   respjson.Field
		Object      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxCustomerDeleteResponse) RawJSON

func (r TaxCustomerDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaxCustomerDeleteResponse) UnmarshalJSON

func (r *TaxCustomerDeleteResponse) UnmarshalJSON(data []byte) error

type TaxCustomerNewParams

type TaxCustomerNewParams struct {
	// The customer's email
	Email string `json:"email" api:"required"`
	// If true, all `POST /tax/calculations` sold to this customer will return $0 in
	// tax owed. The default value is `false`.
	IsTaxExempt param.Opt[bool] `json:"is_tax_exempt,omitzero"`
	// The customer's name
	Name param.Opt[string] `json:"name,omitzero"`
	// The ID of the customer in your system
	ReferenceCustomerID param.Opt[string] `json:"reference_customer_id,omitzero"`
	// contains filtered or unexported fields
}

func (TaxCustomerNewParams) MarshalJSON

func (r TaxCustomerNewParams) MarshalJSON() (data []byte, err error)

func (*TaxCustomerNewParams) UnmarshalJSON

func (r *TaxCustomerNewParams) UnmarshalJSON(data []byte) error

type TaxCustomerService

type TaxCustomerService struct {
	Options []option.RequestOption
}

TaxCustomerService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxCustomerService method instead.

func NewTaxCustomerService

func NewTaxCustomerService(opts ...option.RequestOption) (r TaxCustomerService)

NewTaxCustomerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxCustomerService) Delete

func (r *TaxCustomerService) Delete(ctx context.Context, customerID string, opts ...option.RequestOption) (res *TaxCustomerDeleteResponse, err error)

Delete a specific customer using its ID

func (*TaxCustomerService) Get

func (r *TaxCustomerService) Get(ctx context.Context, customerID string, opts ...option.RequestOption) (res *CustomerResponse, err error)

Retrieve the details of a specific customer

func (*TaxCustomerService) New

Create a new customer, and optionally mark them as tax exempt

type TaxPingParams

type TaxPingParams struct {
	// Any of "2025-05-12", "2024-09-01".
	XAPIVersion TaxPingParamsXAPIVersion `header:"X-API-Version,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type TaxPingParamsXAPIVersion

type TaxPingParamsXAPIVersion string
const (
	TaxPingParamsXAPIVersion2025_05_12 TaxPingParamsXAPIVersion = "2025-05-12"
	TaxPingParamsXAPIVersion2024_09_01 TaxPingParamsXAPIVersion = "2024-09-01"
)

type TaxPingResponse

type TaxPingResponse struct {
	// API version from X-API-Version header, or falls back to 2024-09-01
	//
	// Any of "2024-09-01", "2025-05-12".
	APIVersion TaxPingResponseAPIVersion `json:"api_version" api:"required"`
	// Environment indicator based on API key type: 'test' for testmode keys, 'prod'
	// for production keys
	//
	// Any of "test", "prod".
	Env TaxPingResponseEnv `json:"env" api:"required"`
	// Always returns 'ok' for successful health checks
	//
	// Any of "ok".
	Status TaxPingResponseStatus `json:"status" api:"required"`
	// Current ISO 8601 timestamp when the request was processed
	Timestamp time.Time `json:"timestamp" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		APIVersion  respjson.Field
		Env         respjson.Field
		Status      respjson.Field
		Timestamp   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Health check response containing status, environment, timestamp, and API version information

func (TaxPingResponse) RawJSON

func (r TaxPingResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaxPingResponse) UnmarshalJSON

func (r *TaxPingResponse) UnmarshalJSON(data []byte) error

type TaxPingResponseAPIVersion

type TaxPingResponseAPIVersion string

API version from X-API-Version header, or falls back to 2024-09-01

const (
	TaxPingResponseAPIVersion2024_09_01 TaxPingResponseAPIVersion = "2024-09-01"
	TaxPingResponseAPIVersion2025_05_12 TaxPingResponseAPIVersion = "2025-05-12"
)

type TaxPingResponseEnv

type TaxPingResponseEnv string

Environment indicator based on API key type: 'test' for testmode keys, 'prod' for production keys

const (
	TaxPingResponseEnvTest TaxPingResponseEnv = "test"
	TaxPingResponseEnvProd TaxPingResponseEnv = "prod"
)

type TaxPingResponseStatus

type TaxPingResponseStatus string

Always returns 'ok' for successful health checks

const (
	TaxPingResponseStatusOk TaxPingResponseStatus = "ok"
)

type TaxProductListParams

type TaxProductListParams struct {
	// The product ID to start pagination from. This is the last product ID retrieved
	// from the previous list request. An example path looks like
	// `/tax/products?cursor=p-20506`
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (TaxProductListParams) URLQuery

func (r TaxProductListParams) URLQuery() (v url.Values, err error)

URLQuery serializes TaxProductListParams's query parameters as `url.Values`.

type TaxProductListResponse

type TaxProductListResponse struct {
	// This will be either `true` or `false` depending on if there are more products to
	// be returned in the next request.
	HasMore bool `json:"has_more"`
	// The ID of the last product returned in the response. This can be used as a
	// cursor for pagination.
	LastProductID string            `json:"last_product_id"`
	Products      []ProductResponse `json:"products"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HasMore       respjson.Field
		LastProductID respjson.Field
		Products      respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxProductListResponse) RawJSON

func (r TaxProductListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaxProductListResponse) UnmarshalJSON

func (r *TaxProductListResponse) UnmarshalJSON(data []byte) error

type TaxProductNewParams

type TaxProductNewParams struct {
	// The category of the product
	ProductCategory string `json:"product_category" api:"required"`
	// The ID of the product
	ReferenceProductID string `json:"reference_product_id" api:"required"`
	// The name of the product
	ReferenceProductName string `json:"reference_product_name" api:"required"`
	// contains filtered or unexported fields
}

func (TaxProductNewParams) MarshalJSON

func (r TaxProductNewParams) MarshalJSON() (data []byte, err error)

func (*TaxProductNewParams) UnmarshalJSON

func (r *TaxProductNewParams) UnmarshalJSON(data []byte) error

type TaxProductService

type TaxProductService struct {
	Options []option.RequestOption
}

TaxProductService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxProductService method instead.

func NewTaxProductService

func NewTaxProductService(opts ...option.RequestOption) (r TaxProductService)

NewTaxProductService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxProductService) Delete

func (r *TaxProductService) Delete(ctx context.Context, referenceProductID string, opts ...option.RequestOption) (res *DeleteProductResponse, err error)

Delete a specific product using its ID

func (*TaxProductService) Get

func (r *TaxProductService) Get(ctx context.Context, referenceProductID string, opts ...option.RequestOption) (res *ProductResponse, err error)

Retrieve the details of a specific product

func (*TaxProductService) List

Retrieve a list of up to 50 products. If you have more than 50, you can paginate this endpoint.

func (*TaxProductService) New

Create and categorize a new product

type TaxRefundNewParams

type TaxRefundNewParams struct {
	// The ID of the `transaction` to refund. This is the `transaction_id` returned
	// from the `/transactions` creation response.
	TransactionID string `json:"transaction_id" api:"required"`
	// This will be either `'full'` or `'partial'`. If `type='partial'`, you must also
	// provide the line item(s) you wish to apply refunds against.
	Type string `json:"type" api:"required"`
	// Unix timestamp in **seconds** representing the date and time the refund was
	// made. If not provided, the current date and time will be used.
	RefundProcessedAt param.Opt[float64] `json:"refund_processed_at,omitzero"`
	// If the refund is `type=full`, line items aren't necessary. If the refund is
	// `type=partial`, you must provide the line item(s) you wish to apply refunds
	// against using a `reference_product_id`.
	LineItems []TaxRefundNewParamsLineItem `json:"line_items,omitzero"`
	// contains filtered or unexported fields
}

func (TaxRefundNewParams) MarshalJSON

func (r TaxRefundNewParams) MarshalJSON() (data []byte, err error)

func (*TaxRefundNewParams) UnmarshalJSON

func (r *TaxRefundNewParams) UnmarshalJSON(data []byte) error

type TaxRefundNewParamsLineItem

type TaxRefundNewParamsLineItem struct {
	// The quantity of this product being refunded.
	Quantity param.Opt[float64] `json:"quantity,omitzero"`
	// This **optional** attribute is the ID of the line item from your system. It will
	// be used only for reporting.
	ReferenceLineItemID param.Opt[string] `json:"reference_line_item_id,omitzero"`
	// The ID of the product to apply refunds against. We will attempt to find the line
	// item from the original transaction based on this `reference_product_id`.
	ReferenceProductID param.Opt[string] `json:"reference_product_id,omitzero"`
	// The sale amount that was refunded to the customer on this line item, not
	// inclusive of tax refunded.
	SalesAmountRefunded param.Opt[float64] `json:"sales_amount_refunded,omitzero"`
	// The amount of tax that was refunded to the customer.
	TaxAmountRefunded param.Opt[float64] `json:"tax_amount_refunded,omitzero"`
	// contains filtered or unexported fields
}

func (TaxRefundNewParamsLineItem) MarshalJSON

func (r TaxRefundNewParamsLineItem) MarshalJSON() (data []byte, err error)

func (*TaxRefundNewParamsLineItem) UnmarshalJSON

func (r *TaxRefundNewParamsLineItem) UnmarshalJSON(data []byte) error

type TaxRefundReversalNewParams

type TaxRefundReversalNewParams struct {
	// The ID of the refund to reverse
	RefundID param.Opt[string] `json:"refund_id,omitzero"`
	// contains filtered or unexported fields
}

func (TaxRefundReversalNewParams) MarshalJSON

func (r TaxRefundReversalNewParams) MarshalJSON() (data []byte, err error)

func (*TaxRefundReversalNewParams) UnmarshalJSON

func (r *TaxRefundReversalNewParams) UnmarshalJSON(data []byte) error

type TaxRefundReversalService

type TaxRefundReversalService struct {
	Options []option.RequestOption
}

TaxRefundReversalService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxRefundReversalService method instead.

func NewTaxRefundReversalService

func NewTaxRefundReversalService(opts ...option.RequestOption) (r TaxRefundReversalService)

NewTaxRefundReversalService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxRefundReversalService) New

Reverse a refund you've previously created

type TaxRefundService

type TaxRefundService struct {
	Options []option.RequestOption
}

TaxRefundService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxRefundService method instead.

func NewTaxRefundService

func NewTaxRefundService(opts ...option.RequestOption) (r TaxRefundService)

NewTaxRefundService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxRefundService) New

Add a refund to a transaction

type TaxService

type TaxService struct {
	Options         []option.RequestOption
	Calculations    TaxCalculationService
	Bridge          TaxBridgeService
	Transactions    TaxTransactionService
	Refunds         TaxRefundService
	RefundReversals TaxRefundReversalService
	Products        TaxProductService
	Customers       TaxCustomerService
}

TaxService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxService method instead.

func NewTaxService

func NewTaxService(opts ...option.RequestOption) (r TaxService)

NewTaxService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxService) Ping

func (r *TaxService) Ping(ctx context.Context, query TaxPingParams, opts ...option.RequestOption) (res *TaxPingResponse, err error)

Authenticated health check endpoint that returns status, environment, timestamp, and API version

type TaxTransactionNewParams

type TaxTransactionNewParams struct {
	// The ID of the `calculation` that you want to record as a sale
	CalculationID string `json:"calculation_id" api:"required"`
	// The ID of this order in your system. Must be unique among all your
	// `transactions`
	ReferenceOrderID string `json:"reference_order_id" api:"required"`
	// Unix timestamp in **seconds** representing the date and time your sale was made.
	// If not provided, the current date and time will be used.
	TransactionProcessedAt param.Opt[float64] `json:"transaction_processed_at,omitzero"`
	// You can store arbitrary keys and values in the metadata. Any valid JSON object
	// whose values are less than 255 characters long is accepted.
	Metadata MetadataParam `json:"metadata,omitzero"`
	// contains filtered or unexported fields
}

func (TaxTransactionNewParams) MarshalJSON

func (r TaxTransactionNewParams) MarshalJSON() (data []byte, err error)

func (*TaxTransactionNewParams) UnmarshalJSON

func (r *TaxTransactionNewParams) UnmarshalJSON(data []byte) error

type TaxTransactionRefundListResponse

type TaxTransactionRefundListResponse struct {
	Refunds []TaxTransactionRefundListResponseRefund `json:"refunds"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Refunds     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxTransactionRefundListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*TaxTransactionRefundListResponse) UnmarshalJSON

func (r *TaxTransactionRefundListResponse) UnmarshalJSON(data []byte) error

type TaxTransactionRefundListResponseRefund

type TaxTransactionRefundListResponseRefund struct {
	// The ID of the `refund`
	ID        string                                           `json:"id"`
	LineItems []TaxTransactionRefundListResponseRefundLineItem `json:"line_items"`
	// The type of object: `tax.refund`.
	Object string `json:"object"`
	// Unix timestamp in **seconds** representing the date and time the refund was
	// made. If not provided, the time the refund was created will be used.
	RefundProcessedAt float64 `json:"refund_processed_at"`
	// `True` if using a production API key. `False` if using a test API key.
	Testmode bool `json:"testmode"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		LineItems         respjson.Field
		Object            respjson.Field
		RefundProcessedAt respjson.Field
		Testmode          respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxTransactionRefundListResponseRefund) RawJSON

Returns the unmodified JSON received from the API

func (*TaxTransactionRefundListResponseRefund) UnmarshalJSON

func (r *TaxTransactionRefundListResponseRefund) UnmarshalJSON(data []byte) error

type TaxTransactionRefundListResponseRefundLineItem

type TaxTransactionRefundListResponseRefundLineItem struct {
	// The amount excluding tax, which should be a negative number for refunds.
	AmountExcludingTax float64 `json:"amount_excluding_tax"`
	// The amount including tax, which should be a negative number for refunds.
	AmountIncludingTax float64                                               `json:"amount_including_tax"`
	Product            TaxTransactionRefundListResponseRefundLineItemProduct `json:"product"`
	// The quantity of this product being refunded.
	Quantity float64 `json:"quantity"`
	// The tax amount, which should be a negative number for refunds.
	TaxAmount        float64                                                         `json:"tax_amount"`
	TaxJurisdictions []TaxTransactionRefundListResponseRefundLineItemTaxJurisdiction `json:"tax_jurisdictions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		AmountIncludingTax respjson.Field
		Product            respjson.Field
		Quantity           respjson.Field
		TaxAmount          respjson.Field
		TaxJurisdictions   respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxTransactionRefundListResponseRefundLineItem) RawJSON

Returns the unmodified JSON received from the API

func (*TaxTransactionRefundListResponseRefundLineItem) UnmarshalJSON

type TaxTransactionRefundListResponseRefundLineItemProduct

type TaxTransactionRefundListResponseRefundLineItemProduct struct {
	ProductTaxCode       string `json:"product_tax_code"`
	ReferenceLineItemID  string `json:"reference_line_item_id"`
	ReferenceProductID   string `json:"reference_product_id"`
	ReferenceProductName string `json:"reference_product_name"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ProductTaxCode       respjson.Field
		ReferenceLineItemID  respjson.Field
		ReferenceProductID   respjson.Field
		ReferenceProductName respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxTransactionRefundListResponseRefundLineItemProduct) RawJSON

Returns the unmodified JSON received from the API

func (*TaxTransactionRefundListResponseRefundLineItemProduct) UnmarshalJSON

type TaxTransactionRefundListResponseRefundLineItemTaxJurisdiction

type TaxTransactionRefundListResponseRefundLineItemTaxJurisdiction struct {
	// The flat fee that is added to this transaction. Like all numeric values, this
	// will be returned in cents and should be added directly to the tax amount
	// independent of other percentages. For example, a $100 transaction taxed at 5%
	// and with a `fee_amount: 50` will lead to `($100 * 5% + 0.50) = $5.50` in tax
	// being charged
	FeeAmount        float64 `json:"fee_amount"`
	JurisdictionName string  `json:"jurisdiction_name"`
	// Additional information about the tax jurisdiction. Available with API version
	// 2025-05-12. For B2B transactions, reverse charge is determined by comparing
	// origin_address.address_country vs customer.address.address_country (same country
	// = domestic VAT, different countries = reverse charge).
	Note     string `json:"note"`
	RateType string `json:"rate_type"`
	// The tax rate percentage applied to this transaction.
	TaxRate float64 `json:"tax_rate"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FeeAmount        respjson.Field
		JurisdictionName respjson.Field
		Note             respjson.Field
		RateType         respjson.Field
		TaxRate          respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaxTransactionRefundListResponseRefundLineItemTaxJurisdiction) RawJSON

Returns the unmodified JSON received from the API

func (*TaxTransactionRefundListResponseRefundLineItemTaxJurisdiction) UnmarshalJSON

type TaxTransactionRefundService

type TaxTransactionRefundService struct {
	Options []option.RequestOption
}

TaxTransactionRefundService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxTransactionRefundService method instead.

func NewTaxTransactionRefundService

func NewTaxTransactionRefundService(opts ...option.RequestOption) (r TaxTransactionRefundService)

NewTaxTransactionRefundService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxTransactionRefundService) List

Retrieve the refunds for a specific transaction

type TaxTransactionService

type TaxTransactionService struct {
	Options []option.RequestOption
	Refunds TaxTransactionRefundService
}

TaxTransactionService contains methods and other services that help with interacting with the numeral-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaxTransactionService method instead.

func NewTaxTransactionService

func NewTaxTransactionService(opts ...option.RequestOption) (r TaxTransactionService)

NewTaxTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TaxTransactionService) Delete

func (r *TaxTransactionService) Delete(ctx context.Context, transactionID string, opts ...option.RequestOption) (res *DeleteTransactionResponse, err error)

Delete a specific transaction using its ID

func (*TaxTransactionService) Get

func (r *TaxTransactionService) Get(ctx context.Context, transactionID string, opts ...option.RequestOption) (res *TransactionResponse, err error)

Retrieve the details of a specific transaction

func (*TaxTransactionService) New

Record a completed sale

type TransactionResponse

type TransactionResponse struct {
	// The ID of the `transaction`. We highly recommend you store this value. If you
	// need to refund or query the data from this transaction, you will use this ID as
	// a reference.
	ID string `json:"id"`
	// The ID of the `calculation` that was used to create this transaction
	CalculationID string `json:"calculation_id"`
	// The ISO-4217 currency code of the transaction
	CustomerCurrencyCode string `json:"customer_currency_code"`
	// The currency code of the filing that will be used to remit taxes collected on
	// this transaction
	FilingCurrencyCode string                        `json:"filing_currency_code"`
	LineItems          []TransactionResponseLineItem `json:"line_items"`
	// You can store arbitrary keys and values in the metadata. Any valid JSON object
	// whose values are less than 255 characters long is accepted.
	Metadata Metadata `json:"metadata"`
	// The type of object: `tax.transaction`.
	Object string `json:"object"`
	// The unique order ID you provided when creating the `transaction`
	ReferenceOrderID string `json:"reference_order_id"`
	// `True` if using a production API key. If `true`, Numeral will record this
	// `transaction` towards your nexus totals. If you're registered and collecting in
	// the relevant jurisdiction, we'll file the tax.
	Testmode bool `json:"testmode"`
	// Unix timestamp in **seconds** representing the date and time your sale was made.
	// If not provided, the date and time this `transaction` was created
	TransactionProcessedAt float64 `json:"transaction_processed_at"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                     respjson.Field
		CalculationID          respjson.Field
		CustomerCurrencyCode   respjson.Field
		FilingCurrencyCode     respjson.Field
		LineItems              respjson.Field
		Metadata               respjson.Field
		Object                 respjson.Field
		ReferenceOrderID       respjson.Field
		Testmode               respjson.Field
		TransactionProcessedAt respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TransactionResponse) RawJSON

func (r TransactionResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TransactionResponse) UnmarshalJSON

func (r *TransactionResponse) UnmarshalJSON(data []byte) error

type TransactionResponseLineItem

type TransactionResponseLineItem struct {
	AmountExcludingTax float64                                      `json:"amount_excluding_tax"`
	AmountIncludingTax float64                                      `json:"amount_including_tax"`
	Product            TransactionResponseLineItemProduct           `json:"product"`
	Quantity           float64                                      `json:"quantity"`
	TaxAmount          float64                                      `json:"tax_amount"`
	TaxJurisdictions   []TransactionResponseLineItemTaxJurisdiction `json:"tax_jurisdictions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		AmountIncludingTax respjson.Field
		Product            respjson.Field
		Quantity           respjson.Field
		TaxAmount          respjson.Field
		TaxJurisdictions   respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TransactionResponseLineItem) RawJSON

func (r TransactionResponseLineItem) RawJSON() string

Returns the unmodified JSON received from the API

func (*TransactionResponseLineItem) UnmarshalJSON

func (r *TransactionResponseLineItem) UnmarshalJSON(data []byte) error

type TransactionResponseLineItemProduct

type TransactionResponseLineItemProduct struct {
	ProductTaxCode       string `json:"product_tax_code"`
	ReferenceLineItemID  string `json:"reference_line_item_id"`
	ReferenceProductID   string `json:"reference_product_id"`
	ReferenceProductName string `json:"reference_product_name"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ProductTaxCode       respjson.Field
		ReferenceLineItemID  respjson.Field
		ReferenceProductID   respjson.Field
		ReferenceProductName respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TransactionResponseLineItemProduct) RawJSON

Returns the unmodified JSON received from the API

func (*TransactionResponseLineItemProduct) UnmarshalJSON

func (r *TransactionResponseLineItemProduct) UnmarshalJSON(data []byte) error

type TransactionResponseLineItemTaxJurisdiction

type TransactionResponseLineItemTaxJurisdiction struct {
	// The flat fee that is added to this transaction. Like all numeric values, this
	// will be returned in cents and should be added directly to the tax amount
	// independent of other percentages. For example, a $100 transaction taxed at 5%
	// and with a `fee_amount: 50` will lead to `($100 * 5% + 0.50) = $5.50` in tax
	// being charged
	FeeAmount        float64 `json:"fee_amount"`
	JurisdictionName string  `json:"jurisdiction_name"`
	// Additional information about the tax jurisdiction. Available with API version
	// 2025-05-12. For B2B transactions, reverse charge is determined by comparing
	// origin_address.address_country vs customer.address.address_country (same country
	// = domestic VAT, different countries = reverse charge).
	Note     string `json:"note"`
	RateType string `json:"rate_type"`
	// The tax rate percentage applied to this transaction.
	TaxRate float64 `json:"tax_rate"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FeeAmount        respjson.Field
		JurisdictionName respjson.Field
		Note             respjson.Field
		RateType         respjson.Field
		TaxRate          respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TransactionResponseLineItemTaxJurisdiction) RawJSON

Returns the unmodified JSON received from the API

func (*TransactionResponseLineItemTaxJurisdiction) UnmarshalJSON

func (r *TransactionResponseLineItemTaxJurisdiction) UnmarshalJSON(data []byte) error

Directories

Path Synopsis
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
Package json implements encoding and decoding of JSON as defined in RFC 7159.
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
packages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL