Shopify
What is and isn't possible with Shopify today, and the recommended pattern.
There is no OTP.ps Shopify app yet. Shopify controls its checkout, so a third party can't add a required code step before "Place order" on most plans. What works today:
Easiest: verification links, no app needed
In Shopify Flow, trigger Order created. Add a condition: the payment gateway is cash on delivery.
Add the action Send HTTP request:
POST https://otp.ps/api/v1/verify/linkswith the headerAuthorization: Bearer <a key with only the send scope>and the body:{ "phone": "{{order.shippingAddress.phone}}", "purpose": "order", "reference": "{{order.name}}", "delivery": "sms" }Pick the fields with Flow's variable picker (the phone may be on the shipping address or the customer). Also tag the order
awaiting-phone-confirmationin Flow.OTP.ps texts the customer a link; they press Confirm.
In Zapier, Make or n8n, the OTP.ps trigger Link approved starts a step that replaces the tag with
phone-confirmed(Shopify's "Update order" or "Add tag" action, matchingreferenceto the order name).
Your team ships only orders tagged phone-confirmed.
With your own backend: confirm after the order is placed
- A small backend of yours subscribes to Shopify's
orders/createwebhook. - For cash-on-delivery orders, it tags the order
awaiting-phone-confirmationand sends a code withpurpose: "order"andIdempotency-Key: shopify-<order id>-otp-1to the order's phone. - The customer types the code on a page of yours, linked from the order confirmation email or shown on the thank-you page (where your Shopify app or theme allows it).
- On
valid: true, your backend replaces the tag withphone-confirmed. Your team ships only confirmed orders, and calls or cancels the rest after a few hours.
This uses Shopify's Admin API (order tags) and webhooks from your own backend. The OTP.ps key stays on that backend, never in the theme.
Not possible / not recommended
- Calling OTP.ps from theme JavaScript: the key would be public.
- Blocking checkout before payment: only possible with checkout extensions on plans that allow them; not covered by this guide.
A ready-made Shopify app is on the roadmap.