SMSTunnel for PrestaShop

Order texts from your own phone and number

Free module · PrestaShop 8.1, 8.2 and 9 · MIT
SMSTunnel: SMS notifications

Order texts customers can reply to

A text to you for every new order, and a text to the customer when their order is shipped, delivered or canceled, or gets any status you choose. Your shop hands each text to your SMSTunnel account, and your own Android phone sends it from its own SIM. Customers see your number and can reply to it.

What your shop texts

New order

To you, on up to 5 numbers, one text each

{shop_name}: new order {order_reference} from {firstname} {lastname}, {total_paid}.

Shipped

To the customer (ticked when you install it)

Hello {firstname}, your order {order_reference} from {shop_name} is on its way. {tracking_url}

Delivered

To the customer (ticked when you install it)

Hello {firstname}, your order {order_reference} from {shop_name} has been delivered. Thank you!

Canceled

To the customer (ticked when you install it)

Hello {firstname}, your order {order_reference} from {shop_name} has been canceled. Reply to this text if you have any questions.

Payment accepted

To the customer, if you tick it

Hello {firstname}, we have received your payment of {total_paid} for order {order_reference}. Thank you for shopping at {shop_name}!

Any other status

To the customer, if you tick it (Refunded and Processing in progress have their own texts)

Hello {firstname}, your order {order_reference} from {shop_name} is now: {status}.

These are the suggested texts. Each one comes in the language of the order (English, French, German, Spanish, Italian or Romanian), and you can reword it for each of your shop's languages.

Built for real shops

  • A text never stops an order. If SMSTunnel is slow or can't be reached, the order goes through and the text is marked as not sent, with the reason. A text waits at most 8 seconds for SMSTunnel, and when SMSTunnel can't be reached, the other texts of the same page load aren't tried, so a checkout waits a few seconds at most.
  • Numbers that work. The text goes to the mobile number of the delivery address (then its phone, then the invoice address), completed with the country's calling code: 06 12 34 56 78 on a French address becomes +33612345678. Premium-rate numbers, short codes and satellite networks are never texted.
  • Never twice. Each text goes out once per order and status, even when PrestaShop runs the same step twice.
  • Every text in one list. The module's page shows the last texts, what happened to each and why one was skipped, with Send again for a text that did not go out. Failures also go to PrestaShop's log.
  • GDPR. With PrestaShop's official GDPR module, a customer's data export lists the texts about their orders, and deleting the customer removes them from the module's log.
  • Replies reach you. The texts come from your number, so customers' answers arrive on your phone.

1. Get your key

  1. 1. Install the SMSTunnel app from Google Play on your Android phone and sign in.
  2. 2. In your dashboard, open Apps → Add an app, pick PrestaShop, name it (for example "PrestaShop") and click Create the key.
  3. 3. Copy the key right away: it's shown only once. You can stop or delete the app there anytime, and PrestaShop can't send texts anymore.

Get the steps with your key in them

It opens Add an app with PrestaShop picked. Once the key is made, the dashboard shows every step and command with the key already filled in, ready to copy.

2. Install the module

  1. 1. Get the module's zip file, smstunnel.zip. Download smstunnel.zip
  2. 2. In your PrestaShop back office, open Modules → Module Manager, click Upload a module and choose the zip file.
  3. 3. When it is installed, click Configure. You need PrestaShop 8.1, 8.2 or 9.

3. Fill in the settings

The module's page has four parts. Save each one with Save:

API key
The key from step 1. Once saved, only its start and end are shown; leave the field empty to keep it.
Phone ID
Optional. Empty sends from any of your phones; to always use one, copy its ID from Phones in your dashboard.
Text me about new orders
Yes, with Your numbers: one or more (at most 5), separated by commas, in international format such as +33612345678
Text customers about their orders
Yes, then tick the statuses under When the order status becomes. Each status has its own text, in each of your languages.
Advanced
SMSTunnel server: for testing only. Leave it as it is.

Texts can use these placeholders, and can be up to 1600 characters:

{firstname}, {lastname}
The customer's name.
{order_reference}
The order reference.
{total_paid}
The order total, with its currency, as the shop shows prices.
{shop_name}
Your shop's name.
{tracking_number}
The order's tracking number.
{tracking_url}
The tracking link, from the carrier's tracking URL with @ replaced by the number.
{status}
The order's new status, in the language of the order.

4. Send yourself a test text

Once the key is saved, the top of the module's page lists your phones, online or offline, with their Phone ID. Type your number in Send a test text to and click Send a test text: your phone texts "This is a test text from {shop_name}. Your order texts will come from this phone."

If a text doesn't go out

The list of texts on the module's page shows each status: Sent to the phone, Waiting for the phone, Not sent or Skipped, with the reason:

  • "SMSTunnel refused the API key": the key is wrong or was deleted. Make a new one under Apps → Add an app and save it.
  • "This API key may not send texts": make a new key under Apps → Add an app.
  • "Too many texts at once, or the daily limit of your plan is reached": SMSTunnel takes 30 send requests a minute. Use Send again a little later.
  • "SMSTunnel could not be reached" or "SMSTunnel had a problem": try again in a few minutes with Send again.
  • Skipped, "No mobile number on the order address" or "not a mobile number SMSTunnel can text": the address has no number the module can use. Premium-rate numbers and short codes are never texted.
  • Waiting for the phone: your phone is offline. The text waits on your account and goes out as soon as the phone is back online.

