GuidesReference Endpoints
Guides

4. Implement the Widget

As a developer of an affiliate platform, I need the ability to render the protection widget within the checkout process, so my customers can purchase Refund Protection.

The In-Checkout Widget has Teak APIs baked in to help reduce integration efforts and provide easy maintainability. It uses your Public API Key associated with the Client to fetch integration settings dynamically, including the Product Type, Perils, Pricing, etc., which then dynamically renders the widget UI with a quote to advertise to your customers.

ℹ️

Acceptance Criteria:

  1. Implement the JavaScript snippet within the HTML <head> to initialize the widget.
  2. Utilize the placeholder <div> to place the widget within the checkout flow.
  3. Initialize the widget using the configure command.

Expected Outcome:

  1. The widget is displayed in the Customer’s checkout flow.
  2. The correct quote is returned based on the items in the cart.