{
  "slug": "stripe-invoice-items-and-invoice-line-items-accept-decimal-quantities-bc040d77f07f",
  "title": "Stripe Invoice Items and Invoice Line Items accept decimal quantities",
  "tools": [
    "stripe"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-03-25T00:00:00.000Z",
  "announced_at": "2026-03-25T00:00:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When creating or updating an Invoice Item or updating an invoice line item with fractional units, set `quantity_decimal` to a non-negative decimal string with up to 12 decimal places. Use only `quantity_decimal`; a request cannot set both it and `quantity`.",
    "examples": [
      "curl https://api.stripe.com/v1/invoiceitems -u \"<YOUR_SECRET_KEY>\" -H \"Stripe-Version: 2026-03-25.dahlia\" -d customer=<CUSTOMER_ID> -d \"pricing[price]=<PRICE_ID>\" -d quantity_decimal=\"5.7\"",
      "curl https://api.stripe.com/v1/invoiceitems/<INVOICEITEM_ID> -u \"<YOUR_SECRET_KEY>\" -H \"Stripe-Version: 2026-03-25.dahlia\" -d quantity_decimal=\"5.7\"",
      "curl -X POST https://api.stripe.com/v1/invoices/<INVOICE_ID>/lines/<LINE_ITEM_ID> -u \"<YOUR_SECRET_KEY>\" -H \"Stripe-Version: 2026-03-25.dahlia\" -d quantity_decimal=\"5.7\""
    ],
    "gotchas": [
      "quantity_decimal: Non-negative decimal quantity string with at most 12 decimal places; use it for decimal precision.",
      "quantity: Non-negative integer quantity; deprecated in favor of `quantity_decimal`. A request may set either `quantity` or `quantity_decimal`, but not both.",
      "customer: Customer ID to bill for the Invoice Item.",
      "pricing[price]: Price ID used to price the Invoice Item.",
      "invoice (required): Invoice ID for the invoice line item update endpoint.",
      "line_item_id (required): Invoice line item ID for the invoice line item update endpoint.",
      "Prerequisite: Authenticate with a Stripe secret key. Creating an Invoice Item requires a customer and a price; the docs list creating those objects as setup. Invoice Items can only be added to draft invoices. Updates to Invoice Items are only possible before the attached invoice is closed; invoice line item updates are only possible before the invoice is finalized.",
      "`quantity_decimal` accepts string values in decimal format, with up to 12 decimal places of precision.",
      "A single request can set either `quantity` or `quantity_decimal`, but not both.",
      "Setting `quantity_decimal` also sets `quantity` to the same value truncated to an integer.",
      "`quantity` remains available for existing integrations but is deprecated, does not support decimal values, and will be removed in a future breaking API version."
    ]
  },
  "why_it_matters": "When implementing invoice creation or updates that need fractional quantities, use decimal quantities for Invoice Items or Invoice Line Items.",
  "sources": [
    "https://docs.stripe.com/changelog/dahlia/2026-03-25/invoice-items-decimal-quantity",
    "https://docs.stripe.com/api/invoiceitems/create?api-version=2026-03-25.dahlia",
    "https://docs.stripe.com/api/invoiceitems/update?api-version=2026-03-25.dahlia",
    "https://docs.stripe.com/api/invoice-line-item/update?api-version=2026-03-25.dahlia"
  ],
  "rank": 0.96015,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-tools-20261017",
    "verdict_id": "wave1b-tools-20261017:wave1b-tools-20261017-f1b6753a2bc763d3-0:gate",
    "evidence_hash": "dfa94912308fdc5b9544af5c1a7ee8ff6e2ec025dc39cd4e72f872b70050f150"
  },
  "review": {
    "draft_hash": "e00dcaf01fcd5bbe0c99271afa7b7680c651b358f41c2a49fff921f584edf129",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-tools-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
