Customer Management
create_customer
get_customer
list_customers
update_customer
delete_customer
ensure_customer
Creates a customer if one doesn’t exist for the given email. Returns the existing customer if found.Product Management
create_product
get_product
list_products
update_product
delete_product
Plan Management
A plan is an ordered
options[] list. Recurring / usage-based / hybrid / one-time is a derived label — do not send type, creditsPerUnit, basePrice, setupFee, or freeUnits. See Plans.
create_plan
Example
options for a $19/month plan:
get_plan
list_plans
list_plans_for_product
update_plan
delete_plan
Purchase Management
list_purchases
get_purchase
get_purchases_by_customer
get_purchases_by_product
cancel_renewal
check_limits
Returns usage-limit status for a customer/product pair. If limits are exceeded, the response includes a checkout URL for the customer to upgrade.Payment & Checkout
create_checkout_session
create_customer_session
Generates a URL where the customer can manage their billing, payment methods, and purchases.Usage Tracking
record_usage
record_bulk_usage
Each object in
events accepts the same fields as record_usage.