> ## Documentation Index
> Fetch the complete documentation index at: https://sdk.qfapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-Service Retail Machine

> Recommended QFPay integrations for unattended machines, vending kiosks, ticketing terminals, and other self-service retail environments.

This guide helps merchants choose the appropriate QFPay APIs when integrating unattended machines, vending kiosks, ticketing terminals, smart lockers, and other self-service retail solutions.

Many self-service deployments require a combination of multiple QFPay APIs rather than a single integration.

## Suitable For

This integration scenario is recommended for merchants operating:

* Vending machines
* Self-service kiosks
* Smart lockers
* Ticketing machines
* Parking payment terminals
* Self-checkout terminals
* Other unattended retail devices

## Typical Setup

A typical self-service environment may include:

* A customer-facing display
* A QR code scanner (optional)
* A connected or embedded QFPay POS terminal
* A merchant backend for order creation and reconciliation

## Recommended Integration

| Payment Experience                                | Recommended Integration                                               | Description                                                                                  |
| ------------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Customer scans a QR code displayed on the machine | [Merchant Present Mode (MPM)](/integration/in-store/MPM)              | Generate a dynamic payment QR code for wallet payments and display it on the machine screen. |
| Customer pays using a bank card or Octopus        | [POS API](/zh-hant/integration/in-store/pos-api/ecr)                  | Trigger payment collection on a connected QFPay POS terminal.                                |
| Customer presents a wallet barcode for scanning   | [Consumer Present Mode (CPM)](/integration/in-store/CPM) *(Optional)* | If the machine is equipped with a barcode scanner, wallet barcode payments can be supported. |

## Example Solution

### Self-Service Payment Flow

A common self-service payment scenario where customers purchase products or services directly from an unattended machine.

1. Customer selects products or services.
2. The merchant backend creates an order and calculates the payable amount.
3. For wallet payments, call[Merchant Present Mode (MPM)](/integration/in-store/MPM)to generate a dynamic payment QR code.
4. For card or Octopus payments, call [**POS API**](/integration/in-store/pos-api/ecr) to initiate payment on the connected QFPay POS terminal.
5. The merchant backend receives the payment result through [**Asynchronous Notifications**](/integration/common-api/async-notifications).
6. If necessary, verify the payment result using [**Transaction Enquiry**.](/integration/common-api/transaction-enquiry)
7. Dispense goods or provide the requested service only after payment has been confirmed successfully.

## Best Practices

<Warning>
  Always confirm the payment result before dispensing goods or providing services.

  QFPay recommends:

  * Use [Asynchronous Notifications](/integration/common-api/async-notifications) as the primary mechanism for receiving payment results.
  * Use [**Transaction Enquiry**](/integration/common-api/transaction-enquiry) whenever the payment status is uncertain.
  * Never rely solely on customer actions or terminal responses to determine payment success.
  * Release goods only after the transaction has been confirmed successfully.

  This helps prevent revenue loss caused by network interruptions, delayed notifications, or uncertain payment states.
</Warning>

<Tip>
  Design your machine to handle payment failures, timeouts, and communication interruptions gracefully. Customers should always receive clear status updates, and unfinished transactions should be recoverable by the merchant backend.
</Tip>

## Related Documentation

<CardGroup cols={2}>
  <Card title="Merchant Present Mode (MPM)" href="/integration/in-store/MPM">
    Generate dynamic QR codes for customer wallet payments.
  </Card>

  <Card title="POS API" href="/integration/in-store/pos-api">
    Trigger card and Octopus payments on QFPay POS terminals.
  </Card>

  <Card title="Consumer Present Mode (CPM)" href="/integration/in-store/CPM">
    Scan customer wallet barcodes for payment collection.
  </Card>

  <Card title="ECR Integration" href="/integration/in-store/pos-api/ecr-https">
    Connect merchant systems with QFPay POS terminals.
  </Card>

  <Card title="Transaction Enquiry" href="/integration/common-api/transaction-enquiry">
    Query transaction status to confirm payment results.
  </Card>

  <Card title="Asynchronous Notifications" href="/integration/common-api/async-notifications">
    Receive real-time payment notifications from QFPay.
  </Card>
</CardGroup>

## Next Steps

Once you have identified the appropriate integration methods for your self-service solution, continue with the corresponding API documentation to begin implementation.
