Skip to content

createWhatsAppLink

function createWhatsAppLink(phone, message?): string | null;

Defined in: whatsapp.ts:12

Creates a WhatsApp click-to-chat link for a Pakistani mobile number.

Accepts local, international, and short phone formats.

Parameter Type Description
phone string Pakistani mobile number in any supported format
message? string Optional pre-filled message (URL-encoded)

string | null

WhatsApp wa.me link, or null if the phone number is invalid