# Joining at the till

> Preview: sign a customer up at the till by app QR, or by phone with SMS confirmation.

Source: https://developers.loyx.se/preview/join-at-till/

**Preview: this feature is planned and not live. The shape may change. Do not build against it yet.**

:::caution[Preview — not live, shape may change]
This feature is planned. Nothing on this page can be called yet.
:::

A customer who is not yet a member of the brand can join during the sale, in one of two ways. Neither asks the cashier to collect consent or personal details: the customer confirms on their own phone.

## Scan to join

The customer already has the LoyX app and shows its QR code at a brand they have not joined.

- Identify answers that the code belongs to a LoyX user who can join, instead of "not found".
- One join call with the same code makes them a member at once. The code is used up.
- The brand's welcome offer is granted by the normal join flow and can show on the card within seconds.

## Phone and SMS

The customer gives a phone number. LoyX sends an SMS with a link. The customer opens it, signs in and accepts the terms on their own phone.

```
 join (phone) ──► PENDING ── customer confirms on phone ──► member ACTIVE
                    │                                         · held purchases credited
                    │                                         · welcome offer granted
                    ├─ not confirmed in about 30 days ──► EXPIRED, record deleted
                    └─ cancelled by staff or customer ──► CANCELLED
```

- **The till never waits for the SMS.** It gets a `join_id` straight away and finishes the sale.
- **Purchases while pending are held**, not lost. Put the `join_id` on the sale; it is credited when the customer confirms.
- **No rewards while pending.** Rewards and the welcome offer arrive on confirmation.
- **Marketing is off by default** for till sign-ups. The app asks for opt-in later.
- Asking again for the same number returns the same pending sign-up. SMS resends are limited per number.

## Planned shape

```
POST /v1/joins
{
  "context": { "store": { "external_store_id": "store12" } },
  "method": "phone",
  "phone": "0701234567"
}

201
{ "result": "pending", "join": { "join_id": "...", "status": "pending", "expires_at": "...", "sms": "queued" } }
```

Expected answers include `member_exists` when the number already belongs to a member (switch to that member) and `join_disabled` when the brand does not allow till sign-up.

## Events

`join.created`, `join.confirmed` (with the new member id), `join.expired`, `join.cancelled` and `member.joined`. See [Webhooks](/preview/webhooks/).
