{
  "slug": "stripe-credit-note-line-items-accept-metadata-fbe92495e934",
  "title": "Stripe credit note line items accept metadata",
  "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 previewing a credit note that needs per-line-item data, set `metadata` on each object in `lines`. Retrieve the credit note or its line items to read that metadata.",
    "gotchas": [
      "lines (required): Array of line items making up the credit note; one of `amount`, `lines`, or `shipping_cost` must be provided.",
      "lines[].metadata: Key-value pairs attached to a credit note line item. Up to 50 keys; key names up to 40 characters and values up to 500 characters.",
      "invoice (required): ID of the invoice.",
      "Prerequisite: Create a customer and an invoice before creating or previewing the credit note.",
      "Metadata can contain up to 50 keys; key names can be up to 40 characters and values up to 500 characters."
    ]
  },
  "why_it_matters": "When creating or previewing a credit note and you need per-line-item data for repository billing logic or reporting, attach metadata to each line item.",
  "sources": [
    "https://docs.stripe.com/changelog/dahlia/2026-03-25/adds-metadata-field-to-credit-note-line-items",
    "https://docs.stripe.com/api/credit_notes/create?api-version=2026-03-25.dahlia",
    "https://docs.stripe.com/api/credit_notes/line_item?api-version=2026-03-25.dahlia"
  ],
  "rank": 0.90021,
  "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-126be98ace94c3aa-0:gate",
    "evidence_hash": "d1ee17e580e5e9d3467b4020c8e5f48759abbfec52514db4f9b245275fb8dc66"
  },
  "review": {
    "draft_hash": "899eaab614bc46b1c8042578735b0946139d3ab5192c7d44c56da8f28f7352d3",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-tools-20261017:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.90 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
