Products & Prices
Products describe the specific goods or services you offer. Each product can have one or more **prices** attached, defining how much to charge and whether the billing is one-time or recurring. You can create prices inline when creating a product, or add them separately via the Prices endpoints.
/v1/productsCreate a Product
Create a new product. Optionally include `prices` array to create prices inline.
curl -X POST https://api.hlhunt.org/v1/products \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan",
"description": "Monthly professional plan",
"prices": [
{
"unit_amount": 2999,
"currency": "USD",
"type": "recurring",
"interval": "month",
"interval_count": 1
}
]
}'/v1/productsList Products
Returns all products with their prices. Supports `active`, `search`, and `limit` query parameters.
curl -X GET https://api.hlhunt.org/v1/products \
-H "Authorization: Bearer sk_live_your_api_key"/v1/products/:idRetrieve a Product
Retrieve a single product by ID, including all attached prices.
curl -X GET https://api.hlhunt.org/v1/products/prod_xxxxxxxxxxxx \
-H "Authorization: Bearer sk_live_your_api_key"/v1/products/:id/pricesCreate a Price
Add a new price to an existing product. Set `type` to `recurring` with an `interval` for subscription billing, or `one_time` for single charges.
curl -X POST https://api.hlhunt.org/v1/products/prod_xxxxxxxxxxxx/prices \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"unit_amount": 4999,
"currency": "USD",
"type": "recurring",
"interval": "month",
"interval_count": 1,
"nickname": "Monthly"
}'/v1/products/:id/pricesList Prices
Returns all prices attached to a product.
curl -X GET https://api.hlhunt.org/v1/products/prod_xxxxxxxxxxxx/prices \
-H "Authorization: Bearer sk_live_your_api_key"Endpoints
/v1/products/v1/products/v1/products/:id/v1/products/:id/prices/v1/products/:id/pricesCreate a Product
curl -X POST https://api.hlhunt.org/v1/products \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan",
"description": "Monthly professional plan",
"prices": [
{
"unit_amount": 2999,
"currency": "USD",
"type": "recurring",
"interval": "month",
"interval_count": 1
}
]
}'List Products
curl -X GET https://api.hlhunt.org/v1/products \
-H "Authorization: Bearer sk_live_your_api_key"Retrieve a Product
curl -X GET https://api.hlhunt.org/v1/products/prod_xxxxxxxxxxxx \
-H "Authorization: Bearer sk_live_your_api_key"Create a Price
curl -X POST https://api.hlhunt.org/v1/products/prod_xxxxxxxxxxxx/prices \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"unit_amount": 4999,
"currency": "USD",
"type": "recurring",
"interval": "month",
"interval_count": 1,
"nickname": "Monthly"
}'List Prices
curl -X GET https://api.hlhunt.org/v1/products/prod_xxxxxxxxxxxx/prices \
-H "Authorization: Bearer sk_live_your_api_key"