{"id":389976,"date":"2026-10-23T20:17:22","date_gmt":"2026-10-23T20:17:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/hantarsms-otp-marketing-sms-for-malaysia\/"},"modified":"2026-10-23T20:16:49","modified_gmt":"2026-10-23T20:16:49","slug":"hantarsms","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/hantarsms\/","author":23589668,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.3","requires":"6.2","requires_php":"7.4","requires_plugins":null,"header_name":"HantarSMS \u2013 OTP & Marketing SMS for Malaysia","header_author":"HantarSMS","header_description":"Send SMS to Malaysian mobile numbers from WordPress: login verification codes (OTP), WooCommerce order notifications and SMS marketing campaigns with consent and unsubscribe built in.","assets_banners_color":"f5f8fd","last_updated":"2026-10-23 20:16:49","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/hantarsms.com\/en\/wordpress-sms-plugin","header_author_uri":"https:\/\/hantarsms.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":64,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"imeiie1231","date":"2026-10-23 20:16:49","revision":3762390}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3762390,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3762390,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3762390,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3762390,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3762390,"resolution":"1","location":"assets","locale":"","width":1280,"height":1077},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3762390,"resolution":"2","location":"assets","locale":"","width":1280,"height":900},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3762390,"resolution":"3","location":"assets","locale":"","width":1280,"height":1544},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3762390,"resolution":"4","location":"assets","locale":"","width":1280,"height":720},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3762390,"resolution":"5","location":"assets","locale":"","width":1280,"height":900}},"screenshots":{"1":"Send SMS: audience, message with live segment and cost counter, schedule.","2":"Review screen before a campaign is sent.","3":"WooCommerce order SMS templates.","4":"Log in with an SMS code.","5":"SMS log."}},"plugin_section":[],"plugin_tags":[12487,9210,711,768,286],"plugin_category":[41,45],"plugin_contributors":[288163],"plugin_business_model":[],"class_list":["post-389976","plugin","type-plugin","status-publish","hentry","plugin_tags-malaysia","plugin_tags-otp","plugin_tags-sms","plugin_tags-sms-marketing","plugin_tags-woocommerce","plugin_category-communication","plugin_category-ecommerce","plugin_contributors-imeiie1231","plugin_committers-imeiie1231"],"banners":{"banner":"https:\/\/ps.w.org\/hantarsms\/assets\/banner-772x250.png?rev=3762390","banner_2x":"https:\/\/ps.w.org\/hantarsms\/assets\/banner-1544x500.png?rev=3762390","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/hantarsms\/assets\/icon-128x128.png?rev=3762390","icon_2x":"https:\/\/ps.w.org\/hantarsms\/assets\/icon-256x256.png?rev=3762390","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/hantarsms\/assets\/screenshot-1.png?rev=3762390","caption":"Send SMS: audience, message with live segment and cost counter, schedule."},{"src":"https:\/\/ps.w.org\/hantarsms\/assets\/screenshot-2.png?rev=3762390","caption":"Review screen before a campaign is sent."},{"src":"https:\/\/ps.w.org\/hantarsms\/assets\/screenshot-3.png?rev=3762390","caption":"WooCommerce order SMS templates."},{"src":"https:\/\/ps.w.org\/hantarsms\/assets\/screenshot-4.png?rev=3762390","caption":"Log in with an SMS code."},{"src":"https:\/\/ps.w.org\/hantarsms\/assets\/screenshot-5.png?rev=3762390","caption":"SMS log."}],"raw_content":"<!--section=description-->\n<p>HantarSMS connects your WordPress site to <a href=\"https:\/\/hantarsms.com\/\">HantarSMS<\/a>, a Malaysian SMS service that sends from a short code to Maxis, CelcomDigi, U Mobile, Unifi Mobile and YES numbers. Prepaid, from RM0.20 per SMS, no monthly fee.<\/p>\n\n<p>One plugin covers the three reasons a Malaysian site sends SMS:<\/p>\n\n<p><strong>1. OTP verification codes<\/strong><\/p>\n\n<ul>\n<li>\"Log in with an SMS code\" on the WordPress login page, or anywhere with the <code>[hantarsms_otp_login]<\/code> shortcode.<\/li>\n<li>Codes are random, stored only as a keyed hash, expire after a few minutes and allow five attempts.<\/li>\n<li>Limits per phone number and per IP address stop bots from running up your SMS bill through your login form.<\/li>\n<li>The form does not reveal whether a number belongs to an account, and no SMS is sent (or paid for) when it does not.<\/li>\n<li>Administrators cannot log in with an SMS code alone, by default.<\/li>\n<li>Developers can use <code>hantarsms_otp_send()<\/code> and <code>hantarsms_otp_verify()<\/code> in their own forms.<\/li>\n<\/ul>\n\n<p><strong>2. WooCommerce order SMS<\/strong><\/p>\n\n<ul>\n<li>An SMS to the customer when an order becomes Processing, Completed, Cancelled, Refunded and more \u2014 each status with its own editable template.<\/li>\n<li>A new-order alert to your own phone numbers.<\/li>\n<li>Placeholders such as <code>{first_name}<\/code>, <code>{order_number}<\/code>, <code>{order_total}<\/code> and <code>{shop}<\/code>.<\/li>\n<li>Sent in the background with Action Scheduler, so checkout is never slowed down. Each SMS is noted on the order.<\/li>\n<li>Compatible with High-Performance Order Storage and the block-based checkout.<\/li>\n<\/ul>\n\n<p><strong>3. SMS marketing campaigns<\/strong><\/p>\n\n<ul>\n<li>An optional, unticked \"Send me offers by SMS\" checkbox at checkout (classic and block checkout), and a consent setting on each user profile.<\/li>\n<li>Write a campaign, see the character count, number of segments and estimated cost while you type, review, then send now or schedule it.<\/li>\n<li>Send to everyone who agreed to marketing SMS, or paste your own list (you confirm you have consent).<\/li>\n<li>Unsubscribe built in: recipients cannot reply to a short code, so the plugin creates an unsubscribe page and can add its link to every campaign. Unsubscribed numbers are removed from every marketing send.<\/li>\n<li>Batches of up to 10,000 numbers per request, each with an idempotency key, so a retry never sends the same campaign twice.<\/li>\n<\/ul>\n\n<p><strong>Also included<\/strong><\/p>\n\n<ul>\n<li>Balance and price per SMS on the settings screen, and a test SMS button.<\/li>\n<li>A log of every send with cost and any error, kept for 180 days. Phone numbers in the log are masked and OTP codes are never stored.<\/li>\n<li><code>hantarsms_send_sms( $to, $text )<\/code> for developers, plus filters and actions to change messages and recipients.<\/li>\n<\/ul>\n\n<p>Numbers can be typed in any Malaysian format: 0123456789, 012-345 6789, 60123456789 or +60123456789. Only Malaysian mobile numbers are supported.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin sends SMS through the HantarSMS API, operated by HantarSMS (https:\/\/hantarsms.com\/). It does nothing until you enter an API key from your HantarSMS account.<\/p>\n\n<p>What is sent, and when:<\/p>\n\n<ul>\n<li>When an SMS is sent (an OTP code, an order update, a campaign or a test), the plugin sends the recipient phone number(s), the message text and a short reference (such as \"order-123-processing\") to <code>https:\/\/hantarsms.com\/api\/v1\/messages<\/code>, together with your API key.<\/li>\n<li>When you open the plugin's admin screens, it requests your account balance from <code>https:\/\/hantarsms.com\/api\/v1\/balance<\/code>, together with your API key.<\/li>\n<\/ul>\n\n<p>No other data about your site or its visitors is sent. HantarSMS passes the phone numbers and message text to Malaysian mobile operators to deliver the SMS.<\/p>\n\n<ul>\n<li>Terms of Service: https:\/\/hantarsms.com\/en\/terms<\/li>\n<li>Privacy and data protection: https:\/\/hantarsms.com\/en\/pdpa-sms-compliance-malaysia<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin.<\/li>\n<li>Create a HantarSMS account at https:\/\/hantarsms.com\/ and add credit. New accounts can ask for free trial credit on WhatsApp.<\/li>\n<li>In the HantarSMS console, open <strong>API keys<\/strong> and create a key.<\/li>\n<li>In WordPress, go to <strong>HantarSMS \u2192 Settings<\/strong>, paste the key and save. Send yourself a test SMS.<\/li>\n<li>Turn on what you need: <strong>OTP login<\/strong>, <strong>WooCommerce<\/strong> order SMS, and under <strong>Marketing<\/strong> create the unsubscribe page.<\/li>\n<\/ol>\n\n<p>You can also put the key in <code>wp-config.php<\/code> instead of the database:<\/p>\n\n<pre><code>define( 'HANTARSMS_API_KEY', 'sk_live_...' );\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt id=\"which%20numbers%20can%20i%20send%20to%3F\"><h3>Which numbers can I send to?<\/h3><\/dt>\n<dd><p>Malaysian mobile numbers only (60 1X\u2026). Numbers in other formats are skipped and shown as invalid before you send.<\/p><\/dd>\n<dt id=\"how%20much%20does%20it%20cost%3F\"><h3>How much does it cost?<\/h3><\/dt>\n<dd><p>You pay HantarSMS per SMS segment, from RM0.20, from prepaid credit that does not expire. The plugin itself is free. One segment holds 156 characters of plain English, or 66 characters if the message contains Chinese, emoji or other special characters. The send screen shows the segment count and estimated cost before you confirm. See https:\/\/hantarsms.com\/en\/pricing.<\/p><\/dd>\n<dt id=\"can%20recipients%20reply%2C%20or%20reply%20stop%3F\"><h3>Can recipients reply, or reply STOP?<\/h3><\/dt>\n<dd><p>No. Messages come from a shared, send-only short code (66886). That is why the plugin has an unsubscribe page, and why every message should start with your business name.<\/p><\/dd>\n<dt id=\"do%20i%20need%20consent%20to%20send%20marketing%20sms%3F\"><h3>Do I need consent to send marketing SMS?<\/h3><\/dt>\n<dd><p>Yes. Under Malaysia's Personal Data Protection Act you need consent for direct marketing and must stop when someone asks. The plugin only sends campaigns to people who ticked the consent box (or to a list you confirm has consented), and always removes unsubscribed numbers. Order updates and OTP codes are not marketing.<\/p><\/dd>\n<dt id=\"how%20do%20users%20log%20in%20with%20an%20sms%20code%3F\"><h3>How do users log in with an SMS code?<\/h3><\/dt>\n<dd><p>Their number must be saved on their account: the \"Mobile number (SMS)\" field on the WordPress profile, or the WooCommerce billing phone. If two accounts share a number, SMS login is refused for that number.<\/p><\/dd>\n<dt id=\"can%20i%20use%20the%20otp%20functions%20in%20my%20own%20forms%3F\"><h3>Can I use the OTP functions in my own forms?<\/h3><\/dt>\n<dd><p>Yes:<\/p>\n\n<pre><code>$sent = hantarsms_otp_send( $phone, 'my-form' );\n$ok = hantarsms_otp_verify( $phone, $code, 'my-form' );\n<\/code><\/pre>\n\n<p>Both return <code>true<\/code> or a <code>WP_Error<\/code>. The purpose ('my-form') makes sure a code sent for one form cannot be used in another.<\/p><\/dd>\n<dt id=\"my%20site%20is%20behind%20cloudflare%20or%20a%20proxy.%20are%20the%20ip%20limits%20correct%3F\"><h3>My site is behind Cloudflare or a proxy. Are the IP limits correct?<\/h3><\/dt>\n<dd><p>By default the plugin uses REMOTE_ADDR, because forwarded headers can be forged. If your server sees the proxy's address, return the real visitor IP with the <code>hantarsms_client_ip<\/code> filter.<\/p><\/dd>\n<dt id=\"where%20are%20delivery%20reports%3F\"><h3>Where are delivery reports?<\/h3><\/dt>\n<dd><p>The plugin log shows whether HantarSMS accepted each send. Per-number delivery results are in your HantarSMS console.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release: OTP login, WooCommerce order SMS, SMS marketing campaigns with consent and unsubscribe, send log.<\/li>\n<\/ul>","raw_excerpt":"OTP login codes, WooCommerce order SMS and SMS marketing campaigns for Malaysian numbers, with consent and unsubscribe built in.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/389976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=389976"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/imeiie1231"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=389976"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=389976"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=389976"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=389976"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=389976"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=389976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}