BillingVibesChargeRefundedPayload billing.vibes.charge.refunded@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.refunded.v1.json

billing.vibes.charge.refunded v1 (OpenVibe.Billing, written when a Vibes Pay charge is refunded): 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

FieldTypeRequiredDescriptionConstraints
idstringyesThe charge; GET /api/v1/vibes/charges/:id returns its current state.
  • pattern ^vch_[0-9A-HJKMNP-TV-Z]{26}$
appstringyesThe app that created the charge.
  • pattern ^app_[0-9A-HJKMNP-TV-Z]{26}$
project_idstringyesThe app's project, whose Vibes wallet received the charge.
  • pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$
amountintegeryesThe whole number of Vibes paid.
  • minimum 1
descriptionstringyes
  • minLength 1
  • maxLength 140
referencestringyesThe app's reference, as given when the charge was created.
  • minLength 1
  • maxLength 128
statusconstyes
  • = "refunded"
created_atstringyes
  • format date-time
paid_atstringyesWhen the Vibes moved from the person to the project.
  • format date-time
refunded_atstringyesWhen the Vibes went back to the person.
  • format date-time
expires_atstringyes
  • format date-time
sandboxbooleanyesTrue for a sandbox app: sandbox Vibes only, worth nothing.
payer_refstringyesOpaque 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.
  • pattern ^[A-Za-z0-9._:-]+$
  • minLength 8
  • maxLength 128

Examples

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

Valid: refunded
{
  "id": "vch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "app": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "amount": 50,
  "description": "Sticker pack: Neon cats",
  "reference": "order_123",
  "status": "refunded",
  "created_at": "2026-11-04T12:00:00.000Z",
  "paid_at": "2026-11-04T12:01:00.000Z",
  "refunded_at": "2026-11-04T13:00:00.000Z",
  "expires_at": "2026-11-04T12:30:00.000Z",
  "sandbox": false,
  "payer_ref": "payer_7f3c9a12"
}
Rejected: person-id
{
  "id": "vch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "app": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "amount": 50,
  "description": "Sticker pack: Neon cats",
  "reference": "order_123",
  "status": "refunded",
  "created_at": "2026-11-04T12:00:00.000Z",
  "paid_at": "2026-11-04T12:01:00.000Z",
  "refunded_at": "2026-11-04T13:00:00.000Z",
  "expires_at": "2026-11-04T12:30:00.000Z",
  "sandbox": false,
  "payer_ref": "payer_7f3c9a12",
  "user_id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}
Rejected: refunded-without-time
{
  "id": "vch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "app": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "amount": 50,
  "description": "Sticker pack: Neon cats",
  "reference": "order_123",
  "status": "refunded",
  "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"
}

Validate

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