Product
Products define what can be purchased, including price, chain, and payout destination.
Methods
| Method | Description | Returns |
|---|---|---|
| create | Create a new product | Product |
| list | List all products | Product[] |
| get | Get a product by ID | Product |
| update | Update a product | Product |
| delete | Delete a product | void |
create
Type (parameters: { payoutWalletAddress: string; chain: string; currency: "USDC"; amount: number }) => Promise<Product>
Create a new product with pricing, chain, and payout configuration.
const product = await stackup.product.create({
payoutWalletAddress: "0x1234567890123456789012345678901234567890",
chain: "8453", // Base
currency: "USDC",
amount: 100,
})list
Type () => Promise<Product[]>
List all products for the current workspace.
const products = await stackup.product.list()get
Type (parameters: { id: string }) => Promise<Product>
Get a product by its ID.
const product = await stackup.product.get({ id: "prd_01ABC123" })update
Type (parameters: { id: string; price?: string; paused?: boolean }) => Promise<Product>
Update an existing product's properties.
await stackup.product.update({
id: "prd_01ABC123",
price: "2000000",
paused: false
})delete
Type (parameters: { id: string }) => Promise<void>
Delete a product. Products are soft-deleted and can be restored.
await stackup.product.delete({ id: "prd_01ABC123" })Types
Product
| Property | Type | Description |
|---|---|---|
| id | string | Unique identifier |
| workspaceID | string | Parent workspace |
| payoutWalletAddress | string | Ethereum address for payouts |
| chain | string | Chain reference (e.g. "8453" for Base, "1" for Ethereum) |
| currency | "USDC" | Currency (currently only USDC supported) |
| amount | string | Price amount in token units |
| supply | number | null | Available inventory |
| sold | number | Number sold |
| paused | boolean | Whether sales are disabled |
| name | string | Display name |
| description | string | null | Optional details |
| tokens | string[] | null | Allowed payment tokens |
| timeCreated | string | Creation timestamp (ISO 8601) |
| timeUpdated | string | Last modification (ISO 8601) |
Errors
A list of errors that can be returned by the Product API.
ProductCreateErrors
The product creation request was invalid.
Status: 400 BadRequestError
ProductGetErrors
The product could not be retrieved.
Status: 400 BadRequestError, 404 NotFoundError
ProductUpdateErrors
The product update request was invalid or product not found.
Status: 400 BadRequestError, 404 NotFoundError
ProductDeleteErrors
The product could not be deleted.
Status: 400 BadRequestError, 404 NotFoundError