# Product share links for D2C apps: build the in-app share button that opens the product

> How to build product share links for a D2C app's share button: one link per product or per share, keys, the WhatsApp card, who-shared credit and the sale.

Source: https://straitlink.in/blog/product-share-links-d2c-apps/

Indian shoppers share products. A kurta goes to the family group for a vote, a phone case goes to a friend with "this one?", and a reseller forwards twenty products a day to their own customers on WhatsApp. That reseller pattern, made familiar by apps like Meesho, turned the share button into a sales channel. For a D2C app, **product share links** are the links your users create when they tap Share on a product. They aren't the links your marketing team sends. They're made by customers, at the moment of sharing, and they go wherever the customer takes them.

That changes the design. A campaign link is made once by someone on your team who can check it. A share link is made thousands of times by your app, has to look right in a WhatsApp chat without anyone checking, and has to open the product for someone who may never have heard of your brand. This post covers how to build that share button. If you're after the links your brand sends (broadcasts, Instagram bios, sale campaigns), read our [ecommerce deep linking guide](https://straitlink.in/blog/ecommerce-deep-linking-whatsapp-instagram-product-links/) instead.

## What a share link has to do

When someone taps a product link a friend sent, one of four things should happen:

- **They have your app:** it opens on that product, with the variant the sharer picked.
- **They don't have your app, on Android:** they go to the product page on your website, or to Google Play, and if they install, the app opens on the product after the first launch.
- **They're on iPhone without the app:** the same, through the App Store. In Strait, the match after an App Store install is opt-in.
- **They're on a laptop:** the product page on your website.

And afterwards you want to know two things: did shares turn into sales, and who shared?

## Two ways to build it

### One link per product

