@extends('layouts.app') @section('title', 'WhatsApp Settings') @push('styles') @endpush @section('content') @php $webhookToken = $tenant->wa_verify_token ?? 'YOUR_VERIFY_TOKEN'; $webhookUrl = 'https://tenseal.co/whatsapp/webhook/' . $webhookToken; @endphp @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif

Connect WhatsApp Business

Connect WhatsApp Business API (Meta Cloud API) to let customers order directly through WhatsApp. Tenseal will automatically reply with your product menu, capture order details, and notify you when a sale is confirmed.

Setup Instructions

  1. Create a Meta Business app at developers.facebook.com.
  2. Add the WhatsApp product to your app in the Meta developer dashboard.
  3. Generate a permanent access token (System User Token) with whatsapp_business_messaging and whatsapp_business_management permissions.
  4. Copy your Phone Number ID from the WhatsApp → API Setup page.
  5. Set your webhook URL in Meta to the address below. Meta will verify it using your Verify Token.
    {{ $webhookUrl }}
@csrf @method('PUT')

Integration Settings

Enable WhatsApp Integration Turn this on once your Meta credentials are set up to start receiving orders.
The public number customers see and message. @error('wa_display_phone') {{ $message }} @enderror
Found in Meta → WhatsApp → API Setup. @error('wa_phone_number_id') {{ $message }} @enderror
Stored securely. Leave blank to keep the existing token. @error('wa_access_token') {{ $message }} @enderror
Must match the Verify Token you enter in Meta's webhook configuration. @error('wa_verify_token') {{ $message }} @enderror
Cancel

Webhook Test

Verify URL {{ $webhookUrl }} @if($tenant->wa_enabled && !empty($tenant->wa_verify_token)) Ready — Meta can verify this URL. @else Enable WhatsApp and set a verify token before Meta will accept this URL. @endif
Open Verify URL
@endsection @push('scripts') @endpush