Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.stellartools.dev/llms.txt

Use this file to discover all available pages before exploring further.

A product defines what you’re selling — a one-time item, a recurring subscription, or a metered usage plan. Products are referenced when creating checkouts.

The product object

id
string
Unique identifier. Prefixed with prod_.
object
string
Always "product".
name
string
Display name of the product.
description
string
Optional description.
images
array
Array of image URLs.
type
string
Billing type. One of one_time, subscription, or metered.
status
string
active or archived.
asset_id
string
The asset this product is priced in.
asset_code
string
The asset code this product is priced in, e.g “XLM”
price_amount
number
Price in the product’s asset.
recurring_period
string
For subscription products. One of day, week, month, or year.
unit
string
For metered products. The unit being measured (e.g. "token", "request").
units_per_credit
number
Units consumed per credit.
total_credits
number
Total credits granted to the customer when this product is purchased.
metadata
object
Arbitrary key-value data.
environment
string
testnet or mainnet.
created_at
string
ISO 8601 timestamp.
updated_at
string
ISO 8601 timestamp.

Create a product

POST /product
curl https://api.stellartools.dev/product \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro Plan",
    "type": "subscription",
    "asset_id": "ast_01jx...",
    "price_amount": 10,
    "recurring_period": "month"
  }'

Body

name
string
required
Product name.
type
string
required
one_time, subscription, or metered.
asset_code
string
required
Asset code to charge in, e.g “XLM”.
price_amount
number
required
Price amount in the asset.
recurring_period
string
Required for subscription type. One of day, week, month, year.
description
string
Product description.
images
array
Array of image URLs.
unit
string
For metered products. The unit label.
units_per_credit
number
Units consumed per credit.
total_credits
number
Total credits granted on purchase.
metadata
object
Arbitrary key-value data.

Update a product

PUT /product/{id}
curl -X PUT https://api.stellartools.dev/product/prod_01jx... \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Pro Plan v2", "price_amount": 12 }'

Body

name
string
New name.
description
string
New description.
price_amount
number
New price amount.
recurring_period
string
New billing interval.
images
array
New image URLs.
metadata
object
Merged with existing metadata.

Delete a product

DELETE /product/{id}
curl -X DELETE https://api.stellartools.dev/product/prod_01jx... \
  -H "x-api-key: YOUR_API_KEY"