Skip to main content

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"
}'
FieldRequiredNotes
nameYesDisplay name of the product.
unitLabelOptionalWhat is being sold per quantity — for example, unit, seat, license.
descriptionOptionalPlain-text description.
requiresShippingOptionaltrue for physical goods.
optionsOptionalVariant options such as color or size.
taxCategoryIdOptionalTaxJar category code. Use 00000 for the general category if none of the TaxJar codes match.
accountingCodeOptionalMerchant-side accounting reference. Free-form string.
recognitionOptionalNullable 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}"