---
title: "price_below_cost"
url: https://services.dev/docs/reference/check/price_below_cost
---
# price_below_cost

URL: https://services.dev/docs/reference/check/price_below_cost

> A delivered job could lose money: payout, nested Services and the AI cap add up to more than the price.

| Fix | Fails in | Exit |
|---|---|---|
| Raise price.usd, or lower payout. | `services/translation.ts` | 1 |

**Owned by** [Service()](https://services.dev/docs/service.md): the page that explains what this gate holds.

## What check says

```txt title="npx services.dev check"
  ✗ A delivered job could lose money: payout, nested Services and the AI cap add up to more than the price. Raise price.usd, or lower payout.
    https://services.dev/docs/reference/check/price_below_cost
✗ 1 to fix
```

## The failing file

```ts title="services/translation.ts"
import { Service } from 'services.dev'

export default Service({
  name: 'Translation',
  input: { document: 'file', to: 'language: a BCP 47 tag, such as fr-CA' },
  output: { document: 'file' },
  human: { sign: 'sworn-translator' },
  price: { usd: 49, payout: 60 },
})
```

## The fix

```diff title="git add -A && git diff --staged"
diff --git a/services/translation.ts b/services/translation.ts
index 773b4ad..337cbfd 100644
--- a/services/translation.ts
+++ b/services/translation.ts
@@ -5,5 +5,5 @@ export default Service({
   input: { document: 'file', to: 'language: a BCP 47 tag, such as fr-CA' },
   output: { document: 'file' },
   human: { sign: 'sworn-translator' },
-  price: { usd: 49, payout: 60 },
+  price: { usd: 89, payout: 60 },
 })
```

```txt title="npx services.dev check"
✓ ready to sell · 1 Service · it keeps at least 13% of every job
```

## Explained in

- [Service()](https://services.dev/docs/service.md)
- [AI steps and briefs](https://services.dev/docs/service/ai.md)
- [Another Service as a step](https://services.dev/docs/service/nested.md)

## What an agent reads

```json title="npx services.dev check --json · the price_below_cost failure"
{
  "code": "price_below_cost",
  "reason": "A delivered job could lose money: payout, nested Services and the AI cap add up to more than the price.",
  "next": "Raise price.usd, or lower payout.",
  "doc_url": "https://services.dev/docs/reference/check/price_below_cost"
}
```

<details>
<summary>The whole document check --json prints</summary>

```json title="npx services.dev check --json"
{
  "ai": {
    "cents_per_call": 42,
    "simulated": true
  },
  "mcp": {
    "tools": 13,
    "tokens": 4491,
    "sandbox": 9,
    "budget": 8000
  },
  "services": [
    {
      "path": "services/translation.ts",
      "lines": 5,
      "steps": "draft · ai → review · ai · adversarial · then a person signs",
      "ok": false,
      "price": "$49 per job, within 48 hours, charged on delivery.",
      "who": "A sworn translator signs before delivery.",
      "agent": {
        "tool": "order_translation",
        "words": 26,
        "job": "job_7Hq2",
        "status": "waiting",
        "on": "signature",
        "charged": null,
        "person": true,
        "why": ""
      },
      "ledger": "+$49.00 · AI $0.84 (example) · sworn translator $60.00 · you −$11.84",
      "approved_ledger": null,
      "outcome": null,
      "margin": {
        "floor": {
          "cents": -2080,
          "pct": -42
        },
        "own": -2080,
        "stop": 6980,
        "nested": []
      },
      "apps": [
        "customer portal",
        "delivery portal",
        "owner console"
      ],
      "failures": [
        {
          "code": "price_below_cost",
          "reason": "A delivered job could lose money: payout, nested Services and the AI cap add up to more than the price.",
          "next": "Raise price.usd, or lower payout.",
          "doc_url": "https://services.dev/docs/reference/check/price_below_cost"
        }
      ]
    }
  ]
}
```

</details>

---

- Up: [check’s gates](https://services.dev/docs/reference/check.md)
- Previous: [clock_due_unreadable](https://services.dev/docs/reference/check/clock_due_unreadable.md)
- Next: [upgrade_below_payout](https://services.dev/docs/reference/check/upgrade_below_payout.md)
