Product CRUD
The Public API exposes CRUD operations on the product entity. A product is what the merchant sells; it is referenced by productId on plans.
For the concept and how products relate to plans, see Products and plans.
Create a product
curl -X POST \
"https://staging-api.payments.ai/v1/public-api/organizations/${ORGANIZATION_ID}/products" \
-H 'Content-Type: application/json' \
-H "Authorization: ApiKey ${API_KEY}" \
-d '{
"name": "Test Product",
"unitLabel": "unit",
"description": "description",
"requiresShipping": false,
"options": ["string"],
"taxCategoryId": "00000"
}'
| Field | Required | Notes |
|---|---|---|
name | Yes | Display name of the product. |
unitLabel | Optional | What is being sold per quantity — for example, unit, seat, license. |
description | Optional | Plain-text description. |
requiresShipping | Optional | true for physical goods. |
options | Optional | Variant options such as color or size. |
taxCategoryId | Optional | TaxJar category code. Use 00000 for the general category if none of the TaxJar codes match. |
accountingCode | Optional | Merchant-side accounting reference. Free-form string. |
recognition | Optional | Nullable object. Revenue-recognition configuration; the exact shape is implementation-specific — verify with the engineering team before use. |
List products
curl -X GET \
"https://staging-api.payments.ai/v1/public-api/organizations/${ORGANIZATION_ID}/products" \
-H "Authorization: ApiKey ${API_KEY}"
Retrieve a product by ID
curl -X GET \
"https://staging-api.payments.ai/v1/public-api/organizations/${ORGANIZATION_ID}/products/${PRODUCT_ID}" \
-H "Authorization: ApiKey ${API_KEY}"
Update a product
curl -X PUT \
"https://staging-api.payments.ai/v1/public-api/organizations/${ORGANIZATION_ID}/products/${PRODUCT_ID}" \
-H 'Content-Type: application/json' \
-H "Authorization: ApiKey ${API_KEY}" \
-d '{
"name": "Updated Test Product",
"unitLabel": "unit",
"description": "updated description",
"requiresShipping": true,
"options": ["string"],
"taxCategoryId": "00000",
"accountingCode": "456"
}'
Delete a product
curl -X DELETE \
"https://staging-api.payments.ai/v1/public-api/organizations/${ORGANIZATION_ID}/products/${PRODUCT_ID}" \
-H "Authorization: ApiKey ${API_KEY}"