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.
How it works
Skio sends Order Protection a webhook every time one of your subscriptions places an order. For each event:- If the originating order had Order Protection on it, we keep it on the subscription and attach Order Protection as a one-time line on the next subscription charge. The cycle continues for every charge as long as the subscription stays active.
- If the subscription has been opted in to Order Protection by the customer or merchant, we attach Order Protection on the next charge in the same way — even if Order Protection wasn’t on the original checkout.
- Otherwise, nothing changes. Skio bills the subscription exactly as it did before; Order Protection is not added.
Installation
Generate a Skio API Token
addSubscriptionLine mutation to attach
OP to upcoming charges. A read-only token will be accepted by Skio
but Order Protection will not be added to charges, and you’ll see
silent failures in the integration logs.Copy the generated token; you’ll paste it into Order Protection
in the next step.Configure the API Token in Order Protection
- Paste your Skio API Token into the API Token field.
- Toggle Validate Token on Save on. The dashboard will call Skio’s API to confirm the token is accepted before saving.
- Click Save.
SKIO_TOKEN_INVALID error — double-check the token’s scope and try
again.Copy the Webhook URL from Order Protection
Register the Webhook URL with Skio
401 Unauthorized.Save the Webhook Token in Order Protection
Create the Subscription Widget in Order Protection
- Select Subscription as the widget type. The description reads: “The widget will be used for your customer subscription portal.”
- The widget is created with the Toggle variant (the only variant supported for subscription widgets today) and an auto-generated name like Subscription Widget.
Add the Order Protection widget to your Skio customer portal
<order-protection>is the Order Protection web component. The bootstrap script tags it with the rightinstance-idat runtime — don’t hardcode one yourself.- The bootstrap script is identical for every merchant. At
runtime it reads
window.Shopify.shop, resolves your brand’s widget bundle (cdn.orderprotection.com/subscriptions-widget/<your-brand-slug>/widget.js), and renders the toggle inside<order-protection>. No URL editing required.
- Subscriptions whose originating order had Order Protection keep getting it on every upcoming charge automatically — no customer action required.
- Existing subscribers can opt in (or out) any time from their Skio customer portal via the widget you just installed. Their next charge picks up the new state.
What gets added (and what doesn’t)
- Customers who originally checked out with Order Protection: Order Protection is added as a one-time line on each upcoming Skio charge. The price is calculated from the subscription cart subtotal using your existing Order Protection price tiers.
- Existing subscribers who have opted in to Order Protection: same treatment — Order Protection is added to upcoming charges for as long as the subscription is opted in.
- Subscribers who didn’t originally buy Order Protection and haven’t opted in: nothing changes — Skio charges them the same as it did before.
- Cancelled subscriptions: Order Protection stops being added to charges as soon as Skio sends the cancellation webhook.
Webhook events Order Protection listens for
| Skio event | What we do |
|---|---|
orderPlaced | Look up the order in Order Protection, persist a subscription record on first delivery if the originating order had OP, and queue Order Protection for the next charge if the subscription is OP-active |
Subscription cancelled | Mark the subscription inactive — no further Order Protection charges |
Subscription interval/date update | Update our record of the next billing date |
Subscription created | Logged for observability — we wait for orderPlaced before doing anything |
Troubleshooting
Webhook deliveries are returning 401 Unauthorized
Webhook deliveries are returning 401 Unauthorized
Order Protection isn't being added to upcoming charges
Order Protection isn't being added to upcoming charges
addSubscriptionLine call fires.Also confirm the subscription is OP-active: subscriptions that
didn’t originate with Order Protection only get it once they’ve
been opted in.A subscription has Order Protection twice
A subscription has Order Protection twice
Order Protection) first and falls back to the product title.
Confirm the OP product in your Shopify store still has the
Order Protection vendor set.The widget renders but with default styling (no merchant customization)
The widget renders but with default styling (no merchant customization)
The widget toggle isn't rendering in the Skio portal
The widget toggle isn't rendering in the Skio portal
cdn.orderprotection.com/subscriptions-widget/<your-brand-slug>/widget.js
where the slug is derived from your Shopify domain (e.g.
acme-store.myshopify.com → acme-store). If that URL returns a
404, the bundle hasn’t been built yet and the widget can’t render.
Verify with:200 OK confirms the bundle is live. On 404, your Onboarding
& Implementation manager can trigger a Cart Deployment from the
Order Protection admin dashboard to build it.


