---
title: "billing.vibes-charge-create-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/billing.vibes-charge-create-request"
updated: null
---

# billing.vibes-charge-create-request@1 · OpenVibe.Services

HTML: [billing.vibes-charge-create-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/billing.vibes-charge-create-request)

# BillingVibesChargeCreateRequest `billing.vibes-charge-create-request@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: billing
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/billing/vibes-charge-create-request.v1.json`](/docs/contracts/billing.vibes-charge-create-request.json)

billing.vibes-charge-create-request@1: body of POST /api/v1/vibes/charges, sent from the app's server with its app token (capability billing.vibes.charge). amount is whole Vibes. reference is the app's idempotency key: a replay with the same reference and body returns the same charge. return\_url is optional. The app token decides the project, the sandbox environment and the owner-set limits.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `amount` | integer | yes | Price in whole Vibes, a positive integer; never a fraction or a nano-USD amount. | - `minimum 1` |
| `description` | string | yes | What the person is paying for. | - `minLength 1`<br>- `maxLength 140` |
| `reference` | string | yes | The app's own reference; it is the idempotency key. | - `minLength 1`<br>- `maxLength 128` |
| `return_url` | string |  | Where the browser returns after paying. Optional; the app may instead poll the charge or wait for the webhook. | - `format uri` |

## Examples

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

 Valid: no-return-url

~~~~
{
  "amount": 1,
  "description": "One cheer",
  "reference": "order_124"
}
~~~~

Valid: sticker-pack

~~~~
{
  "amount": 50,
  "description": "Sticker pack: Neon cats",
  "reference": "order_123",
  "return_url": "https://myapp.example/thanks"
}
~~~~

Rejected: empty-description

~~~~
{
  "amount": 50,
  "description": "",
  "reference": "order_123"
}
~~~~

Rejected: float-amount

~~~~
{
  "amount": 0.5,
  "description": "Sticker pack: Neon cats",
  "reference": "order_123"
}
~~~~

Rejected: missing-reference

~~~~
{
  "amount": 50,
  "description": "Sticker pack: Neon cats"
}
~~~~

Rejected: person-id

~~~~
{
  "amount": 50,
  "description": "Sticker pack: Neon cats",
  "reference": "order_123",
  "user_id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}
~~~~

Rejected: return-url-not-uri

~~~~
{
  "amount": 50,
  "description": "Sticker pack: Neon cats",
  "reference": "order_123",
  "return_url": "not a url"
}
~~~~

## Validate

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