---
title: "billing.credit-sandbox-grant-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/billing.credit-sandbox-grant-request"
updated: null
---

# billing.credit-sandbox-grant-request@1 · OpenVibe.Services

HTML: [billing.credit-sandbox-grant-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/billing.credit-sandbox-grant-request)

# BillingCreditSandboxGrantRequest `billing.credit-sandbox-grant-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: internal
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/billing/credit-sandbox-grant-request.v1.json`](/docs/contracts/billing.credit-sandbox-grant-request.json)

billing.credit-sandbox-grant-request@1: POST /internal/credits/sandbox/grants, synthetic credit for tests and staging. Billing answers only when BILLING\_CREDITS\_SANDBOX=1; the grant is a test transaction (D9). D10: the grant lands in the subject's sandbox credit account for the project (account kind usd\_credit\_sandbox, owner subject:project), and only a sandbox hold (billing.credit-hold-create-request@1 sandbox: true) draws on it; real Credits are never touched.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `subject` | [identity.subject-ref](/docs/contracts/identity.subject-ref) | yes |  |  |
| `project_id` | string | yes |  | - `pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$` |
| `amount_nano_usd` | string | yes | Integer nano-USD (1e-9 USD), stored as a string. | - `pattern ^[0-9]{1,19}$` |
| `reason` | string |  |  | - `maxLength 500` |

## Examples

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

 Valid: minimal

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "amount_nano_usd": "5000000000"
}
~~~~

Valid: with-reason

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "amount_nano_usd": "5000000000",
  "reason": "staging smoke test"
}
~~~~

Rejected: missing-project

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "amount_nano_usd": "5000000000"
}
~~~~

Rejected: money-float

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "amount_nano_usd": "5.5"
}
~~~~

Rejected: money-number

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "amount_nano_usd": 5000000000
}
~~~~

## Validate

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