This guide is for partners who render OrderProtection’s protection product on their own surface — for example, a third-party post-purchase platform that wants to show protection offers inside its own checkout or thank-you flow. By the end you’ll be able to: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.
- Authenticate against the OrderProtection API.
- Create one or more A/B-test “variants” with custom settings and pricing.
- Render the right variant to each shopper.
- Consume order and claim events as they happen.
If you’re a merchant integrating OrderProtection directly into your own storefront, see the API integration guide instead. This page is specifically for third-party partners building products on top of OrderProtection.
How it fits together
Step 1 — Register your OAuth app
Create an app in the OrderProtection dashboard and capture theclient_id and client_secret. See Creating an app for the full walkthrough.
When you declare scopes, request at minimum:
read_store— read merchant settingswrite_settings— create and update your partner contextsread_quotes— callPOST /v2/quoteread_orders— read order data placed on the merchant’s store
read_widget_cart, read_widget_checkout, or any pricing scopes if you also need those resources. See the Scopes reference for the full list.
Step 2 — Get an access token
Follow the OAuth flow to exchange an authorization code for an access token. From here, every API call uses:Step 3 — Create one or more variants
A partner context is your A/B-test cohort. It stores sparse overrides on top of the merchant’s default settings — fields you don’t override are inherited. Create one variant per arm of your test:variantKey is a stable identifier you’ll use at render time to route a shopper into the variant. See Partner contexts for the full CRUD reference.
Step 4 — Route each shopper to a variant
On the shopper-facing path, call the public widget read with two headers:| Header | Value |
|---|---|
x-op-partner-app-id | Your OAuth Application.id |
x-op-partner-variant | The variantKey of the context you want to apply |
Step 5 — Render protection in your UI
Use the resolved settings to drive your UI. For an arbitrary cart, you can also call the statelessPOST /v2/quote to get a single customer/brand split for any subtotal:
Step 6 — Consume order and claim events
When a shopper buys protection on the merchant’s storefront, the order flows into OrderProtection through the merchant’s existing platform integration (Shopify, BigCommerce, etc.). You do not push orders to OrderProtection — we already have them. To stay in sync, you can either:- Read on demand via the v1 Orders and Claims APIs (requires
read_orders/read_claims). - Subscribe to webhooks —
protection.added,protection.removed,claim.created,claim.approved,claim.denied,message.created. See Webhooks and the event reference.
Order data is owned by the merchant. Your access depends on the merchant having installed your app and granted the relevant scopes — there is no way to read orders for a store that hasn’t installed you.
Where to go next
Partner endpoints reference
Full schema reference for every
/v2 partner endpoint, including request/response shapes and scope requirements.Authentication
OAuth flows, refresh tokens, and PKCE.
Scopes
Full list of scopes, including admin-gated pricing scopes.
Webhooks
Subscribe to claim, order, and protection events.

