---
title: "Create a product, optionally with its price (default_price_data)"
method: POST
path: "/products"
tags: ["Products"]
---

# Create a product, optionally with its price (default_price_data)

`POST /products`

## Request

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

## Request body

- ProductCreate
  - `name` string, required: What the buyer sees, e.g. "Blue hoodie".
  - `description` string: Optional, shown under the name.
  - `image_url` string, uri: A public https image URL. To upload a file instead, use the dashboard (Products → image).
  - `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.
  - `idempotency_key` string: Retrying with the same key returns the first object (200, idempotent_replay: true) instead of creating another. The SDKs add one for you.

## Response `201`

Created

- 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)
