How Teak works

The pieces of a Teak integration and how they fit together.

A Teak integration has three parts: the widget in your checkout, your server, and Teak.

CUSTOMER'S BROWSERYOUR SERVERTeakOS Widgetyour checkout pageTeakquotes, issues, notifiesCheckout backendWebhook endpoint1-2Quote + choice3Session ID4Submit order5Contract Issued webhook
PartWhat it does
TeakOS WidgetShows the protection offer, prices it for the cart, and saves the customer's choice to Teak. Runs in the customer's browser with your public key.
Your serverSubmits the order to Teak when checkout completes, using your secret key, and receives webhooks.
TeakIssues protection for the items the customer opted in to, emails the customer, and sends webhooks as protection changes.

The life of an order

Step through an order from quote to issued protection:

CUSTOMER'S BROWSERYOUR SERVERTeakOS Widgetyour checkout pageTeakquotes, issues, notifiesCheckout backendWebhook endpoint1Quote3Session ID4Submit order5Contract Issued webhook

The widget loads with the items in the cart. Teak prices protection and creates a session that holds the quote. The widget shows the offer.

teak('configure', {
  apiKey: 'pk_...',
  items: [{ name: 'GA Ticket', referenceNumber: 'ITEM-1', productTypes: ['general-admission'], cost: 120, event: { location: 'Austin, TX' } }],
});

Add the widget

After the purchase, if the protection changes, for example the customer voids it or files a refund request, Teak sends you webhooks.

Billing

The customer pays you for protection as part of their order. Teak bills you for issued contracts on your regular invoice. Teak doesn't take payment from your customers, so you don't send card or payment details to Teak.

Next steps

Get your sandbox keys, then build your integration step by step:


Did this page help you?