Uninstalling the module removes its settings and its list of texts.

Build it with an AI assistant

Copy this prompt into Claude, ChatGPT, Cursor or Copilot and replace the part in [brackets]. Don't paste your API key into the chat: the prompt doesn't need it.

Help me add a text message my PrestaShop shop doesn't send yet (such as a back-in-stock alert), with SMSTunnel.

About SMSTunnel (https://smstunnel.io): my own apps and tools hand text messages (SMS) to my SMSTunnel account, and my own Android phone sends them from my own number, on my own SIM and plan. The phone runs the SMSTunnel app from Google Play (https://play.google.com/store/apps/details?id=io.smstunnel.app), signed in to my account.

What I want: [describe what should send a text, to whom, and when]

How it works:
- My shop runs PrestaShop 8.1, 8.2 or 9 with the module "SMSTunnel: SMS notifications" (technical name smstunnel). It already texts me about new orders and texts customers when their order gets a status I ticked. Its API key is in PrestaShop's configuration, SMSTUNNEL_API_KEY (Configuration::get), saved from the module's settings page.
- Write a small separate PrestaShop module for the new text: a hook or a scheduled task that calls the API from the server, never from the browser, reading the key from the configuration, never from source code.
- Send with a short timeout, and never let a failed text stop a page or an order: log it in PrestaShop's log (Advanced Parameters → Logs) instead.
- Take numbers from the customer's address (phone_mobile, then phone), complete local numbers with the country's calling code, and skip invalid ones.
- The API key comes from my SMSTunnel dashboard (https://dashboard.smstunnel.io): Apps → Add an app → Create the key. It is shown only once and can send texts and check whether they went out.

SMSTunnel API facts:
- Send a text: POST https://smstunnel.io/api/v1/sms/send with the headers "X-API-Key: <key>" and "Content-Type: application/json", and the JSON body {"to": "+14155550123", "message": "..."}. Optional: "deviceId" (which of my phones sends it; default: my main phone) and "defaultCountryCode". Other fields are refused with 400.
- Call it from a server: browsers can't send the X-API-Key header to SMSTunnel (CORS), and the key must stay secret.
- One recipient per call. To text several people, make one call per number.
- Numbers: international format, with + and the country code. For numbers written without + or 00, "defaultCountryCode" ("44", "+44" or "0044") completes them, and it always takes precedence over the country set for the phone.
- A text can be up to 1600 characters (10 joined SMS).
- Sign-in codes: POST https://smstunnel.io/api/v1/sms/send-2fa, same headers and fields. The text must contain the code as 4 to 10 digits standing on their own (like 482913) or as 123-456, and can be up to 320 characters; otherwise the answer is 400 "No valid verification code found". Codes have their own daily allowance. My app creates and checks the code; SMSTunnel only delivers the text.
- Success: HTTP 200 {"success": true, "messageId": "...", "data": {"messageId": "...", "branded": false, ...}}. "queued": true is added when the phone is offline: the text waits and goes out as soon as the phone is back (for up to 3 days). On the Free plan, 25 texts a day (500 a month) go out as written, up to 25 more a day go out with a short "free by smstunnel.io" line added ("branded": true), and past that the answer is 429.
- Errors: 400 bad input (the "message" field says why, sometimes as a list); 401 missing or invalid key; 403 the key lacks a permission ("code": "PERMISSION_REQUIRED", "permission": "...") or my plan does not include the feature; 429 with a Retry-After header: too many requests (30 send requests a minute per API key, 90 for all keys of one account together), so wait that many seconds, then retry; 429 without Retry-After: the plan's limit for the day or month is reached, so don't retry before then; 5xx: retry later, with a limit.
- Safe retries: send the header "Idempotency-Key: <one key per text>" (1 to 255 printable ASCII characters, such as order-1042-shipped or a UUID stored with the text). A repeat with the same key within 24 hours gets the first answer back (or the same 5xx error) instead of a second text; 409 while the first request is still running, 422 if the key was used for a different text.
- Status: GET https://smstunnel.io/api/v1/sms/status/{messageId} answers {"success": true, "data": {"status": ...}}, with pending, sent, delivered or failed. If "unconfirmed" is true, the phone handed the text to its SIM without getting a confirmation: it was probably sent, so never resend it automatically.

Rules for your answer:
- Keep the API key in an environment variable or the platform's secret store (for example SMSTUNNEL_API_KEY). Never put it in source code, in a repository, or in code that runs in a browser or a mobile app: call SMSTunnel from a server. I will not paste my key in this chat; use a placeholder.
- Validate phone numbers before sending (international format, like +14155550123) and skip or report the invalid ones.
- Handle errors: log or show what went wrong, retry only after 429, 5xx or network errors and only a few times, and never send the same text twice.
- Only send texts people expect from me: alerts to myself, reminders, sign-in codes, updates they asked for. No unsolicited texts.

Responsible use

Built for alerts to yourself and your team, and texts people expect from you. One text goes to one number. Sending unsolicited messages from a consumer SIM generally breaches mobile carrier terms of service.

PrestaShop is a trademark of PrestaShop SA. SMSTunnel is a third-party integration and is not affiliated with, endorsed by, or sponsored by PrestaShop SA.

No phone paired yet?

Install the Android app and sign in with your account, and you're ready in about a minute.

Get it on Google Play