Get order status
curl --request GET \
--url https://virtualsms.io/api/v1/customer/order/{orderId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://virtualsms.io/api/v1/customer/order/{orderId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://virtualsms.io/api/v1/customer/order/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://virtualsms.io/api/v1/customer/order/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://virtualsms.io/api/v1/customer/order/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://virtualsms.io/api/v1/customer/order/{orderId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtualsms.io/api/v1/customer/order/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"phone_number": "628123456789",
"service": "tg",
"country": "ID",
"status": "waiting",
"price": 0.4,
"sms_received": false,
"created_at": "2026-03-14T15:00:00+08:00",
"expires_at": "2026-03-14T16:00:00+08:00",
"messages": []
}Numbers & SMS
Get SMS Code
Get the current status of an order. Poll every 3-5 seconds until SMS arrives, or use WebSocket for real-time delivery.
The messages array will be empty while waiting, and populated once SMS is received.
GET
/
api
/
v1
/
customer
/
order
/
{orderId}
Get order status
curl --request GET \
--url https://virtualsms.io/api/v1/customer/order/{orderId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://virtualsms.io/api/v1/customer/order/{orderId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://virtualsms.io/api/v1/customer/order/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://virtualsms.io/api/v1/customer/order/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://virtualsms.io/api/v1/customer/order/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://virtualsms.io/api/v1/customer/order/{orderId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtualsms.io/api/v1/customer/order/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"phone_number": "628123456789",
"service": "tg",
"country": "ID",
"status": "waiting",
"price": 0.4,
"sms_received": false,
"created_at": "2026-03-14T15:00:00+08:00",
"expires_at": "2026-03-14T16:00:00+08:00",
"messages": []
}Authorizations
API key from virtualsms.io dashboard (Settings -> API tab). Prefix: vsms_
Path Parameters
Order ID from the purchase response
Response
Order status