Skip to main content
POST
/
merchant
/
product
/
create
{
  "success": false,
  "error": {
    "status": 400,
    "code": "VALIDATION_INVALID",
    "message": "Invalid product data"
  },
  "data": null
}
Create a new product for your store.
name
string
required
Product name
description
string
Product description
recurring
boolean
Whether this is a recurring product
recurringInterval
string
Recurring interval (monthly, yearly)
metadata
object
Additional product metadata
success
boolean
Indicates if the request was successful
data.id
string
Product ID
data.name
string
Product name
data.description
string
Product description
data.recurring
boolean
Whether this is a recurring product
data.active
boolean
Whether the product is active
data.createdAt
string
Creation timestamp

Example Request

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

{
  "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

{
  "success": false,
  "error": {
    "status": 400,
    "code": "VALIDATION_INVALID",
    "message": "Invalid product data"
  },
  "data": null
}