---
title: "Update a product. default_price_data adds a new price, archives the old one and moves payment links to it."
method: POST
path: "/products/{id}"
tags: ["Products"]
---

# Update a product. default_price_data adds a new price, archives the old one and moves payment links to it.

`POST /products/{id}`

## Request

- Base URL: `https://shieldz.cash/api/v1`
- URL: `https://shieldz.cash/api/v1/products/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- ProductUpdate: Send only the fields you change.
  - `name` string
  - `description` string, nullable: null clears it.
  - `image_url` string, nullable: A public https URL; null removes the image.
  - `active` boolean: false archives the product (its links stop selling it); true restores it.
  - `default_price` string: Make another active price (price_…) of this product the default.
  - `default_price_data` PriceData: Send exactly one of unit_amount_usd_cents (a fixed price) or custom_unit_amount (the customer chooses, e.g. tips or donations).
    - `unit_amount_usd_cents` integer: Fixed price per unit in USD cents: 4999 is $49.99. A checkout's total must come to $1 or more.
    - `custom_unit_amount` object: The customer types an amount between minimum and maximum. A link line with this price has a fixed quantity of 1.
      - `minimum_usd_cents` integer: Lowest amount the customer may enter, in cents (at least $1).
      - `maximum_usd_cents` integer: Highest amount, in cents (at most $100,000).
      - `preset_usd_cents` integer: Amount pre-filled on the page. Must sit between minimum and maximum.

## Response `200`

OK

- Product
  - `id` string
  - `object` 'product'
  - `name` string: Shown to the buyer on the payment link page and on invoices.
  - `description` string, nullable: Shown under the name on the payment link page.
  - `image_url` string, uri, nullable: Product image. Images uploaded in the dashboard are served from this host.
  - `active` boolean: false once archived. Links selling an archived product show as unavailable.
  - `default_price` Price
    - `id` string
    - `object` 'price'
    - `product` string: The product (prod_…) this price belongs to.
    - `active` boolean: false once archived. An archived price can't be added to new carts or links.
    - `unit_amount_usd_cents` integer, nullable: Fixed price per unit in USD cents; null when the customer chooses the amount.
    - `custom_unit_amount` object, nullable: The range the customer chooses from; null for a fixed price.
      - `minimum_usd_cents` integer, nullable
      - `maximum_usd_cents` integer, nullable
      - `preset_usd_cents` integer, nullable
    - `created_at` integer: Unix milliseconds.
  - `created_at` integer: Unix milliseconds.
  - `updated_at` integer: Unix milliseconds.

## Other responses

- `400`: Error

---

[API](https://skmtc.dev/shieldz/apis/shieldz-api.md) · [All operations](https://skmtc.dev/shieldz/apis/shieldz-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shieldz/apis/shieldz-api/revisions/0d7156bee439?raw)
