# OTP.ps > OTP.ps sends one-time verification codes (OTP) by SMS to Palestinian mobile numbers on Jawwal (059) and Ooredoo (056), in Arabic or English, under the business's name. One REST API: send a code, then check what the customer typed. Used for sign-up, passwordless login, cash-on-delivery order confirmation, delivery and appointment confirmation. Key facts for integrating: - Base URL: https://otp.ps. Endpoints: POST /api/v1/verify/send, POST /api/v1/verify/check, GET /api/v1/verify/{id}, GET /api/v1/balance. - Auth: `Authorization: Bearer `. Keys are `otp_test_…` (sandbox: never sends, never charges, returns the code as `test_code`) or `otp_live_…`. Keys must stay on the server, in the environment variable OTP_PS_API_KEY; never in browser or mobile code (the API has no CORS). - Trust only `valid: true` from /verify/check, called by your server with the verification id your server stored. Keep the verification id and number server-side. - Sandbox numbers (test keys only): 0599000001 (fixed code), 0569000001 (fixed code), 0599000002 (sms failed), 0599000003 (insufficient balance), 0599000004 (rate limited), 0599000005 (expires immediately). Fixed sandbox code: 1234 (123456 for 6-digit accounts). - Errors are `{ "error": code, "message", "retry_after"? }` with codes: unauthorized (401), insufficient_scope (403), invalid_request (400), invalid_phone (422), unsupported_network (422), idempotency_conflict (409), invalid_state (409), account_pending (403), account_suspended (403), insufficient_balance (402), rate_limited (429), spending_limit_reached (429), sms_failed (502), not_found (404). - Use an `Idempotency-Key` header on sends so retries never send or charge twice. - No screen for a code (Shopify Flow, Zapier, Make, n8n)? POST /api/v1/verify/links creates a page OTP.ps hosts; with delivery "sms" the customer gets the link by text and presses Confirm. A signed `link.approved` webhook (POST /api/v1/webhooks; OTP-Signature: t=…,v1=HMAC-SHA256(secret, "t.body")) says it's done. - OpenAPI 3.1: https://otp.ps/openapi.json. Every docs page is available as Markdown by adding .md to its URL. ## Getting started - [Quickstart](https://otp.ps/docs/quickstart.md): Send your first verification code and check it in five minutes, without sending a real message. - [Authentication](https://otp.ps/docs/authentication.md): API keys, test and live mode, and where keys must (and must never) be kept. - [Verification lifecycle](https://otp.ps/docs/verification-lifecycle.md): What happens to a code from sending to approval, expiry or failure, and how resending works. - [Sandbox](https://otp.ps/docs/sandbox.md): Build and test the whole integration for free with test keys and sandbox numbers that simulate every outcome. - [Verification links](https://otp.ps/docs/verification-links.md): 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](https://otp.ps/docs/api-reference.md): Every endpoint, field and answer of the OTP.ps REST API. - [Phone numbers](https://otp.ps/docs/phone-numbers.md): Which numbers OTP.ps sends to, the formats it accepts, and how to normalize them yourself. - [Errors](https://otp.ps/docs/errors.md): Every error code the API can answer, what it means and what your integration should do. - [Webhooks](https://otp.ps/docs/webhooks.md): Get told the moment a customer confirms a verification link, with signed messages, retries and a log. ## Use cases - [Cash-on-delivery order confirmation](https://otp.ps/docs/guides/cash-on-delivery.md): Confirm the customer's number with a code before accepting a cash-on-delivery order, to cut fake orders and returns. - [Customer registration](https://otp.ps/docs/guides/registration.md): Verify a new customer's mobile number while they create an account. - [Passwordless login](https://otp.ps/docs/guides/passwordless-login.md): Let customers sign in with their mobile number and a code instead of a password. - [Phone number verification](https://otp.ps/docs/guides/phone-verification.md): Confirm that a number belongs to the customer, for example on their profile or before saving a delivery number. - [Delivery confirmation](https://otp.ps/docs/guides/delivery-confirmation.md): Have the customer give the courier a code at the door, to prove the order was handed to the right person. - [Appointment confirmation](https://otp.ps/docs/guides/appointments.md): Confirm bookings for clinics, salons and service centres with a code, so slots aren't held by fake numbers. ## Examples - [cURL](https://otp.ps/docs/examples/curl.md): Every endpoint from the command line, and a complete sandbox run. - [JavaScript and TypeScript](https://otp.ps/docs/examples/javascript-typescript.md): A typed, dependency-free OTP.ps client for any server-side TypeScript (Node.js, Bun, Deno, Next.js). - [Node.js](https://otp.ps/docs/examples/nodejs.md): A plain Node.js client and an Express server with send and check endpoints. - [React](https://otp.ps/docs/examples/react.md): A bilingual (Arabic RTL / English) phone verification form with loading, errors, expiry and a resend countdown. - [Next.js](https://otp.ps/docs/examples/nextjs.md): App Router route handlers that send and check codes, with the pending verification in a signed cookie. - [PHP](https://otp.ps/docs/examples/php.md): A PHP client (curl), a command-line sandbox demo, and session-based endpoints for a website form. - [Laravel](https://otp.ps/docs/examples/laravel.md): A Laravel service using the HTTP client, a controller, routes with throttling, and configuration. - [Python](https://otp.ps/docs/examples/python.md): A standard-library Python client, a sandbox demo, and Flask endpoints. - [WooCommerce](https://otp.ps/docs/examples/woocommerce.md): 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](https://otp.ps/docs/examples/shopify.md): What is and isn't possible with Shopify today, and the recommended pattern. ## Platforms - [Zapier](https://otp.ps/docs/integrations/zapier.md): Confirm customers' numbers from any Zapier workflow, for example Shopify cash-on-delivery orders, with the OTP.ps app's triggers and actions. - [n8n](https://otp.ps/docs/integrations/n8n.md): 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](https://otp.ps/docs/integrations/make.md): Confirm customers' numbers in Make scenarios with the built-in HTTP and Webhooks modules. ## SDKs - [JavaScript / TypeScript SDK](https://otp.ps/docs/sdks/javascript.md): @otp-ps/sdk: typed client with safe retries, timeouts, sandbox helpers and phone validation. - [PHP SDK](https://otp.ps/docs/sdks/php.md): 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](https://otp.ps/docs/security.md): Keeping keys safe, preventing abuse and SMS pumping, and verifying correctly. - [Production checklist](https://otp.ps/docs/production-checklist.md): What to check before switching from a test key to a live key. - [Frequently asked questions](https://otp.ps/docs/faq.md): Short answers to common questions about OTP.ps. ## AI tools - [Integrate with AI](https://otp.ps/docs/ai-tools.md): Use an AI coding assistant to integrate OTP.ps: a ready prompt, the official Agent Skill, the MCP server, llms.txt and OpenAPI. ## Optional - [Full documentation in one file](https://otp.ps/llms-full.txt): every page above, concatenated. - [OpenAPI document](https://otp.ps/openapi.json): the machine-readable API contract.