---
title: "network.coins-transfer-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/network.coins-transfer-request"
updated: null
---

# network.coins-transfer-request@1 · OpenVibe.Services

HTML: [network.coins-transfer-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/network.coins-transfer-request)

# NetworkCoinsTransferRequest `network.coins-transfer-request@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: network
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/network/coins-transfer-request.v1.json`](/docs/contracts/network.coins-transfer-request.json)

network.coins-transfer-request@1: the body of network.coins.transfer on OpenVibe.Network. POST /internal/coins/transfer: { from\_user\_id, to\_user\_id, app\_id?, amount, reason?, ref?, idempotency\_key } moves OpenCoins between two Network users atomically (the two ids are Network user ids and must differ). Refusals are { error } bodies: 400 invalid\_from\_user\_id, invalid\_to\_user\_id, invalid\_transfer (the same person), invalid\_amount or missing\_idempotency\_key; 404 user\_not\_found; 409 { error: insufficient\_funds, balance } when the sender cannot cover it. Unknown fields are ignored.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `from_user_id` | integer \| string | yes | The Network user id that pays. | - `pattern ^[1-9][0-9]*$`<br>- `minimum 1` |
| `to_user_id` | integer \| string | yes | The Network user id that receives. | - `pattern ^[1-9][0-9]*$`<br>- `minimum 1` |
| `app_id` | string |  | The app the coins move for. A service token may only name its own (svc:live → live); anything else is 403 capability.owner\_denied. The shared internal key may name any. |  |
| `amount` | integer | yes | OpenCoins, a positive whole number (a string is refused: 400 invalid\_amount). | - `minimum 1` |
| `reason` | string \| null |  | Why, kept on the ledger row. |  |
| `ref` | string \| null |  | The caller's reference for the row (an order, a game, …). |  |
| `idempotency_key` | string | yes | Unique per mutation. A replay returns the first answer and changes nothing (400 missing\_idempotency\_key without it). | - `minLength 1` |

## Examples

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

 Valid: transfer

~~~~
{
  "from_user_id": 1042,
  "to_user_id": 2210,
  "app_id": "games",
  "amount": 40,
  "reason": "wager",
  "ref": "match:m_8812",
  "idempotency_key": "games:wager:m_8812"
}
~~~~

Rejected: no-recipient

~~~~
{
  "from_user_id": 1042,
  "amount": 10,
  "idempotency_key": "games:wager:m_8814"
}
~~~~

Rejected: zero

~~~~
{
  "from_user_id": 1042,
  "to_user_id": 2210,
  "amount": 0,
  "idempotency_key": "games:wager:m_8813"
}
~~~~

## Validate

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