Viber Business Integration

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Viber Business Messenger Integration with Website

Viber Business Messages allows sending transactional and marketing messages via official Viber API. Most popular in CIS and Eastern Europe countries. Available via Viber REST API or through aggregators (SMSC, MessageBird, Infobip).

Viber Account Types

Viber Bot — free, bot interacts with users through dialogs. Limited to 1-on-1 chats.

Viber Business Account — paid, allows sending messages to users who haven't started dialog with bot before. Business verification required.

Sending via Viber REST API

$authToken = env('VIBER_BOT_TOKEN');

// Send text message
$response = Http::withHeaders([
    'X-Viber-Auth-Token' => $authToken
])->post('https://chatapi.viber.com/pa/send_message', [
    'receiver' => $viberUserId,  // unique Viber user ID
    'type'     => 'text',
    'text'     => "Your order #{$orderId} sent for delivery.",
    'sender'   => ['name' => 'My Store']
]);

Message with Button

Http::withHeaders(['X-Viber-Auth-Token' => $authToken])
    ->post('https://chatapi.viber.com/pa/send_message', [
        'receiver' => $viberUserId,
        'type'     => 'rich_media',
        'rich_media' => [
            'Type'             => 'rich_media',
            'ButtonsGroupRows' => 2,
            'Buttons'          => [
                [
                    'Columns'    => 6,
                    'Rows'       => 1,
                    'Text'       => 'Track order',
                    'ActionType' => 'open-url',
                    'ActionBody' => "https://track.example.com/order/{$orderId}"
                ]
            ]
        ]
    ]);

Webhook and Incoming Processing

// Register webhook
Http::withHeaders(['X-Viber-Auth-Token' => $authToken])
    ->post('https://chatapi.viber.com/pa/set_webhook', [
        'url'         => 'https://yoursite.com/webhooks/viber',
        'event_types' => ['delivered', 'seen', 'failed', 'subscribed', 'unsubscribed', 'conversation_started', 'message']
    ]);

// Handler
Route::post('/webhooks/viber', function (Request $request) {
    $event = $request->json()->all();
    $type  = $event['event'];

    if ($type === 'message') {
        $userId = $event['sender']['id'];
        $text   = $event['message']['text'];
        dispatch(new ProcessViberMessageJob($userId, $text));
    }

    if ($type === 'subscribed') {
        // User subscribed to bot
        ViberUser::updateOrCreate(['viber_id' => $event['user']['id']], [...]);
    }

    return response()->json(['status' => 0]);  // 0 = OK for Viber
});

Getting User's Viber ID

User's Viber ID comes in conversation_started event (first dialog) or subscribed. Need to save user_id → viber_id link in DB.

Sending via Aggregators (SMSC)

To send Viber messages without own bot, use SMSC.ru — it supports Viber Business Messages via unified API.

Integration timeframe: 2–3 days for basic integration with notifications and incoming.