---
title: "inventory.purchase@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/inventory.purchase"
updated: null
---

# inventory.purchase@1 · OpenVibe.Services

HTML: [inventory.purchase@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/inventory.purchase)

# InventoryPurchase `inventory.purchase@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: inventory
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/inventory/purchase.v1.json`](/docs/contracts/inventory.purchase.json)

Universal wallet: inventory.purchase. Personal bearer reads and purchases; server-side reviewed prices.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  | - `pattern ^isp_[0-9A-HJKMNP-TV-Z]{26}$` |
| `subject` | string | yes |  | - `pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$` |
| `item_id` | string | yes |  | - `pattern ^itd_[0-9A-HJKMNP-TV-Z]{26}$` |
| `name` | string | yes |  |  |
| `issuer` | string | yes |  |  |
| `currency` | enum | yes |  | - `one of "vibes", "coins"` |
| `amount` | integer | yes |  | - `minimum 1`<br>- `maximum 9007199254740991` |
| `status` | enum | yes |  | - `one of "pending", "fulfilled"` |
| `instance_id` | one of | yes |  |  |
| `payment_id` | string \| null | yes |  |  |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: example

~~~~
{
  "id": "isp_00000000000000000000000001",
  "subject": "usr_00000000000000000000000001",
  "item_id": "itd_00000000000000000000000001",
  "name": "Rainbow",
  "issuer": "service:live",
  "currency": "vibes",
  "amount": 50,
  "status": "pending",
  "instance_id": null,
  "payment_id": null
}
~~~~

Rejected: invalid-value

~~~~
{
  "id": "isp_00000000000000000000000001",
  "subject": "usr_00000000000000000000000001",
  "item_id": "itd_00000000000000000000000001",
  "name": "Rainbow",
  "issuer": "service:live",
  "currency": "vibes",
  "amount": 0,
  "status": "pending",
  "instance_id": null,
  "payment_id": null
}
~~~~

Rejected: missing

~~~~
{}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('inventory.purchase@1', value);   // { valid, errors: [{ path, message }] }
~~~~
