Developer documentation
Everything you need to add SMS verification to your website, app or store: one request sends a code, another checks it.
Quickstart
Send and check your first code with a free test key.
Sandbox
Test numbers that simulate every outcome, free and without sending.
API reference
Every endpoint, field, answer and error.
Cash-on-delivery orders
Cut fake orders by confirming the number before shipping.
For developers and AI tools
- OpenAPI 3.1 —
https://otp.ps/openapi.json - llms.txt / llms-full.txt
- Every page is available as Markdown: add .md to its address
Getting started
- Quickstart — Send your first verification code and check it in five minutes, without sending a real message.
- Authentication — API keys, test and live mode, and where keys must (and must never) be kept.
- Verification lifecycle — What happens to a code from sending to approval, expiry or failure, and how resending works.
- Sandbox — Build and test the whole integration for free with test keys and sandbox numbers that simulate every outcome.
- Verification links — Confirm a number without building any screen: OTP.ps hosts the page, texts the link or a code, and tells you when the customer confirms.
Reference
- API reference — Every endpoint, field and answer of the OTP.ps REST API.
- Phone numbers — Which numbers OTP.ps sends to, the formats it accepts, and how to normalize them yourself.
- Errors — Every error code the API can answer, what it means and what your integration should do.
- Webhooks — Get told the moment a customer confirms a verification link, with signed messages, retries and a log.
Use cases
- Cash-on-delivery order confirmation — Confirm the customer's number with a code before accepting a cash-on-delivery order, to cut fake orders and returns.
- Customer registration — Verify a new customer's mobile number while they create an account.
- Passwordless login — Let customers sign in with their mobile number and a code instead of a password.
- Phone number verification — Confirm that a number belongs to the customer, for example on their profile or before saving a delivery number.
- Delivery confirmation — Have the customer give the courier a code at the door, to prove the order was handed to the right person.
- Appointment confirmation — Confirm bookings for clinics, salons and service centres with a code, so slots aren't held by fake numbers.
Examples
- cURL — Every endpoint from the command line, and a complete sandbox run.
- JavaScript and TypeScript — A typed, dependency-free OTP.ps client for any server-side TypeScript (Node.js, Bun, Deno, Next.js).
- Node.js — A plain Node.js client and an Express server with send and check endpoints.
- React — A bilingual (Arabic RTL / English) phone verification form with loading, errors, expiry and a resend countdown.
- Next.js — App Router route handlers that send and check codes, with the pending verification in a signed cookie.
- PHP — A PHP client (curl), a command-line sandbox demo, and session-based endpoints for a website form.
- Laravel — A Laravel service using the HTTP client, a controller, routes with throttling, and configuration.
- Python — A standard-library Python client, a sandbox demo, and Flask endpoints.
- WooCommerce — The OTP.ps plugin for WooCommerce, which confirms the customer's number before you ship a cash-on-delivery order, plus a minimal example.
- Shopify — What is and isn't possible with Shopify today, and the recommended pattern.
Platforms
- Zapier — Confirm customers' numbers from any Zapier workflow, for example Shopify cash-on-delivery orders, with the OTP.ps app's triggers and actions.
- n8n — OTP.ps nodes for n8n (an action node and an instant trigger), or the same with n8n's built-in HTTP Request and Webhook nodes.
- Make — Confirm customers' numbers in Make scenarios with the built-in HTTP and Webhooks modules.
SDKs
- JavaScript / TypeScript SDK — @otp-ps/sdk: typed client with safe retries, timeouts, sandbox helpers and phone validation.
- PHP SDK — otp-ps/sdk: typed PHP 8.1+ client with safe retries, timeouts, sandbox constants and phone validation; works with or without Composer.
Going live
- Security best practices — Keeping keys safe, preventing abuse and SMS pumping, and verifying correctly.
- Production checklist — What to check before switching from a test key to a live key.
- Frequently asked questions — Short answers to common questions about OTP.ps.
AI tools
- Integrate with AI — Use an AI coding assistant to integrate OTP.ps: a ready prompt, the official Agent Skill, the MCP server, llms.txt and OpenAPI.