sms_validation
Verify phone numbers via SMS code verification for users who haven’t been previously authenticated or verified by user session/agency.
Endpoint: https://test-api.bussystem.eu/server/curl/sms_validation.php
Method: POST
Type: Verification function
Description
This two-step verification process sends an SMS with a verification code to the provided phone number, then validates the code to authorize the phone number for payment-on-boarding reservations.
Process Flow
- Step 1: Send SMS with verification code (
send_sms = 1
) - Step 2: Verify the received code (
check_sms = 1
)
Parameters
Authentication Parameters
- sid_guest (string, required): Session identifier for guest users
Basic Parameters
- v (string, required): API version (use “1.1”)
- phone (string, required): Phone number to verify (include country code, e.g., “+440776251258”)
- lang (string, required): Response language [en, ru, ua, de, pl, cz]
SMS Control Parameters
- send_sms (integer, optional): Send SMS verification code (use
1
for first request) - check_sms (integer, optional): Verify SMS code (use
1
for second request) - validation_code (string, optional): 6-digit code received via SMS (required for verification step)
Example Requests
Step 1: Send SMS Verification Code
$url = 'https://test-api.bussystem.eu/server/curl/sms_validation.php';
$post_data = [
"sid_guest" => "e6ce132c4c3c2290e3a2b28a750921ba",
"v" => "1.1",
"phone" => "+440776251258",
"send_sms" => 1,
"lang" => "en"
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $post_data
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Step 2: Verify SMS Code
$url = 'https://test-api.bussystem.eu/server/curl/sms_validation.php';
$post_data = [
"sid_guest" => "e6ce132c4c3c2290e3a2b28a750921ba",
"v" => "1.1",
"phone" => "+440776251258",
"check_sms" => 1,
"validation_code" => "569486",
"lang" => "en"
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $post_data
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response Format
Step 1: SMS Sent Successfully
{
"validation_id": "66333",
"phone": "440776251258",
"validation_code": "569486",
"status_code": "send_sms",
"status_sms": "OK"
}
Step 2: Phone Number Verified
{
"validation_id": "66333",
"phone": "440776251258",
"validation_code": "569486",
"status_code": "valid"
}
Response Fields
- validation_id: Unique identifier for this verification operation
- phone: Phone number being verified (without country code prefix)
- validation_code: 6-digit verification code
- status_code: Current verification status
send_sms
= SMS has been sentvalid
= Phone number successfully verified
- status_sms: SMS delivery status (only present when
send_sms = 1
)OK
= SMS successfully sent
SMS Message Format
Your verification code: 569486
Error Responses
Authentication Errors
{
"error": "dealer_no_activ"
}
Phone Number Errors
Missing Phone Number:
{
"error": "no_phone"
}
Invalid Phone Number Format:
{
"error": "invalid_phone"
}
Request Method Errors
Missing Request Method:
{
"error": "method"
}
Verification Code Errors
Incorrect Verification Code:
{
"error": "validation_code"
}
Code Not Generated:
{
"error": "generate_code"
}
Code Not Found:
{
"error": "check_generate_code"
}
Verification Failed:
{
"error": "check_valid"
}
SMS Delivery Errors
SMS Not Sent:
{
"error": "send_sms"
}
SMS Rate Limit Exceeded:
{
"error": "sends_limit",
"detail": "Resending SMS via 35 sec."
}
Verification Code Expired:
{
"error": "expired"
}
Important Notes
Rate Limiting
- SMS sending is rate-limited to prevent abuse
- Wait for the specified time before requesting another SMS
- Typical rate limit: one SMS per 35 seconds
Code Expiration
- Verification codes have a limited validity period
- Request a new code if the current one has expired
- Complete verification promptly after receiving the SMS
Session Management
- Use consistent
sid_guest
for both SMS sending and verification - Session identifiers should be unique per verification attempt
Phone Number Format
- Always include country code (e.g., “+44” for UK)
- Remove spaces and special characters except the “+” prefix
- Ensure phone number is valid and can receive SMS messages
Integration with Booking Flow
This endpoint is typically used between reserve_validation
and reserve_ticket
:
reserve_validation
→ Check if SMS verification is neededsms_validation
→ Verify phone number if requiredreserve_ticket
→ Complete reservation with verified phone