Go-live checklist
Check your integration is ready for production.
Work through this list in sandbox, then again after switching to production.
Before Teak issues production keys, your Teak integration contact runs a UAT session with you that covers the UAT test cases below. Run them yourself first, so the session goes smoothly.
Widget
- The loader script is on every page that shows the widget.
-
configurepasses every item in the cart, withname,referenceNumber,cost,event.location, and product types. - Each item's
costincludes its share of taxes and fees, and uses a.decimal separator. See Items. - Items that cost $0.00 are left out of
items. - Add-ons the customer buys with their tickets, such as parking or merchandise, are passed as items.
-
configureis called again whenever the cart changes, including when a promo code is applied or removed. - Opting in adds the protection price to the order total, and opting out removes it.
- If your widget requires a choice, checkout is blocked until
teak.isFormComplete()istrue. - If the widget fails (
onErrorCb), the customer can still complete checkout, and that order isn't submitted to Teak. -
teak('clearSession')runs after checkout completes.
Server
- The secret key is only on your server, in a secret manager or environment variable.
- You request a new access token for each submit, or at least every 5 minutes.
- Orders are submitted only after your own order is confirmed.
- Every order is submitted with the widget's session ID and a unique
reference_id, including orders where the customer opted out. The only orders you don't submit are ones where the widget failed. -
paymentis{ "type": "invoice" }. - You handle
202,204, and errors, branching onerror.code, and retry503. - A Teak error never fails the customer's order.
Webhooks
- Subscriptions for Contract Issued and Contract Void, with a secret.
- Subscriptions for the refund request events your support team needs. We recommend Created, Approved, Denied, and Pending Consumer.
- If you're a partner with several clients, subscriptions are set up at the partner level, so you get events for every client.
- Your endpoint verifies signatures and rejects invalid ones.
- Your endpoint responds within 10 seconds and ignores repeated events.
- Contract Void refunds the customer the protection price.
- Contract Downgraded is handled too, if customers can exchange items.
UAT test cases
Run each test in sandbox. Find sandbox orders and contracts in the Teak Dashboard under Orders and Policies.
Widget display
| Test | Expected result |
|---|---|
| Open checkout with one item in the cart. | The widget appears where you placed <teak-widget>, usually above the payment method. |
| Check the protection price against your pricing. | The price in the widget matches your pricing configuration for the items in the cart. |
| Add a second item. | The widget re-prices for both items. |
| Add a $0.00 item. | The $0.00 item isn't quoted, and the price doesn't change. |
| Try to continue without choosing, if your widget requires a choice. | Checkout stops, and a clear message asks the customer to choose. |
Block teak.js in your browser's dev tools, then check out. | The widget doesn't appear, and the customer completes checkout without protection. |
Cart changes
| Test | Expected result |
|---|---|
| Apply a promo code, then remove it. | The widget re-prices each time. The price charged matches the widget. |
| Add an add-on, such as parking or merchandise. | The add-on is included in the price, and gets its own contract. |
| Click Keep shopping, add more items, and return to checkout. | The widget shows a new price for the whole cart. |
| Make a second purchase in the same browser. | The widget loads a fresh offer. |
Single-item order, opted in
| Test | Expected result |
|---|---|
| Opt in. | A protection line appears in the cart, for the price shown in the widget. |
| Complete checkout. | Submit returns 202 with the session ID. |
| Check the amounts. | The protection price you charged matches the widget, and the premium in the Contract Issued webhook. The item's coverage includes its taxes and fees. |
| Check the Teak Dashboard. | The order appears under your client, with one contract. |
| Check the customer's inbox. | The customer receives Teak's confirmation email, with links to the FAQ, help center, refund request, cancellation, and certificate and terms. |
| Check your own confirmation email, if it mentions protection. | The wording is correct and every link works. Get the links from Retrieve order details. |
Multi-item order, opted in
| Test | Expected result |
|---|---|
| Opt in with several items and complete checkout. | Submit returns 202. A Contract Issued webhook arrives for each item, with reference_number matching the item's referenceNumber. |
| Check the Teak Dashboard. | The order appears with one contract for each item. |
| Check the customer's inbox. | The confirmation email lists every protected item. |
Opted out
| Test | Expected result |
|---|---|
| Opt out and complete checkout. | Your server still submits the order. Submit returns 204. No contract is created and no webhooks arrive. |
Voids and cancels
| Test | Expected result |
|---|---|
| Void one contract within its look period, with Void a contract, the customer's cancellation link, or the Teak Dashboard. | A Contract Void webhook arrives, and your system refunds the customer the protection price. |
| Void several contracts on the same order. | A Contract Void webhook arrives for each, and your system refunds each one. |
| Void a contract after its look period, if you can set one up. | The void is rejected with error.code 422. |
| Cancel a contract. | A Contract Canceled webhook arrives. The customer isn't refunded. |
Refund requests
| Test | Expected result |
|---|---|
| Submit a refund request from the customer's refund request link. | A Refund Request Created webhook arrives. |
| Ask your Teak integration contact to approve, deny, and close sandbox refund requests. | A Refund Request Approved, Denied, or Closed webhook arrives for each. |
Switch to production
- Get your production keys from your Teak integration contact.
- Replace the sandbox public key in the widget, and remove
sandbox: true. - Replace the sandbox keys on your server, and use
https://api.helloteak.com/v1. - Create your webhook subscriptions in the production Teak Dashboard.
- Place a real order with protection and confirm you receive Contract Issued.
- Subscribe your team to status.helloteak.com by email, Slack, Microsoft Teams, or RSS, so you hear about incidents affecting the Teak API or the TeakOS Widget.
Next steps
You're live. Keep these close for when something changes or goes wrong:
- Handle contract events when protection is voided, canceled, or changed after launch.
- Look up any code in widget error codes, with its cause and fix.
- Check your server handles every kind of API error: see Error handling.
Updated 19 days ago
Did this page help you?
