Or
Rented Carrier StringLoading...Awaiting secure carrier validation webhook payload...Verification Code Received------Release Line & Clear ViewΒ© 2026 SMSmart Operations Hub. All infrastructure verified.Support CenterPrivacy PolicyTerms of Servicelet activeInterval = null;let userLoggedIn = false;async function updateBalanceMetric() {try {const res = await fetch('/api/get-balance');const data = await res.json();document.getElementById('balance-display').innerText = $${data.balance.toFixed(2)};} catch (err) { console.error(err); }}async function handleLoginSubmit() {const check = document.getElementById('policy-check');if(!check.checked) {alert("Please check the legal policies box to authorization your login profile.");return;}userLoggedIn = true;document.getElementById('balance-display').innerText = "$15.00";alert("Authorization Successful! Your account has been loaded with a mock balance for testing.");}async function rentNumber(serviceName) {if (!userLoggedIn) {alert("Please sign in or check the legal checkbox agreements to authorize your activation request.");return;}const errBox = document.getElementById('error-msg');errBox.classList.add('hidden');try {const res = await fetch('/api/buy-number', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ service: serviceName })});const data = await res.json();if (!res.ok) throw new Error(data.error || "Order failed");document.getElementById('auth-card').classList.add('hidden');document.getElementById('active-card').classList.remove('hidden');document.getElementById('active-title-tag').innerText = ${serviceName.toUpperCase()} ACTIVE STRING;document.getElementById('phone-display').innerText = data.phone;document.getElementById('status-box').classList.remove('hidden');document.getElementById('code-box').classList.add('hidden');document.getElementById('balance-display').innerText = $${data.new_balance.toFixed(2)};if (activeInterval) clearInterval(activeInterval);activeInterval = setInterval(() => checkSMSUpdate(data.order_id), 5000);} catch (err) {errBox.innerText = err.message;errBox.classList.remove('hidden');}}async function checkSMSUpdate(orderId) {try {const res = await fetch(/api/check-sms?order_id=${orderId});if (!res.ok) return;const data = await res.json();if (data.status === "completed" && data.code) {clearInterval(activeInterval);document.getElementById('status-box').classList.add('hidden');document.getElementById('code-box').classList.remove('hidden');document.getElementById('code-display').innerText = data.code;}} catch (err) { console.error(err); }}function resetConsoleView() {if (activeInterval) clearInterval(activeInterval);document.getElementById('active-card').classList.add('hidden');document.getElementById('auth-card').classList.remove('hidden');}