Skip to main content
POST
/
merchant
/
price
/
create
{
  "success": false,
  "error": {
    "status": 404,
    "code": "PRODUCT_NOT_FOUND",
    "message": "Product not found"
  },
  "data": null
}
Create a new price for a product.
productId
string
required
Product ID to create price for
amount
string
required
Price amount
currency
string
required
Currency code (USD, EUR, etc.)
success
boolean
Indicates if the request was successful
data.id
string
Price ID
data.productId
string
Product ID
data.amount
string
Price amount
data.currency
string
Currency code
data.active
boolean
Whether the price is active
data.createdAt
string
Creation timestamp

Example Request

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

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

Error Responses

{
  "success": false,
  "error": {
    "status": 404,
    "code": "PRODUCT_NOT_FOUND",
    "message": "Product not found"
  },
  "data": null
}