---
title: "Create a product"
method: POST
path: "/api/products"
tags: ["products"]
---

# Create a product

`POST /api/products`

## Request

- Base URL: `https://api.depixapp.com`
- URL: `https://api.depixapp.com/api/products`
- Auth: HTTP bearer

Creates a reusable product (fixed-price checkout template with a public page). Requires scope `merchant_write` on the API-key path. sk_test_ creates sandbox products.

## Request body

- ProductCreateRequest: Product creation request (reusable checkout template with a public page).
  - `name` string, required: Product name (2–80 chars).
  - `slug` string: URL slug (lowercase letters, digits, hyphens). Auto-generated from name when omitted.
  - `amount` integer, required: Price in cents (BRL). Range: 500–600000.
  - `description` string: Product description (max 500 chars).
  - `image_url` string: HTTPS product image URL.
  - `callback_url` string: HTTPS webhook endpoint for checkouts created from this product.
  - `redirect_url` string: HTTPS post-payment redirect for checkouts created from this product.
  - `metadata` object: Arbitrary JSON copied into each checkout (max 4KB serialized).
  - `expires_in` integer: Checkout QR lifetime in seconds. Range: 300–1200; default 1200.
  - `kind` 'product' | 'charge': Row kind: 'product' (catalog item, default) or 'charge' (cobrança — a configurable payment link with a due date and late fees, served at pay.depixapp.com/c/{id} and never listed on any store surface).
  - `due_date` string: Charges only (required for them): first due date, YYYY-MM-DD — the recurrence anchor.
  - `recurrence` string, nullable: Charges only: null (one-time) or weekly | monthly | quarterly | semiannual | yearly. Monthly-and-up anchor on the due day, clamping to shorter months.
  - `late_fine_bps` integer: Charges only: one-time late fine in basis points of the base (200 = 2%). Default 0.
  - `late_interest_monthly_bps` integer: Charges only: monthly interest in basis points, accrued pro-rata per day late (100 = 1% a.m.). Default 0.

## Response `201`

Product created.

- ProductCreateResponse: Created product.
  - `product` object, required: The created product.
    - `id` string, required: Product id (prd_*).
    - `slug` string, required: URL slug (unique per merchant and mode).
    - `name` string, required: Product name.
    - `amount` integer, required: Price in cents.
    - `description` string, nullable, required: Product description (null when not provided).
    - `image_url` string, nullable, required: Product image URL (null when not provided).
    - `callback_url` string, nullable, required: Webhook endpoint for this product's checkouts (null when not provided).
    - `redirect_url` string, nullable, required: Post-payment redirect (null when not provided).
    - `metadata` object, nullable, required: Metadata echoed back (null when not provided).
    - `expires_in` integer, required: Checkout QR lifetime in seconds.
    - `active` boolean, required: Products are created active.
    - `is_live` boolean, required: False for sandbox products (sk_test_).
    - `kind` 'product' | 'charge', required: 'product' or 'charge'.
    - `due_date` string, nullable, required: First due date (charges; null for products).
    - `recurrence` string, nullable, required: Recurrence (charges; null = one-time and for products).
    - `late_fine_bps` integer, required: One-time late fine in basis points (0 for products).
    - `late_interest_monthly_bps` integer, required: Monthly interest in basis points (0 for products).
    - `payment_url` string, required: Public payment URL: pay.depixapp.com/{merchant_slug}/{slug} for products, pay.depixapp.com/c/{id} for charges.
    - `created_at` string, required: Creation timestamp (ISO 8601).

## Other responses

- `400`: Invalid name/slug/amount/urls/metadata/expires_in.
- `401`: Missing/invalid credentials. `invalid_api_key` for a failed sk_* lookup (revoked/expired/unknown); `invalid_token` for a bad or missing JWT/Authorization header.
- `403`: The authenticated account has no active merchant profile.
- `409`: Slug already used by another product of this merchant (same mode).
- `429`: Rate limited. Beyond the endpoint's own limit when set (`rate_limited`), API-key calls are also bounded by the shared per-merchant budget (`merchant_rate_limited`, default 30 req/min across all endpoints) and by the key's own rate limit when configured (`rate_limited`). Retry after `retry_after` seconds (also in the Retry-After header).

---

[API](https://skmtc.dev/depixapp/apis/depix-api.md) · [All operations](https://skmtc.dev/depixapp/apis/depix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/depixapp/apis/depix-api/revisions/04094536dd0f?raw)
