2 min read

How to Integrate WhatsApp API into SaaS Platforms with Embedded Signup v4?

Developer guide for software vendors (ISV): implement WhatsApp onboarding using Embedded Signup v4, manage multi-tenancy, and scale margins.

1. What is the WhatsApp Business Tech Provider (ISV) model?

The Tech Provider (ISV) model enables SaaS vendors to embed WhatsApp capabilities into their software products (medical platforms, real estate CRMs, billing systems).

End-business clients link their phone numbers inside your UI without creating Meta developer accounts or handling raw API keys.

2. Why is migration to Embedded Signup v4 mandatory in 2026?

Meta officially retired Embedded Signup v2 and v3 on October 15, 2026. All active integrations must run on Embedded Signup v4.

Version 4 introduces improved token scoping, automated WABA assignment, and eliminates legacy handshake friction via sessionInfoVersion: '4'.

3. How to implement the React / Next.js onboarding component with sessionInfoVersion 4?

tsx
import React, { useEffect } from 'react';

export function WhatsAppEmbeddedSignupButton({
  onSuccess
}: { onSuccess: (data: { wabaId: string; phoneId: string }) => void }) {
  useEffect(() => {
    const handleMessage = (event: MessageEvent) => {
      if (event.origin !== 'https://www.facebook.com' && event.origin !== 'https://web.facebook.com') return;
      try {
        const data = JSON.parse(event.data);
        if (data.type === 'WA_EMBEDDED_SIGNUP') {
          if (data.event === 'FINISH') {
            const { waba_id, phone_number_id } = data.data;
            onSuccess({ wabaId: waba_id, phoneId: phone_number_id });
          }
        }
      } catch {}
    };
    window.addEventListener('message', handleMessage);
    return () => window.removeEventListener('message', handleMessage);
  }, [onSuccess]);

  const launchSignup = () => {
    (window as any).FB.login(
      (response: any) => {
        if (response.authResponse?.code) {
          console.log('Code exchanged successfully');
        }
      },
      {
        config_id: process.env.NEXT_PUBLIC_META_CONFIG_ID,
        response_type: 'code',
        override_default_response_type: true,
        extras: {
          setup: {},
          sessionInfoVersion: '4' // Mandatory v4
        }
      }
    );
  };

  return (
    <button onClick={launchSignup} className="px-4 py-2 bg-emerald-600 text-white font-medium rounded-lg">
      Connect WhatsApp Business
    </button>
  );
}

4. How to isolate tenant accounts, API credentials, and webhooks in multi-tenant SaaS?

Proper isolation is vital in shared multi-tenant architectures:

  • Dedicated sub-accounts with discrete WABA IDs and phone numbers.
  • Central webhook routers matching incoming events by destination phone_number_id.
  • Strict compartmentalization preventing policy violations on one tenant from impacting neighboring accounts.

5. What monetization models and margin structures should ISVs adopt?

EnvoiSMS provides wholesale pricing with tax-compliant billing. Software vendors commonly monetize through bundled software subscriptions, usage-based messaging markups, or in-app prepaid customer wallets.

Frequently asked questions

What happens if a customer attempts signup using version 3 configuration?

Since the October 15, 2026 deprecation, Meta's API returns invalid parameter errors on obsolete versions. Upgrading to version 4 is mandatory.

Do end clients need to register as Meta developers?

No. The Embedded Signup v4 flow allows non-technical business owners to authenticate using their standard Facebook business credentials.

How do clients complete Business Verification?

Tenants can send up to 250 messages daily immediately upon onboarding. Higher volumes unlock once official incorporation papers are submitted in Meta Business Suite.

How fast is customer onboarding via Embedded Signup v4?

Onboarding is instantaneous: as soon as the customer verifies the OTP code sent to their mobile device, the number is operational on the API.