Create an item
Items represent products or services in your catalog. You can create them with tax fields and reuse them across invoices and subscriptions.client.ts
Edit, list, and delete items
Manage your catalog after items are created.client.ts
Use items in invoice line items
When creating an invoice, reference an existing item by its ID instead of defining the line item inline.client.ts
Use items in subscription add-ons
Attach add-ons to a subscription by referencing item IDs in thelineItems field during an upgrade, or by creating an add-on directly on an existing subscription.
Add line items during upgrade
client.ts
Create an add-on on an existing subscription
client.ts
client.ts
Manage add-ons
List and delete add-ons that are attached to subscriptions.client.ts
React hooks
The React entry point provides hooks for items and add-ons.List items
item-list.tsx
Create and delete items
item-actions.tsx
List add-ons
addon-list.tsx
Create and delete subscription add-ons
subscription-addon-actions.tsx
Error codes
The following error codes may be returned during item and add-on operations:ITEM_CREATE_FAILED: the item could not be created.ITEM_NOT_FOUND: the requested item does not exist.ITEM_FETCH_FAILED: failed to fetch an item.ITEM_LIST_FAILED: failed to list items.ITEM_EDIT_FAILED: the item could not be updated.ITEM_DELETE_FAILED: the item could not be deleted.ADDON_CREATE_FAILED: the subscription add-on could not be created.ADDON_NOT_FOUND: the requested add-on does not exist.ADDON_FETCH_FAILED: failed to fetch an add-on.ADDON_LIST_FAILED: failed to list add-ons.ADDON_DELETE_FAILED: the add-on could not be deleted.
Next steps
- Invoices — use items in invoice line items.
- Subscriptions — attach add-ons to recurring plans.
- Plans — define the billing plans that items and add-ons complement.