GuidesReference Endpoints
Guides

Configuration Options

You can customize the behavior of the widget by passing various options into the tg("configure") command.

Option

Type

Default Value

Max Length

Description

apiKey (required)

string

Your public sandbox or production API key.

items (required)

array

An array of items including the cost for each item the customer would like to receive a quote. Each item's cost should include any fees or taxes associated with that item.

items.cost

string

12

The cost of the item, eg. cost: "50.00". For item costs, the decimal separator may be a .(period) or a ,(comma). item costs may contain up to 1 decimal separator. Thousands separators should be omitted from the cost as this may cause the cost to be evaluated incorrectly. Valid costs: "12", "1234.99", "123,99". Invalid costs: "1,234.99", "1,234"(This will be evaluated as 1.234 instead of 1234). Also, please see notes on Handling Taxes & Fees

items.referenceNumber

string

255

An item-level internal reference number within your system.

items.event

object

A metadata object of the event (e.g. reservation, booking, concert) associated with the item.

items.event.name

string

255

Name or short description of the event.

items.event.startDate

date

Start date of event in YYYY-MM-DD format. (UTC)

items.event.startTime

time

Start time of event in hh:mm format. (UTC)

currency

string

USD

3

The 3-letter ISO currency code of the transaction.

USD, CAD, EUR, GBP, MXN, AED, ARS, AUD, BRL, CHF, CNY, CZK, DKK, IDR, ILS, INR, JPY, MYR, NOK, NZD, PHP, SEK, THB, TRY, ZAR

clearSelection

boolean

false

Clear the customer's persisted selection on tg("configure") or tg("update").

locale

string

en_US

255

The country/language code combination that allows internationalized verbiage to display in the widget, if available.

en_US, en_CA, en_GB, en_AU, es_ES, es_MX, de_DE, fr_FR, fr_CA, it_IT, nl_NL, pt_BR, pt_PT, sv_SE

referenceNumber(required)

string

255

A top-level internal reference number within your system. e.g., a cart or order ID if available.

persist

boolean

false

Persist the customer's opt-in or opt-out selection to the browser's sessionStorage.

sandbox

boolean

false

Use Teak's sandbox environment for testing purposes. Requires a sandbox API key.

Todo

  • Add the required configuration options:

    • apiKey

    • items

    • referenceNumber