> **Description:** This flow uses a static QR code that directs the user to their Vipps or MobilePay app.

# QR to app

**Also covered in In-person payments**

This flow is also documented in [In-person payments -> Static QR -> Merchant Callback QR](https://developer.vippsmobilepay.com/docs/recommended-flows/in-store/README.md#merchant-callback-qr), which covers unmanned location scenarios including vending machines, trust shops, and self-service kiosks.

Customer scans a static QR code posted on the vending machine, approves a maximum amount in their app, makes their product selection, and is charged only for what they selected.

Flow diagram: 4-step QR direct-to-app payment process. (1) Customer scans a sticker at a kiosk or vending machine. (2) Merchant initiates a payment request. (3) Customer selects item from kiosk/vending machine. (4) The payment for the item(s) is confirmed.

1. **Customer scans QR** - Customer scans the merchant callback QR code posted on the vending machine.
1. **Receive callback** - Your system receives a webhook with the customer token.
1. **Initiate payment** - Send payment request for the maximum amount (most expensive item) with `userFlow: "WEB_REDIRECT"`.
1. **Customer authorizes** - Customer approves the reserved amount in their app.
1. **Customer makes selection** - Customer selects the product on the vending machine.
1. **Capture actual amount** - Capture only the amount for the selected product (partial capture).
1. **Cancel remaining** - Release the unused reserved amount.

**Use when you don't have a screen**

This flow works for unmanned locations without customer-facing screens where you can't display a dynamic QR code.

**Regulatory requirement**

Per regulations, specify `"customerInteraction": "CUSTOMER_PRESENT"`.

View sequence diagram

Static QR directing to the app

```mermaid
sequenceDiagram
    autonumber
    actor C as Customer
    participant M as Merchant
    participant QR as QR API
    participant ePayment as ePayment API
    participant Webhooks as Webhooks API
    participant ordermanagement as Order Management API

    M->>QR: Create Merchant Callback QR
    C->>C: Customer scans QR
    Webhooks-->>M: Get notification of scan
    M->>M: Add product to sale
    M->>ePayment: Initiate payment request with order details
    ePayment->>C: Request payment
    C->>C: Customer clicks pay
    Webhooks-->>M: Webhook with status of payment authorization
    M->>ePayment: Capture amount due
    ePayment-->>M: Check the status of capture
    M->>ePayment: Cancel payment (release remaining amount)
    M->>ordermanagement: Attach order details showing amount paid
```

  Merchant creates a Merchant Callback QR code via the QR API.
  Customer scans the QR code.
  Webhooks API notifies the merchant of the scan.
  Merchant adds the product to the sale.
  Merchant initiates a payment request with 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 amount due via the ePayment API.
  ePayment API returns the status of the capture.
  Merchant cancels the remaining reserved amount (releases it) via the ePayment API.
  Merchant attaches order details showing the amount paid via the Order Management API.

## Technical details

- [How the QR API works with merchant callback](https://developer.vippsmobilepay.com/docs/APIs/qr-api/how-it-works/qr-merchant-callback-api-howitworks.md) - Visual walkthrough of the flow
- [Partial capture](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/operations/capture.md#partial-capture) - Capture only actual amount
- [Cancel after partial capture](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/operations/cancel.md#cancel-after-a-partial-capture) - Release remaining amount

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