VipCheckoutResult vip.checkout-result@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
vip
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/vip/checkout-result.v1.json

vip.checkout-result@1: the answer of vip.membership.checkout on OpenVibe.VIP. POST /api/v1/checkout (201) → { checkout, membership_started, checkout_url, checkout_ref, amount_cents? }. With provider credit the period is paid at once (membership_started true when Billing granted it; no checkout link). Otherwise the member finishes at checkout_url (always http(s) when present; a PowerChat checkout may come as checkout_ref only) and the membership starts when Billing's settlement arrives; amount_cents is what Billing's intent asks for.

Fields

FieldTypeRequiredDescriptionConstraints
checkoutvip.checkoutyes
membership_startedbooleanyes
checkout_urlstring | nullyes
checkout_refstring | nullyes
amount_centsinteger | null
  • minimum 0

Examples

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

Valid: credit
{
  "checkout": {
    "id": "vco_01JAB2C3D4E5F6G7H8J9K0MNQ0",
    "member": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
    },
    "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "plan_id": "vpl_01JAB2C3D4E5F6G7H8J9K0MNPW",
    "plan_version_id": "vpv_01JAB2C3D4E5F6G7H8J9K0MNPT",
    "provider": "credit",
    "status": "paid",
    "billing_intent_id": null,
    "billing_subscription_id": "sub_01JAB2C3D4E5F6G7H8J9K0MNQ3",
    "checkout_url": null,
    "checkout_ref": null,
    "created_at": "2026-09-25T09:12:40.118Z"
  },
  "membership_started": true,
  "checkout_url": null,
  "checkout_ref": null
}
Valid: handed-off
{
  "checkout": {
    "id": "vco_01JAB2C3D4E5F6G7H8J9K0MNQ0",
    "member": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
    },
    "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "plan_id": "vpl_01JAB2C3D4E5F6G7H8J9K0MNPW",
    "plan_version_id": "vpv_01JAB2C3D4E5F6G7H8J9K0MNPT",
    "provider": "powerchat",
    "status": "handed_off",
    "billing_intent_id": "int_01JAB2C3D4E5F6G7H8J9K0MNQ1",
    "billing_subscription_id": null,
    "checkout_url": "https://powerchat.live/checkout/pc_7f3a91",
    "checkout_ref": "pc_7f3a91",
    "created_at": "2026-09-25T09:12:40.118Z"
  },
  "membership_started": false,
  "checkout_url": "https://powerchat.live/checkout/pc_7f3a91",
  "checkout_ref": "pc_7f3a91",
  "amount_cents": 499
}
Rejected: no-flag
{
  "checkout": {
    "id": "vco_01JAB2C3D4E5F6G7H8J9K0MNQ0",
    "member": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
    },
    "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "plan_id": "vpl_01JAB2C3D4E5F6G7H8J9K0MNPW",
    "plan_version_id": "vpv_01JAB2C3D4E5F6G7H8J9K0MNPT",
    "provider": "powerchat",
    "status": "handed_off",
    "billing_intent_id": "int_01JAB2C3D4E5F6G7H8J9K0MNQ1",
    "billing_subscription_id": null,
    "checkout_url": "https://powerchat.live/checkout/pc_7f3a91",
    "checkout_ref": "pc_7f3a91",
    "created_at": "2026-09-25T09:12:40.118Z"
  },
  "checkout_url": null,
  "checkout_ref": null
}

Validate

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