BillingVibesChargePaidPayload billing.vibes.charge.paid@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- billing
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/billing.vibes.charge.paid.v1.json
billing.vibes.charge.paid v1 (OpenVibe.Billing, written when a Vibes Pay charge is paid): the app's charge and the opaque payer reference. This is also the Vibes Pay webhook body (HMAC-SHA256 with the app's webhook secret, retried with backoff). It deliberately carries no person id and no email, only payer_ref, stable per app, so an app can recognise a returning payer without receiving their identity. amount is whole Vibes. Envelope: subject { type: vibes-charge, id: vch_... }, actor service:billing.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes | The charge; GET /api/v1/vibes/charges/:id returns its current state. |
|
app | string | yes | The app that created the charge. |
|
project_id | string | yes | The app's project, whose Vibes wallet received the charge. |
|
amount | integer | yes | The whole number of Vibes paid. |
|
description | string | yes |
| |
reference | string | yes | The app's reference, as given when the charge was created. |
|
status | const | yes |
| |
created_at | string | yes |
| |
paid_at | string | yes | When the Vibes moved from the person to the project. |
|
refunded_at | null | yes | Null: a paid charge has not been refunded. | |
expires_at | string | yes |
| |
sandbox | boolean | yes | True for a sandbox app: sandbox Vibes only, worth nothing. | |
payer_ref | string | yes | Opaque reference for the paying person, stable per app. Never the person's id, email or any other identity; an app uses it to recognise a returning payer. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: paid
{
"id": "vch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"app": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"amount": 50,
"description": "Sticker pack: Neon cats",
"reference": "order_123",
"status": "paid",
"created_at": "2026-11-04T12:00:00.000Z",
"paid_at": "2026-11-04T12:01:00.000Z",
"refunded_at": null,
"expires_at": "2026-11-04T12:30:00.000Z",
"sandbox": false,
"payer_ref": "payer_7f3c9a12"
}Valid: sandbox
{
"id": "vch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"app": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"amount": 50,
"description": "Sticker pack: Neon cats",
"reference": "order_123",
"status": "paid",
"created_at": "2026-11-04T12:00:00.000Z",
"paid_at": "2026-11-04T12:01:00.000Z",
"refunded_at": null,
"expires_at": "2026-11-04T12:30:00.000Z",
"sandbox": true,
"payer_ref": "payer_7f3c9a12"
}Rejected: float-amount
{
"id": "vch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"app": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"amount": 50.5,
"description": "Sticker pack: Neon cats",
"reference": "order_123",
"status": "paid",
"created_at": "2026-11-04T12:00:00.000Z",
"paid_at": "2026-11-04T12:01:00.000Z",
"refunded_at": null,
"expires_at": "2026-11-04T12:30:00.000Z",
"sandbox": false,
"payer_ref": "payer_7f3c9a12"
}Rejected: payer-ref-email
{
"id": "vch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"app": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"amount": 50,
"description": "Sticker pack: Neon cats",
"reference": "order_123",
"status": "paid",
"created_at": "2026-11-04T12:00:00.000Z",
"paid_at": "2026-11-04T12:01:00.000Z",
"refunded_at": null,
"expires_at": "2026-11-04T12:30:00.000Z",
"sandbox": false,
"payer_ref": "[email protected]"
}Rejected: person-id
{
"id": "vch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"app": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"amount": 50,
"description": "Sticker pack: Neon cats",
"reference": "order_123",
"status": "paid",
"created_at": "2026-11-04T12:00:00.000Z",
"paid_at": "2026-11-04T12:01:00.000Z",
"refunded_at": null,
"expires_at": "2026-11-04T12:30:00.000Z",
"sandbox": false,
"payer_ref": "payer_7f3c9a12",
"user_id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('billing.vibes.charge.paid@1', value); // { valid, errors: [{ path, message }] }