> **Description:** Integrate loyalty programs directly into your POS system with Vipps MobilePay, combining smooth payments with automatic customer rewards.

# In-store payments with customer club

Customer provides their phone number at checkout to identify themselves and optionally enroll in your loyalty program, then completes payment seamlessly.

Flow diagram: 6-step in-store loyalty payment process. (1) Get the customer's phone number. (2) POS checks if the phone number matches a store membership. (3) The user shares info through Vipps/MobilePay and registers as a member. (4) POS sends the payment request. (5) The user pays. (6) Purchase is registered on the member account.

1. **Get customer's phone number** - Ask the customer for their phone number (verbally or via manual entry), or scan their personal QR code if you have a scanner.
1. **Check membership** - POS checks if the phone number matches a store membership.
1. **Request enrollment** - If not a member, send a push notification to request enrollment through the Login API.
1. **Customer registers** - The customer shares info through Vipps MobilePay and registers as a member.
1. **Add products** - Scan and add items to the POS system.
1. **Send payment request** - POS sends the payment request to the customer's phone number.
1. **Customer pays** - The customer authorizes payment in their app.
1. **Register purchase** - Purchase is registered on the member account.

**Optional: QR code scanner**

If you have a QR code scanner, customers can scan their personal QR code from the Vipps MobilePay app instead of providing their phone number verbally or manually. This speeds up the process and reduces errors.

View sequence diagram

In-store payment with customer club flow

```mermaid
sequenceDiagram
    autonumber
    actor C as Customer
    participant M as Merchant
    participant login as Login API
    participant q as QR API
    participant ePayment as ePayment API
    participant Webhooks as Webhooks API

    C->>M: Provide phone number (verbally, manual entry, or scan QR)
    opt If QR code is scanned
        M->>q: Exchange QR code for phone number
    end
    M->>M: Check membership
    M->>login: If user is not a member, request membership
    login->>C: Consent request
    C->>login: Give consent
    M->>M: If user consents, enroll in membership program
    M->>M: Add product to sale
    M->>ePayment: Initiate payment request and attach order details
    ePayment->>C: Request payment
    C->>C: Customer clicks pay
    Webhooks-->>M: Webhook with status of payment authorization
    M->>ePayment: Capture payment
    ePayment-->>M: Status of capture
    M->>M: Verify status of POS matches capture
```

  Customer provides their phone number verbally, by manual entry, or by scanning a QR code.
  If a QR code was scanned: merchant exchanges the QR code for the customer's phone number via the QR API.
  Merchant checks membership status.
  If the user is not a member: merchant requests membership via the Login API, which sends a consent request to the customer. Customer gives consent.
  If the customer consents, merchant enrolls them in the membership program.
  Merchant adds the product to the sale.
  Merchant initiates a payment request and attaches order details via the ePayment API.
  ePayment API requests payment from the customer.
  Customer clicks pay.
  Webhooks API sends the merchant a webhook with the payment authorization status.
  Merchant captures the payment via the ePayment API.
  ePayment API returns the status of the capture.
  Merchant verifies that the POS status matches the capture.

## Technical details

- [Merchant initiated login](https://developer.vippsmobilepay.com/docs/APIs/login-api/how-it-works/merchant-initiated-login-howitworks.md) - Enroll customers in loyalty program
- [Personal QR feature](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/personal-qr.md) - Implementation guide for personal QR payments

> **Full site overview:** For every page in this documentation, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).
