> For the complete documentation index, see [llms.txt](https://acestudios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acestudios.gitbook.io/docs/jobs-and-economy/p2p-vehicle-marketplace.md).

# P2P Vehicle Marketplace

A player-to-player vehicle marketplace for sales, rentals and test drives.

**P2P Vehicle Marketplace** (`ace_p2pmarketplace`) lets players list their own vehicles for **sale** or **rent**. Other players can browse, search and filter a live marketplace, **test drive** before buying, and manage their **earnings**, all in one modern NUI. Admins get moderation tools, and the server owner can collect a **transaction fee** on every deal.

|                   |                                                                                                              |
| ----------------- | ------------------------------------------------------------------------------------------------------------ |
| **Resource name** | `ace_p2pmarketplace`                                                                                         |
| **Version**       | 2.0.0                                                                                                        |
| **Frameworks**    | ESX Legacy, QBCore, Qbox (`qbx_core`), auto-detected                                                         |
| **Dependencies**  | `oxmysql`, **OneSync**                                                                                       |
| **Optional**      | `screenshot-basic` (photos), garage resource, vehicle keys resource, `ox_lib` / `okokNotify` (notifications) |
| **Database**      | Yes. See [Database](/docs/jobs-and-economy/p2p-vehicle-marketplace/database.md)                              |
| **Languages**     | English, German, Spanish, French, Portuguese, Arabic (right-to-left)                                         |

## Features

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

* **Sell or rent** owned vehicles with a title, description, category and price
* **Marketplace** with search, filters and pagination
* **Listing details** view with a single checkout
* **Test drives** with a time limit, distance limit and cooldown
* **Rentals** by hour, day, week or month, with automatic return when they expire
* **In-game photo booth** to capture real vehicle photos for listings
* Pay by **bank or cash**, and choose the **delivery garage**
* **Earnings**, with partial claims
* Open with `/marketplace`, an optional keybind, or marketplace locations
  {% endtab %}

{% tab title="Server owners" %}

* **Admin tab** for moderating listings
* **Fees tab**: collect a configurable percentage of every sale or rental
* **Auto-detection** of framework, locale, accounts, garage resource, public garages, key resource, photo storage and Discord logging
* **Garage integrations:** okokGarage, esx\_garage, qb-garages, qbx\_garages, custom
* **Key integrations:** qbx\_vehiclekeys, qb-vehiclekeys, wasabi\_carlock, qs-vehiclekeys, MrNewbVehicleKeys, Renewed-Vehiclekeys, built-in, custom
* **Photo storage** on your server or on Fivemanage
* **Discord logs** for listings, purchases, rentals and earnings claims
* **Your server logo** in the UI
* **Version check** and **integrity check** on start
  {% endtab %}

{% tab title="Safety" %}

* Only vehicles that are **stored, not impounded and not spawned** can be listed, sold or rented
* Ownership is re-checked inside the database transaction at the moment of sale
* Buyers confirm the price, so nothing is charged if the seller changed it
* Charges that don't complete are **refunded**, immediately or on next login
* Earnings and fee claims that can't be paid right away are **paid on next login**
* When a rental ends, **every spawned copy** of the vehicle is deleted before it's returned
* Admin and fee actions are **validated on the server**
* Secrets (API keys, webhooks) are kept in **`server.cfg` convars**, never in client-readable files
  {% endtab %}
  {% endtabs %}

## Quick start

{% stepper %}
{% step %}

### Import the SQL

Import `sql/install.sql`. See [Database](/docs/jobs-and-economy/p2p-vehicle-marketplace/database.md).
{% endstep %}

{% step %}

### Ensure it after your framework

Start it after your framework, `oxmysql`, your garage and key resources, and `screenshot-basic`.
{% endstep %}

{% step %}

### Set your locations

Set `Config.Locations` to your marketplace access points.
{% endstep %}

{% step %}

### Check the console

Look for the `[ACE VEHICLE MARKET] [CONFIG] detected settings` block.
{% endstep %}
{% endstepper %}

{% content-ref url="/pages/Bu2MfnVdxsGw5hL8HmLk" %}
[Installation](/docs/jobs-and-economy/p2p-vehicle-marketplace/installation.md)
{% endcontent-ref %}
