{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"SMS Gateway (Payless4SMS)","description":"Complete developer documentation for the eCommunicate Omnichannel platform. WhatsApp Cloud, WhatsApp Lite, SMS, Live Chat, and Conversations APIs. Send messages, manage templates, configure webhooks, and build customer engagement at scale.","siteUrl":"https://docs.ecommunicate.co.za","lang":"en-ZA","image":"/assets/og-cover.93cb0a29e46afb76d2e2ad760ae643881a756bfe5784b4b0c3553ecb20635632.db81178d.png","keywords":["eCommunicate API","WhatsApp Business API","SMS API","omnichannel messaging","WhatsApp templates","messaging platform","South Africa messaging API","bulk SMS API","two-way SMS","SMS gateway","delivery receipts"],"meta":[{"name":"author","content":"eCommunicate (Pty) Ltd"},{"name":"robots","content":"index, follow"}],"jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.ecommunicate.co.za/#organization","name":"eCommunicate","url":"https://www.ecommunicate.co.za/","logo":"https://docs.ecommunicate.co.za/images/logo.png","sameAs":["https://www.ecommunicate.co.za/"],"contactPoint":{"@type":"ContactPoint","email":"support@ecommunicate.co.za","contactType":"customer support"}},{"@type":"WebSite","@id":"https://docs.ecommunicate.co.za/#website","name":"eCommunicate API Documentation","url":"https://docs.ecommunicate.co.za","publisher":{"@id":"https://www.ecommunicate.co.za/#organization"}}]},"llmstxt":{"hide":false,"title":"eCommunicate Omnichannel API","description":"Developer documentation for the eCommunicate Omnichannel platform — WhatsApp Cloud, WhatsApp Lite, SMS, Live Chat, and Conversations APIs.","sections":[{"title":"Guides","includeFiles":["guides/**/*.md"]},{"title":"Tutorials","includeFiles":["tutorials/**/*.md"]},{"title":"API Reference","includeFiles":["apis/**/*.yaml"]},{"title":"Changelog","includeFiles":["changelog.md"]}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"sms-gateway-payless4sms","__idx":0},"children":["SMS Gateway (Payless4SMS)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SMS Gateway"]}," is a direct HTTP/JSON API for sending single and bulk SMS to any mobile network, with delivery tracking, two-way replies, scheduling, and credit management. It is a standalone product — separate from the WhatsApp-centric ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/omnichannel"},"children":["Omnichannel API"]}," and from the XML-based ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/biz-sms"},"children":["Biz SMS API"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For the full endpoint and schema reference, see the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/sms"},"children":["SMS Gateway API"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"base-url","__idx":1},"children":["Base URL"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://api.payless4sms.co.za\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.ecommunicate.co.za"]}," is an alternate production host. Always use the hostname, never a raw IP."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authentication","__idx":2},"children":["Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every request is authenticated with an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API key"]}," — send an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-Key: ecomm_..."]}," header. Always use HTTPS so the key is never sent in the clear."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Get an API key or OTP token"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Generate and revoke API keys from the client portal (",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Keys"]},"). For one-time-pin traffic that must deliver in 5–10 seconds, request an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["otpToken"]}," from ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"mailto:support@ecommunicate.co.za"},"children":["support@ecommunicate.co.za"]}," and send it as an additional header."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"send-your-first-sms","__idx":3},"children":["Send your first SMS"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST https://api.payless4sms.co.za/sms/json \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ecomm_your_api_key\" \\\n  -d '{\n    \"messages\": [\n      {\n        \"ctid\": \"order-12345\",\n        \"recipients\": [\n          { \"to\": \"27821234567\", \"identifier\": \"John\" }\n        ],\n        \"messageText\": \"Hello from eCommunicate\"\n      }\n    ]\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response — inspect ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["statusCode"]}," for the outcome:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"gstid\": \"3e99e8d9-50bf-469d-9fd4-d6c10cf5b152\",\n  \"statusCode\": \"100\",\n  \"statusDescription\": \"MESSAGE_ACCEPTED_FOR_PROCESSING\",\n  \"completionTime\": \"2026-05-21T21:22:26+02:00\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["statusCode"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["100"]}," means the batch was accepted. Keep each request to a maximum of ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["1000"]}," recipients, and send the next request only after receiving the previous response."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sending-patterns","__idx":4},"children":["Sending patterns"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Pattern"},"children":["Pattern"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"How"},"children":["How"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One message to one recipient"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A single-entry ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["messages"]}," array"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Same text to many recipients"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Top-level ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ctid"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recipients"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["messageText"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Many messages to many recipients"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Multiple entries in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["messages"]},", each with its own ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recipients"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Schedule a batch"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settings.scheduledSmsDate"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DDThh:mm:ssZ"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unicode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"unicode\": \"true\""]}," (70 chars/segment)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Don't save message"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settings.dsm: \"true\""]}]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"track-delivery","__idx":5},"children":["Track delivery"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Query delivery status by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ctid"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stid"]},", time range, or the global ids:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST https://api.payless4sms.co.za/sms/trackingMessageStatus \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ecomm_your_api_key\" \\\n  -d '{ \"ctid\": \"order-12345\", \"sentDate\": \"2026-05-21\", \"showfinalstatus\": \"true\" }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each receipt carries a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["statusCode"]}," — for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," Message Sent, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["501"]}," Queued At MNO, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["600"]}," Delivery Success, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["620"]}," Failed In Delivery."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Tracking is rate limited"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each id can be queried up to 10 times in the first 10 minutes, then once every 10 minutes. Exceeding this returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["statusCode"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["228"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"receive-delivery-receipts-and-replies","__idx":6},"children":["Receive delivery receipts and replies"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Instead of polling, configure callback URLs and let the gateway push events to you:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"settings\": {\n    \"receiptCallBackURL\": \"https://your-server.com/receipts\",\n    \"replyCallBackURL\": \"https://your-server.com/replies\"\n  },\n  \"messages\": [ ... ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delivery receipts"]}," are delivered as an HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]}," to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiptCallBackURL"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Replies"]}," are delivered to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["replyCallBackURL"]}," (GET or POST)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Return HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},". Undelivered callbacks are retried for up to 24 hours."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/sms"},"children":["webhook reference"]}," for the exact payloads."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"opt-outs","__idx":7},"children":["Opt-outs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recipients who reply ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STOP"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["END"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CANCEL"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["QUIT"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UNSUBSCRIBE"]}," are blacklisted automatically; further sends to them are blocked and refunded. Retrieve the list with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /sms/getUnsubscribelist"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"check-your-balance","__idx":8},"children":["Check your balance"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST https://api.payless4sms.co.za/sms/getBalance \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ecomm_your_api_key\" \\\n  -d '{}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API key identifies the account, but a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," still needs a JSON body: send the empty object ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{}"]},". Leave the body out and the gateway answers HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["415 Unsupported Media Type"]}," with an HTML error page instead of JSON."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"production-tips","__idx":9},"children":["Production tips"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Prefer POST over GET"]}," — the request body is not length-limited, and nothing sensitive lands in the URL."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set a unique ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ctid"]}]}," (ideally a GUID) per message so you can track and safely retry."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Retry safely"]}," — resending an identical request with the same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ctid"]}," will not double-send; already-sent messages are skipped."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Watch for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["502"]}]}," — if you run a backup gateway, a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["502"]}," response means resend via the backup until the status returns to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["100"]},"."]}]}]},"headings":[{"value":"SMS Gateway (Payless4SMS)","id":"sms-gateway-payless4sms","depth":1},{"value":"Base URL","id":"base-url","depth":2},{"value":"Authentication","id":"authentication","depth":2},{"value":"Send your first SMS","id":"send-your-first-sms","depth":2},{"value":"Sending patterns","id":"sending-patterns","depth":2},{"value":"Track delivery","id":"track-delivery","depth":2},{"value":"Receive delivery receipts and replies","id":"receive-delivery-receipts-and-replies","depth":2},{"value":"Opt-outs","id":"opt-outs","depth":2},{"value":"Check your balance","id":"check-your-balance","depth":2},{"value":"Production tips","id":"production-tips","depth":2}],"frontmatter":{"title":"SMS Gateway (Payless4SMS)","description":"Send single and bulk SMS over a simple HTTP JSON API — with delivery tracking, replies, scheduling and credit management.","seo":{"title":"SMS Gateway (Payless4SMS)"}},"lastModified":"2026-12-04T11:44:01.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/sms-gateway","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}