Create a Strait link for every product ahead of time, and have the share button send the link that belongs to the product on screen. `POST /v1/links/batch` creates up to 500 links in one call, and each item is checked on its own, so one bad item never fails the batch, and re-running an import is safe because an existing slug is a `409` for that item only ([batch create](https://straitlink.in/docs/api/)).

This suits catalogues that change slowly. The link for a product is the same no matter who shares it, which keeps your link count equal to your product count. Its weakness: every share of a product looks the same, so you can't tell one sharer from another by the link alone.

### One link per share

Create a new link each time someone taps Share, with details of that share in the destination. This needs your server. Links are created with a **secret key**, and a secret key must never ship in an app, because anyone can read it out of an app or a web page. The publishable key that does live in your app can resolve links, report opens, match installs and send events. It can't create links ([keys](https://straitlink.in/docs/keys/)).

So the flow is:

1. The user taps Share.
2. Your app asks your own server for a link, with the product id and its own auth.
3. Your server calls `POST /v1/links` with the secret key, using a slug that includes a random part (slugs are unique within your workspace: letters, digits, `-` and `_`, up to 64 characters).
4. Your server returns the `shortUrl`, and the app opens the system share sheet with it.

Our docs have this end to end for React Native, including the server endpoint and the share button: [create links from a React Native app](https://straitlink.in/docs/sdks/react-native/create-links/). Check who is calling before your server creates a link for them, as you would for any write.

Mind your plan's link limit if you go this way. The Free plan allows 100 new links a month, which suits testing; Starter and above have no link limit ([pricing](https://straitlink.in/pricing/)).

### Which to pick

| | One link per product | One link per share |
|---|---|---|
| Works without your server | Yes, links made in advance | No, your server creates each link |
| Knows who shared | Only with a parameter you add | Yes, in the destination |
| Link count | Your catalogue size | One per share |
| Suits | Small catalogues, simple sharing | Resellers, referral rewards, "shared by" labels |

A middle path many teams land on: one link per product, plus a per-share parameter for the sharer. More on that below.

## Make the WhatsApp card do the selling

Most product shares in India end up in a WhatsApp chat, and the first thing the friend sees is the preview card, not the link. Set `title`, `description` and `imageUrl` on each link. For a product that's the product name, the price or a one-line pitch, and the product photo. WhatsApp fetches the link to build the card; Strait answers those preview requests with the card and never counts them as taps.

Paste a link into the [link preview checker](https://straitlink.in/tools/social-preview/) to see what the card will look like before you ship the share button. If the image is missing in WhatsApp, our post on [WhatsApp link previews](https://straitlink.in/blog/whatsapp-link-preview-not-showing-deep-links/) goes through the usual causes.

Let the user edit the message text in the share sheet, but keep the link itself on its own line at the end. A link buried in the middle of a long message is easier to break when someone edits it.

## Fallbacks: send people to the product, not your home page

The person tapping a shared link didn't choose your brand; their friend did. If they don't have the app, the product page on your website usually keeps the sale better than a store page. In Strait you set what Android does when the app isn't installed (Google Play or your website) once for the workspace. A link's destination is your product's web URL, so "website" means that product's page. Each link can also carry its own `androidFallbackUrl`, `iosFallbackUrl` and `desktopUrl` if you want a different page per platform. Computers go to the `desktopUrl`, or to the destination when there isn't one.

If the product sells out or is delisted, change the link's destination with `PATCH /v1/links/{slug}` to the category page, or set an expiry with an after-expiry web page. Shared links live on in chats for months; a dead product page is a wasted tap.

## Know which channel a share went to

When a link is tapped, Strait labels the tap's channel with the first of these that has a value ([how taps are labelled](https://straitlink.in/docs/api/)):

1. the tap URL's `utm_source`;
2. the link destination's `utm_source`;
3. the in-app browser it was tapped in (WhatsApp, Instagram and others);
4. the referring app or website.

For share links, the third and fourth usually do the work: a share opened from WhatsApp is labelled `whatsapp` without you doing anything, as long as the tap goes through a browser or WhatsApp tells us it referred it. If your app offers separate "Share to WhatsApp" and "Copy link" buttons, append `?utm_source=whatsapp` or `?utm_source=copy` to the short link per button. The tap URL's value wins, so the label is exact.

## Who shared: credit the sharer

Resellers and referral programmes need to know who sent the buyer. The way that works today: put the sharer's id in the destination's query, such as `https://shop.example.com/product/42?ref=u_8812`. When the link opens your app, the destination's query arrives in `e.params`, on a direct open and on the first open after an install. Your app passes it to your server along with the order.

Use an internal id or an invite code, never a phone number or email. Shared links are forwarded beyond the person they were sent to, and anything in them is readable by everyone in the chat.

Strait's referrals feature adds a code per tap and a `referral.converted` webhook that tells your server who invited an install. It's built but in preview and not switched on yet ([referrals docs](https://straitlink.in/docs/referrals/)), so build on the destination query for now. Grant commissions and rewards on your server, after the order is confirmed, never in the app.

## Did shares sell? Track the purchase

Record the purchase in the app:

```ts
links.trackEvent('purchase', { value: 799, currency: 'INR' });
```

The SDK attaches the tap id of the most recent link open within the last 7 days, so the purchase lands on that tap's link, channel and campaign ([events and revenue](https://straitlink.in/docs/sdks/react-native/events/)). Give your share links a campaign such as `in_app_share` and Analytics shows taps, app opens, installs and revenue for shares next to your other campaigns. Each app open also says whether it was the first launch after an install, so you can see how many new customers came in through shares rather than marketing.

If you also send purchases from your server, send each purchase from one place only, or revenue is counted twice.

## A checklist before you ship the share button

- [ ] App Links verified for your link domain, checked with the [App Links checker](https://straitlink.in/tools/app-links-checker/), and Universal Links if you ship on iPhone
- [ ] No secret key anywhere in the app; links created on your server, or in advance with the batch endpoint
- [ ] Title, description and product image on every link, and the WhatsApp card checked
- [ ] Destinations are your product web URLs, so the fallback is the product page
- [ ] Sharer ids in the destination are internal ids, never phone numbers
- [ ] `trackEvent('purchase')` firing once per order
- [ ] Tapped on a real phone from WhatsApp, with the app installed and without it

## What we haven't tested

We haven't recorded an in-app share flow on a real phone end to end: a share button that asks a server for a link, a WhatsApp chat, an install, and a purchase. The pieces underneath it, a direct open from a verified link and a deferred link after a Google Play install, were tested on a real Android phone with a Play internal testing build. On iPhone, Universal Links were tested on a real iPhone (iOS 26) in October 2026; install matching is opt-in (off until you turn it on in **Settings → iPhone installs**) and proven on iPhone simulators; the real-iPhone run waits on our App Store listing.

## Sources and how we checked

- Meta for Developers, [WhatsApp Business Platform: text messages](https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/text-messages): link previews built from the first URL in a message. Read on 5 October 2026.
- The key permissions, link fields, slug rules, batch endpoint (500 links, per-item results), `PATCH` fields, the channel order and the Android not-installed setting come from Strait's engine code and its [REST API](https://straitlink.in/docs/api/), [keys](https://straitlink.in/docs/keys/) and [short links](https://straitlink.in/docs/short-links/) docs.
- The plan limits are from our [pricing](https://straitlink.in/pricing/) page. Referrals being in preview is from the [referrals docs](https://straitlink.in/docs/referrals/).
- The destination query in `e.params` and the 7-day rule for attaching a tap to an event are from the SDK code and the [create links](https://straitlink.in/docs/sdks/react-native/create-links/) and [events and revenue](https://straitlink.in/docs/sdks/react-native/events/) docs.
- Deep links and deferred links after a Play install were tested on a real Android phone with a Google Play internal testing build (October 2026).
