GuidesReference Endpoints
Guides

Configuration Options

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

OptionTypeDefault ValueMax LengthDescription
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.coststring
12The 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.referenceNumberstring
255An item-level internal reference number within your system.
items.eventobject
A metadata object of the event (e.g. reservation, booking, concert) associated with the item.
items.event.namestring
255Name or short description of the event.
items.event.startDatedate
Start date of event in YYYY-MM-DD format. (UTC)
items.event.startTimetime
Start time of event in hh:mm format. (UTC)
currencystringUSD3

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

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

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
255A top-level internal reference number within your system. e.g., a cart or order ID if available.
persistbooleanfalse
Persist the customer's opt-in or opt-out selection to the browser's sessionStorage.
sandboxbooleanfalse
Use Teak's sandbox environment for testing purposes. Requires a sandbox API key.

Todo

  • Add the required configuration options:

    • apiKey

    • items

    • referenceNumber