> **Description:** Integration guide for physical store payments with POS systems and terminal interactions.

# How ePayment works in the store

Enable your customers to pay easily and quickly from their own phone, without the need to touch the terminal.
Offer contactless payment to your customers by integrating the ePayment API into your POS system.

It is also possible to use our simpler solution, [*Open amount*](https://vippsmobilepay.com/en-NO/in-person/open-amount),
but then the amount must be entered manually at checkout, and there will be some follow-up with accounting and settlement.

## Details

### 1. Add products to sell

Add the products that the customer wants to buy in the POS system.

Screenshot: POS system showing a list of items on the left and payment method options on the right, including a highlighted "Pay with Vipps" or "Pay with MobilePay" button alongside card, cash, and other options.

### 2. Enter the customer's phone number

When the customer is ready to pay, choose *Pay with Vipps/MobilePay*.
Enter the customer's phone number.

Screenshot: POS system showing order items on the left and a phone number input field with a Next button on the right.

### 3. Merchant creates a payment request

The merchant creates a payment request with: [`POST:/epayment/v1/payments`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml).
The customer will get the confirmation screen in their app.

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

Detailed example for payment request

Set `userFlow` to `PUSH_MESSAGE`. This will send a push directly to the customer.
You may attach the order details simultaneously.

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 '{
  "amount": {
    "value": 49800,
    "currency": "NOK"
  },
  "paymentMethod": {
    "type": "WALLET"
  },
  "customer": {
    "phoneNumber": 4712345678
  },
  "receipt":{
    "orderLines": [
      {
        "name": "Orange hoodie",
        "id": "hoodie1234",
        "totalAmount": 29900,
        "totalAmountExcludingTax": 23920,
        "totalTaxAmount": 5980,
        "taxRate": 2500,
      },
      {
        "name": "White T-shirt",
        "id": "tshirt1234",
        "totalAmount": 19900,
        "totalAmountExcludingTax": 15920,
        "totalTaxAmount": 3980,
        "taxRate": 2500,
      },
    ],
    "bottomLine": {
      "currency": "NOK",
      "posId": "Butikken-23412",
      "receiptNumber": "0527013501"
    },
  },
  "reference": 2486791679658155992,
  "userFlow": "PUSH_MESSAGE",
  "returnUrl": "http://example.com/redirect?reference=2486791679658155992",
  "paymentDescription": "Payment to Butikken",
  "customerInteraction": "CUSTOMER_PRESENT"
}'
```

### 4. The customer confirms payment in the app

The customer confirms the payment in their Vipps  or MobilePay  app.
The ePayment API automatically reserves the payment and provides confirmation of the successful payment.

Screenshot: App payment screen showing the merchant name, order description, selected payment card, and a Pay button.

To determine that the user has authorized the payment, poll with the
[`GET:/epayment/v1/payments/{reference}`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml)
request. See the [guidelines for polling](https://developer.vippsmobilepay.com/docs/knowledge-base/polling-guidelines.md).
Alternatively, you can [register for a webhook](https://developer.vippsmobilepay.com/docs/APIs/webhooks-api/api-guide.md)
to alert you when your payment is authorized.

### 5. The merchant registers the payment

Register the payment in your POS system.

Screenshot: POS system showing order items on the left and a large green checkmark with "Payment completed" on the right, indicating successful payment registration.

### 6. The merchant captures the payment

Capture the order through the ePayment API.
The payment will be transferred to your account. This may take 2 or 3 days, depending on the bank.

## Next steps

See [Recommended flows: In-store payments](https://developer.vippsmobilepay.com/docs/recommended-flows/in-store/README.md) for an example of this flow with a scanner.

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