> ## 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 Price

> Create a price for a product

Create a new price for a product.

<ParamField path="productId" type="string" required>
  Product ID to create price for
</ParamField>

<ParamField path="amount" type="string" required>
  Price amount
</ParamField>

<ParamField path="currency" type="string" required>
  Currency code (USD, EUR, etc.)
</ParamField>

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

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

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

<ResponseField name="data.amount" type="string">
  Price amount
</ResponseField>

<ResponseField name="data.currency" type="string">
  Currency code
</ResponseField>

<ResponseField name="data.active" type="boolean">
  Whether the price 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/price/create \
  -H "Authorization: Bearer jwt_token" \
  -H "Content-Type: application/json" \
  -d '{
    "productId": "prod_X4dUuzsMaruQ4UsX",
    "amount": "29.99",
    "currency": "USD"
  }'
```

## Example Response

```json theme={null}
{
  "success": true,
  "data": {
    "id": "price_i62wKFQ8sGnLxQ5G",
    "productId": "prod_X4dUuzsMaruQ4UsX",
    "amount": "29.99",
    "currency": "USD",
    "active": true,
    "createdAt": "2024-01-01T00:00:00Z"
  }
}
```

## Error Responses

<ResponseExample name="Product Not Found">
  ```json theme={null}
  {
    "success": false,
    "error": {
      "status": 404,
      "code": "PRODUCT_NOT_FOUND",
      "message": "Product not found"
    },
    "data": null
  }
  ```
</ResponseExample>
