# createWhatsAppLink

Source: https://pakdatakit.dev/api/typescript/whatsapp/functions/createwhatsapplink/

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

Defined in: [whatsapp.ts:12](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/whatsapp.ts#L12)

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

Accepts local, international, and short phone formats.

## Parameters

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

## Returns

`string` \| `null`

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