> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/adk-os-platform/readme/developing-applications/managing-cp-applications.md).

# Managing CP applications

Create, package, activate, and manage Commerce Platform applications on VOS3 using the packman tool.

Commerce Platform (CP) applications are HTML and ECMAScript applications that are triggered by a native payment application during idle or transaction flows.

For a full description of the CP runtime model, triggers, and API, refer to the ADK Programmers Guide.

## Requirements

Running a CP application on VOS3 requires three separately signed components:

| **Component**       | **Signing**    | **Description**                                             |
| ------------------- | -------------- | ----------------------------------------------------------- |
| Payment application | Sponsor-signed | Triggers the CP application at idle or during a transaction |
| CP application      | System-signed  | The HTML and ECMAScript application package                 |
| CP app activation   | Sponsor-signed | Activates a specific CP application for use                 |

## Create a CP app

### From a zip file

Convert a CP application in legacy ZIP format directly into a DL file:

```
packman.py cpapp_convert -t vos3 -s dev -z <cpapp-zip> -o <dlfile>
```

Example:

```
packman.py cpapp_convert -t vos3 -s dev -z cpapp-123345678.zip -fo dl.cpapp-123345678.tar
```

### From a directory

Build a CP application from a directory like any other VOS3 bundle:

```
packman.py build -t vos3 -s dev -i <input-dir> -d <dlfile>
```

Example:

```
packman.py build -t vos3 -s dev -i cpapp-123345678 -d dl.cpapp-123345678.tar
```

### AppDev variant (APP-DEV devices only)

During development on an APP-DEV device, a CP app can be packaged as an appdev variant. This installs the app to a read-write location on the device, allowing in-place editing without reinstalling.

Convert from a zip file:

```
packman.py cpapp_convert -t vos3 -s dev --cpapp_type appdev -z <cpapp-zip> -o <dlfile>
```

Convert from an existing CP app DL file:

```
packman.py cpapp_convert -t vos3 -s dev --cpapp_type appdev -d <cpapp-dl> -o <appdev-cpapp-dl>
```

When development is complete, convert back to a standard production CP app:

```
packman.py cpapp_convert -t vos3 -s dev --cpapp_type prod -d <appdev-cpapp-dl> -o <dlfile>
```

{% hint style="info" %}
An appdev CP app can also be extracted and rebuilt from a directory using the packman `extract` and `build` commands.
{% endhint %}

## Create a CP app removal

Generate a removal DL file from an existing CP app DL file:

```
packman.py gen_removal -t vos3 -s dev -d <dlfile> -o <remove_dlfile>
```

Example:

```
packman.py gen_removal -t vos3 -s dev -d dl.cpapp-123345678.tar -o dl.cpapp-123345678_remove.tar
```

## Create a CP app activation

A CP app must be activated before it will run. Generate an activation DL file from the CP app DL file:

```
packman.py gen_activation -t vos3 -s dev -d <cpapp> -o <cpapp_activation>
```

Example:

```
packman.py gen_activation -t vos3 -s dev -d dl.cpapp-123345678.tar -o dl.cpapp-123345678_activate.tar
```

The activation DL file installs an activation file in the `usr1` home directory.

## Create a CP app activation removal

Generate a de-activation DL file from the activation DL file:

```
packman.py gen_removal -t vos3 -s dev -d <activation_dlfile> -o <remove_dlfile>
```

Example:

```
packman.py gen_removal -t vos3 -s dev -d dl.cpapp-123345678_activate.tar -o dl.cpapp-123345678_disable.tar
```

The de-activation DL file removes the activation file from the `usr1` home directory.

## Development on APP-DEV devices

A standard CP app package is installed to a read-only location on the device.

An appdev CP app package is installed to a read-write location: `/mnt/appdata/versioned/globalshare/cpapps`

This allows developers to edit the CP application files directly on the device without needing to reinstall after each change.

{% hint style="warning" %}
For a CP app installed in the read-write globalshare location to run, no regular (read-only) CP app of the same name must be installed on the device.
{% endhint %}

## Migrating from VOS2

| **Area**              | **Change**                                                                                                                                                                                                 |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Packaging and signing | VOS2 ZIP packaging and signing is no longer supported. CP applications are regular VOS3 packages installed by any available means (local or remote). Use `cpapp_convert` to migrate existing ZIP packages. |
| Activation            | CP applications must now be activated by installing a sponsor-signed activation package. This is a new requirement not present on VOS2.                                                                    |
| Triggers and API      | The internal functioning of CP applications — triggers, API, and ECMAScript behavior — is unchanged from VOS2.                                                                                             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verifone.com/adk-os-platform/readme/developing-applications/managing-cp-applications.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
