> For the complete documentation index, see [llms.txt](https://docs.payengine.co/payengine-api-v2.5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payengine.co/payengine-api-v2.5/transactions/barcode-scan.md).

# Barcode Scan

{% hint style="warning" %}
This API is only supported for certain Pax terminals with camera scan support.
{% endhint %}

## Scan a barcode using a px device

<mark style="color:green;">`POST`</mark> `https://<Platform-host>/api/device/scan`

The Barcode Scan API allows you to retrieve barcode scan result from a device using its `deviceId`. The API accepts a `deviceId` parameter in the request and returns the scan results, including the barcode value abd type.

**Request**

| Name                                              | Type   | Description                        |
| ------------------------------------------------- | ------ | ---------------------------------- |
| merchant\_id<mark style="color:red;">\*</mark>    | string | Merchant ID                        |
| data.device\_id<mark style="color:red;">\*</mark> | string | Registered and connected device ID |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "merchant_id": "<merchant_id>",
  "device_id": "<deviceID>",
  "data": {
      "barcode_value": "123456789012",
      "barcode_type": "QRCode | 2DBarcode | 3Dbarcode"
  }
}
```

{% endtab %}
{% endtabs %}

### Overview
