Developers

Build WhatsApp messaging into your stack

Paygham gives developers API keys, messaging endpoints, media support, and signed webhooks so you can automate WhatsApp from the systems you already run.

Send your first text message

Run this request from your backend after creating an API key and connecting the selected WhatsApp account. Replace the account identifier, API key and example recipient before sending. Reuse the same Idempotency-Key when retrying this exact business request.

POST https://api.payghams.com/api/v1/messages
Content-Type: application/json
X-API-Key: YOUR_API_KEY
Idempotency-Key: order-42-ready

{
  "whatsappAccountId": "YOUR_ACCOUNT_ID",
  "to": "+12025550123",
  "message": "Your order 42 is ready for collection."
}

Handle the asynchronous result

HTTP 202 means the request was accepted for queueing. Record the response and use message.sent or message.failed callbacks, or GET /api/v1/messages/delivery-status, to reconcile the outcome. Keep API keys server-side and inspect the API error response before retrying a rejected request. Use a new idempotency key for a genuinely new message.

Integration checklist

A practical path from zero to production sends:

  • Create a Paygham account and connect WhatsApp
  • Generate an API key in the admin
  • Send a test text message
  • Add media if required
  • Register webhooks and verify signatures
  • Wire CRM/POS events to the send endpoint

Auth model

Dashboard users authenticate with JWT sessions. Integrations authenticate with API keys for messaging routes.

Docs and next steps

Use the live API documentation for request schemas and examples. Start on a free plan to validate the connection path before scaling.

Start automating WhatsApp with Paygham

Connect your number, send from dashboard or API, and keep consent honest.