> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transaction.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Product

> Create a new product

Create a new product for your store.

<ParamField path="name" type="string" required>
  Product name
</ParamField>

<ParamField path="description" type="string">
  Product description
</ParamField>

<ParamField path="recurring" type="boolean">
  Whether this is a recurring product
</ParamField>

<ParamField path="recurringInterval" type="string">
  Recurring interval (monthly, yearly)
</ParamField>

<ParamField path="metadata" type="object">
  Additional product metadata
</ParamField>

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data.id" type="string">
  Product ID
</ResponseField>

<ResponseField name="data.name" type="string">
  Product name
</ResponseField>

<ResponseField name="data.description" type="string">
  Product description
</ResponseField>

<ResponseField name="data.recurring" type="boolean">
  Whether this is a recurring product
</ResponseField>

<ResponseField name="data.active" type="boolean">
  Whether the product is active
</ResponseField>

<ResponseField name="data.createdAt" type="string">
  Creation timestamp
</ResponseField>

## Example Request

```bash theme={null}
curl -X POST https://api.transaction.gg/merchant/product/create \
  -H "Authorization: Bearer jwt_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Premium Plan",
    "description": "Monthly premium subscription",
    "recurring": true,
    "recurringInterval": "monthly",
    "metadata": {
      "category": "subscription"
    }
  }'
```

## Example Response

```json theme={null}
{
  "success": true,
  "data": {
    "id": "prod_X4dUuzsMaruQ4UsX",
    "name": "Premium Plan",
    "description": "Monthly premium subscription",
    "recurring": true,
    "recurringInterval": "monthly",
    "metadata": {
      "category": "subscription"
    },
    "active": true,
    "createdAt": "2024-01-01T00:00:00Z"
  }
}
```

## Error Responses

<ResponseExample name="Validation Error">
  ```json theme={null}
  {
    "success": false,
    "error": {
      "status": 400,
      "code": "VALIDATION_INVALID",
      "message": "Invalid product data"
    },
    "data": null
  }
  ```
</ResponseExample>
