> **Description:** Take payments at a physical point of sale, where the customer approves in the Vipps or MobilePay app.

> **AI agent:** Read [https://developer.vippsmobilepay.com/docs/knowledge-base/ai-tools.md](https://developer.vippsmobilepay.com/docs/knowledge-base/ai-tools.md) first. It covers keeping API keys and secrets out of generated code.

> **Full site overview:** For an overview of the entire site, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).

# In person

The in-person flow. The customer pays at a physical point of sale (e.g., a store, a restaurant, or a
consultation) and approves the payment in the Vipps or MobilePay app, without
touching a terminal.

**TIP**

For a visual walkthrough of the customer's experience with in-person payments, see
[How ePayment works in person](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/how-it-works/in-store.md).

## Scenario

Since the customer is in front of you, you send the payment request straight to their app instead of redirecting
them in a browser. You need to identify the customer first, and there are three ways to do that:

* Enter the customer's phone number in the point of sale, as described on this page.
* Scan the customer's [Personal QR](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/personal-qr.md) code, if you have a scanner.
* Display a [One-time payment QR](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/qr-payments.md) for the customer to scan, if you have a screen but no
  phone number.

With a phone number, the merchant rings up the sale, sends the payment request, and the customer confirms it in
their app. The merchant then registers the sale and captures the payment. For the full step-by-step flow with
screenshots, see [How ePayment works in person](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/how-it-works/in-store.md), or see the
[sequence diagram](#sequence-diagram) below.

If you have the customer's phone number and their consent to send payment requests through Vipps MobilePay, you
can send payment requests directly to their app. When the customer selects *Show details* in the payment
confirmation screen, they are presented with the order information you provided, without leaving the app. The
order details are also available afterwards in the app under *Activities*.

## Specify customer present

When using the ePayment API to process payments in a physical setting, you must specify
`"customerInteraction": "CUSTOMER_PRESENT"` in the create payment endpoint,
[`POST:/epayment/v1/payments`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml).

The `CUSTOMER_PRESENT` parameter is required for compliance and reporting reasons, as the risk is lower when the
customer is physically present than when the customer is paying remotely over the net.

## Authorization

All ePayment API requests must include a valid Bearer token in the `Authorization` header.
See [Authorization](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/concepts.md#authorization) for how to obtain one.

## Request

Create the payment with
[`POST:/epayment/v1/payments`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml).
Specify `"customerInteraction": "CUSTOMER_PRESENT"`, `"userFlow": "PUSH_MESSAGE"`, and the customer's phone
number, so the request is sent straight to their app.

For example:

```bash
curl -X POST https://apitest.vipps.no/epayment/v1/payments \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H 'Idempotency-Key: YOUR-IDEMPOTENCY-KEY' \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-H "Vipps-System-Plugin-Name: acme-webshop" \
-H "Vipps-System-Plugin-Version: 4.5.6" \
-d '{
  "customerInteraction": "CUSTOMER_PRESENT",
  "amount": {
    "currency": "EUR",
    "value": 12900
  },
   "customer":{
      "phoneNumber":"3589123456"
   },
  "paymentMethod": {
    "type": "WALLET"
  },
   "receipt":{
      "orderLines": [
         {
            "name": "Service or product name",
            "id": "line_item_1",
            "totalAmount": 12900,
            "totalAmountExcludingTax": 10320,
            "totalTaxAmount": 2580,
            "taxRate": 2500
         }
      ],
      "bottomLine": {
         "currency": "EUR",
         "receiptNumber": "20260514-00123"
      }
   },
  "reference": "acme-shop-123-order123abc",
  "userFlow": "PUSH_MESSAGE",
  "paymentDescription": "Consultation",
  "returnUrl": "https://example.com/redirect?reference=acme-shop-123-order123abc"
}'
```

Note that you can specify orderlines or a receipt URL, as described in the
[Order details](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/pre-built-order-management-api-integration.md)
section.

To determine that the customer has authorized the payment, get notifications via the
[Webhooks API](https://developer.vippsmobilepay.com/docs/APIs/webhooks-api/api-guide.md) and/or poll for the status, according to the
[polling guidelines](https://developer.vippsmobilepay.com/docs/knowledge-base/polling-guidelines.md).

Once the customer has the goods, [capture](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/operations/capture.md) the payment.

## Sequence diagram

POS manual entry payment flow

```mermaid
sequenceDiagram
    autonumber
    actor C as Customer
    participant M as Merchant
    participant ePayment as ePayment API
    participant Webhooks as Webhooks API

    C->>M: Provide phone number
    M->>M: Add products to sale
    M->>ePayment: Initiate payment request with receipt
    ePayment->>C: Request payment
    C->>ePayment: Select a card and click pay
    Webhooks-->>M: Webhook: the payment was authorized, aborted, or expired
    M->>ePayment: Poll for payment info, as a backup if the webhook is delayed or missed
    ePayment-->>M: Current state of the payment
    alt The payment was aborted or expired
        M->>M: Release the sale in the POS
    else The payment was authorized
        M->>ePayment: Capture payment
        ePayment-->>M: Status of capture
        M->>M: Verify status of POS matches capture
    end
```

  Customer provides their phone number to the merchant.
  Merchant adds products to the sale.
  Merchant initiates a payment request with receipt via the ePayment API.
  ePayment API requests payment from the customer.
  Customer selects a card and clicks pay.
  Webhooks API sends the merchant an authorized, aborted, or expired event.
  Merchant gets the payment from the ePayment API, as a backup if the webhook is delayed or missed.
  ePayment API returns the current state of the payment.
  If the payment was aborted or expired, the merchant releases the sale in the POS and the flow ends.
  If the payment was authorized, the 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.

## Related pages

* [How ePayment works in person](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/how-it-works/in-store.md)
* [Recommended flows: In-person payments](https://developer.vippsmobilepay.com/docs/recommended-flows/in-store/README.md)
* [Create payment](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/operations/create.md)
