Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.orderprotection.com/llms.txt

Use this file to discover all available pages before exploring further.

This page is for partners who render OrderProtection inside Shopify checkout through the checkout-widget UI extension and want each checkout to resolve a specific A/B cohort. It builds on the Partner Integration Quickstart — register your OAuth app and create your variants there first, then use this page to wire the extension to them.
The checkout extension calls the path-based partner endpoints (/v2/.../partner/:applicationId), not the header-based public read documented in the Quickstart. The three block settings below are what bind a checkout to your cohort.

Prerequisites

  • An approved OAuth app — see Creating an app. Note your Application.id (looks like cmpn5in6p000484flmfk9ns4d).
  • At least one partner context / variant created for the merchant’s store — see Quickstart, Step 3.
  • A price set and a widget config attached to that variant, keyed by your variantKey.

Configure the block settings

When the checkout-widget extension is added to a store’s checkout, configure three fields under checkout-widget → Block settings. A partner (e.g. PDQ) sets these at install time.
Shopify checkout editor showing the checkout-widget Block settings: Application ID, Price Set Variant Key, and Widget Config Variant Key, with the OrderProtection — Cohort A widget rendering in the checkout preview at $9.80.
SettingExampleWhat it does
Application IDcmpn5in6p000484flmfk9ns4dYour OAuth Application.id. Used as the path segment on the partner-scoped endpoints. Required together with at least one of the variant keys below.
Price Set Variant Keytest-aRoutes pricing to GET /v2/quote/insurance/partner/:applicationId?key=:variantKey for partner-scoped pricing.
Widget Config Variant Keytest-aRoutes the widget config fetch to GET /v2/widget/config/partner/:applicationId?key=:variantKey instead of the default per-store endpoint.
All three fields are empty by default, in which case the extension uses the store’s default per-store widget and pricing. Set the Application ID plus at least one variant key to activate partner-scoped behavior. The two variant keys are independent — you can A/B-test pricing and widget appearance separately.

What the extension fetches

Once configured, on each checkout render the extension calls the partner-scoped endpoints below. Both are public (no OAuth token) and resolve the cohort from the path applicationId + key query param.

Pricing — GET /v2/quote/insurance/partner/:applicationId

ParamInRequiredDescription
applicationIdpathYesYour OAuth Application.id.
keyqueryYesThe Price Set Variant Key (variantKey). Must match the partner key format.
store_urlqueryYesThe merchant’s store domain, e.g. example.myshopify.com.
countryqueryNoISO 2-letter country code. Defaults to US.
curl -G https://api.production.orderprotection.com/v2/quote/insurance/partner/cmpn5in6p000484flmfk9ns4d \
  --data-urlencode "key=test-a" \
  --data-urlencode "store_url=example.myshopify.com" \
  --data-urlencode "country=US"
The response is the same shaped quote payload as the public widget read, computed from the cohort’s SHIPPING price set. Responses are cached for ~1 hour per (store_url, country, applicationId, key). Errors
  • 400 Bad Requestkey is missing, or applicationId/key don’t match the partner key format.
  • 404 Not Found — the store isn’t found, the app isn’t installed, or the cohort has no SHIPPING pricing rules.

Widget config — GET /v2/widget/config/partner/:applicationId

ParamInRequiredDescription
applicationIdpathYesYour OAuth Application.id.
keyqueryYesThe Widget Config Variant Key (variantKey). Must match the partner key format.
store_urlqueryYesThe merchant’s store domain.
typequeryNoWidget type: CART, CHECKOUT, INFO_MODAL, or SUBSCRIPTION. Defaults to CHECKOUT.
curl -G https://api.production.orderprotection.com/v2/widget/config/partner/cmpn5in6p000484flmfk9ns4d \
  --data-urlencode "key=test-a" \
  --data-urlencode "store_url=example.myshopify.com" \
  --data-urlencode "type=CHECKOUT"
{
  "id": "pwc_8a1f2c…",
  "type": "CHECKOUT",
  "status": "ACTIVE",
  "variant": "test-a",
  "name": "Cohort A — flat-rate",
  "config": { "...": "schemaless widget configuration — the renderer validates on read" },
  "customizationValues": { "...": "read-only mirror of config, for legacy consumers" },
  "updatedAt": "2026-05-26T18:46:25.987Z"
}
config and customizationValues always hold the same value; customizationValues is the legacy column name. Responses are cached for ~1 hour per (store_url, applicationId, key, type). Errors
  • 400 Bad Requestkey is missing, or applicationId/key don’t match the partner key format.
  • 404 Not Found — the store isn’t found, the app has no active context on that store, or no widget config exists for that (variantKey, type).
These endpoints throw 400/404 rather than silently falling back. Treat any non-200 as “no partner cohort for this checkout” and render the store’s default widget — a partner cohort must never break checkout.

Default vs. cohort render

The explainer below walks the whole flow — authenticate, create variants, configure the extension, and render per shopper:
With no partner keys set, the extension renders the store’s default widget:
Default Order Protection checkout widget: shield icon, 'Order Protection — Protection for Damage, Loss, Theft & More!', priced at $10.00, toggled on.
With Application ID + variant key test-a, the same checkout resolves the cohort’s price set and widget config — for example OrderProtection — Cohort A at $9.80 with flat-rate protection, as shown in the checkout preview above.

Next steps

Partner Integration Quickstart

Register your app, create variants, and route shoppers — the setup this page depends on.

Partner endpoints reference

Full schema for every /v2 partner endpoint, including the contexts, pricing, and widget-config writes.

Creating an app

Register an OAuth app and capture your Application.id, client ID, and secret.

Scopes

Scopes your app needs to create contexts, price sets, and widget configs.