BillingVibesChargeRefundRequest billing.vibes-charge-refund-request@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/billing/vibes-charge-refund-request.v1.json

billing.vibes-charge-refund-request@1: the optional body of POST /api/v1/vibes/charges/:id/refund. A refund is always for the whole charge: the Vibes go back from the project's Vibes wallet to the person. reason is recorded on the refund. No amount may be given, because a partial refund is not a Vibes Pay refund.

Fields

FieldTypeRequiredDescriptionConstraints
reasonstring | nullWhy the app refunded, for its own and the person's record.
  • maxLength 300

Examples

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

Valid: empty
{}
Valid: reason
{
  "reason": "The sticker pack was removed"
}
Rejected: partial-amount
{
  "amount": 25
}
Rejected: reason-too-long
{
  "reason": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Validate

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