billing-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Credyt Setup

Credyt 设置流程

Guide the user through understanding their billing model, then configure everything in Credyt via MCP tools, then automatically verify the full billing cycle end-to-end. This skill can be run multiple times — to add new products, change pricing, or set up additional assets.
引导用户了解其计费模型,然后通过MCP工具在Credyt中完成所有配置,最后自动端到端验证完整的计费周期。该技能可多次运行——用于添加新产品、更改定价或配置额外资产。

First: Check what already exists

第一步:检查现有配置

Before jumping into discovery, check the current state by calling
credyt:list_assets
and
credyt:list_products
.
If they already have products configured, acknowledge what's there:
"I can see you already have [X] set up. Are you looking to add something new, change existing pricing, or start fresh?"
If they want to start fresh, do not archive or delete existing products. Leave them as-is. The user can manage existing products conversationally at any time (e.g. "archive the Pro product", "delete this product") — never do this automatically.
If this is their first time, proceed with full discovery.
在开始探索之前,通过调用
credyt:list_assets
credyt:list_products
检查当前状态。
如果用户已经配置了产品,需先确认现有内容:
"我看到你已经配置了[X]。你是想要添加新内容、修改现有定价,还是重新开始配置?"
如果用户选择重新开始,请勿归档或删除现有产品,保持原样即可。用户可随时通过对话管理现有产品(例如“归档Pro产品”、“删除该产品”)——切勿自动执行此类操作。
如果是首次配置,则直接进入完整探索流程。

Discovery: Understand their business

探索阶段:了解业务需求

Ask questions one at a time. Listen to each answer before asking the next. Adapt follow-ups based on what they tell you. This is a conversation, not a form.
一次只问一个问题,听完用户的回答后再提出下一个问题。根据用户的回答调整后续问题,这是一场对话而非表单填写。

What does your app do?

你的应用核心功能是什么?

"Tell me about your app — what does it do, and what are the main things your users do in it?"
Ground every follow-up question in their specific app and activities.
"请介绍一下你的应用——它主要做什么,用户在应用中主要进行哪些操作?"
后续所有问题都要结合用户的具体应用和业务场景展开。

What costs you money?

哪些操作会产生成本?

"Which of those activities cost you money to provide? For example, if you're calling an AI model, each call has a cost. What are the expensive parts?"
This identifies the billable events — the activities they'll track and eventually charge for.
"在这些操作中,哪些会产生服务成本?例如调用AI模型时,每次调用都会产生费用。哪些是成本较高的环节?"
这一步用于确定计费事件——即需要跟踪并最终向用户收费的操作。

How do you want to charge?

你希望采用哪种收费方式?

Help them pick between three approaches. Explain each using examples from their app, not abstract concepts:
  • Pay-as-you-go (prepaid wallet): Users add funds. Each activity deducts from their balance. When it runs out, they top up or service pauses. This is how OpenAI and Replicate work.
  • Monthly subscription: Flat monthly fee regardless of usage. Classic SaaS model, like Netflix. Good if they're still figuring out pricing or want predictable revenue.
  • Hybrid (subscription + credits): Monthly fee that includes a credit allowance. Extra usage costs more. This is how Cursor and Clay work.
帮助用户从三种模式中选择,需结合他们的应用场景举例,而非抽象概念:
  • 按需付费(预付费钱包):用户先充值,每次操作从余额中扣费。余额耗尽后,用户需充值或服务暂停。这是OpenAI和Replicate采用的模式。
  • 月度订阅:固定月度费用,与使用量无关。经典SaaS模式,类似Netflix。适合仍在探索定价或希望获得可预测收入的场景。
  • 混合模式(订阅+额度):月度费用包含一定额度的免费使用量,超出部分额外收费。这是Cursor和Clay采用的模式。

It's OK not to know yet

暂时不确定定价也没关系

If they're unsure about pricing, guide them to track first and price later:
"No problem — you don't need to decide on pricing now. We can start tracking all the meaningful activities in your app and what they cost you. Credyt will show you your unit economics, and you can set pricing based on real data."
For this path: set up products with zero or placeholder prices, and emphasize attaching costs to events.
如果用户对定价不确定,引导他们先跟踪数据再确定定价:
"没问题——你现在不需要确定定价。我们可以先开始跟踪应用中所有关键操作及其成本。Credyt会展示你的单位经济效益,你可以基于真实数据设置定价。"
对于这种情况:将产品价格设置为0或占位符,并重点关注为事件关联成本。

Dollars or credits?

使用美元还是自定义额度?

"Do you want your users to see prices in dollars (like '$2.50 per video') or in your own currency like credits or tokens (like '10 credits per video')?"
Credits make sense when: costs vary behind the scenes, users aren't technical, you want users to earn credits, or you might adjust pricing later.
Dollars make sense when: costs are fixed per activity, users are developers, you want full transparency.
If unsure, suggest credits — more flexibility to adjust later.
"你希望用户看到的价格是美元(例如“每生成一个视频2.50美元”),还是自定义货币如额度/代币(例如“每生成一个视频10额度”)?"
适合使用额度的场景:后台成本波动较大、用户非技术人员、希望让用户赚取额度,或未来可能调整定价。
适合使用美元的场景:每个操作的成本固定、用户为开发者、希望完全透明。
如果用户不确定,建议使用额度——未来调整时灵活性更高。

Does pricing vary?

定价是否存在差异?

"Does the cost change depending on anything? Like a higher-quality output costing more, or a different AI model being pricier?"
If yes, get the specifics. These become pricing dimensions in Credyt.
"成本是否会因某些因素而变化?例如更高质量的输出收费更高,或不同AI模型的价格不同?"
如果是,需获取具体细节。这些将成为Credyt中的定价维度。

Discovery checkpoint

探索阶段确认

Before configuring, confirm you understand:
  • What the app does and what activities matter
  • Which activities cost them money
  • Billing approach (pay-as-you-go, subscription, hybrid, or tracking first)
  • Dollars or custom currency
  • Whether pricing varies by any dimensions
If anything is unclear, ask. Don't proceed until discovery is complete.
在开始配置之前,确认你已了解以下内容:
  • 应用的功能和关键操作
  • 哪些操作会产生成本
  • 计费方式(按需付费、订阅、混合模式或先跟踪数据)
  • 使用美元还是自定义货币
  • 定价是否因维度不同而存在差异
如有任何不明确的地方,继续提问。探索阶段完成后再进入配置环节。

Configure via MCP

通过MCP进行配置

Walk the user through each step. Before executing any MCP call that creates or modifies data, show the user a table of the intended parameters and get explicit confirmation:
"I'm going to create [X] with these settings — does everything look right?"
FieldValue
......
"Let me know if you'd like to change anything before I proceed."
This applies to every mutation: creating assets, products, vendors, versions, and adjustments. Never assume values the user hasn't confirmed — especially precision, pricing, and event types.
引导用户完成每一步。在执行任何会创建或修改数据的MCP调用之前,向用户展示预期参数的表格并获取明确确认:
"我将按照以下设置创建[X]——所有参数是否正确?"
字段
......
"如果需要修改任何内容,请告知我,之后我再执行操作。"
这适用于所有变更操作:创建资产、产品、供应商、版本和调整。切勿假设用户未确认的值——尤其是精度、定价和事件类型。

Create a custom currency (if using credits/tokens/coins)

创建自定义货币(如果使用额度/代币/积分)

Only if they chose a custom currency. This must be created before any products that use it.
Use
credyt:create_asset
. Verify precision explicitly — credits are typically whole numbers (precision 0) but this must be confirmed. For example:
FieldValue
NameCredits
Code
credits
Precision0 (whole credits, no fractions)
Exchange rate1 credit = $0.05 → $1 buys 20 credits
Explain the conversion in concrete terms so the user can verify it makes sense:
After creating, use
credyt:quote_asset
to verify the conversion. Quote how many units $1, $10, and $50 would buy:
"Let me verify that... ✓ $1 buys 20 credits, $10 buys 200, $50 buys 1,000. Does that look right?"
If the conversion is wrong, use
credyt:add_asset_rate
to correct it and re-quote.
仅当用户选择自定义货币时才需要此步骤。必须在创建使用该货币的产品之前完成。
使用
credyt:create_asset
。需明确确认精度——额度通常为整数(精度0),但必须与用户确认。例如:
字段
名称额度
代码
credits
精度0(整数额度,不支持小数)
汇率1额度=0.05美元 → 1美元可购买20额度
用具体的换算说明帮助用户验证是否合理:
创建完成后,使用
credyt:quote_asset
验证换算。说明1美元、10美元和50美元可购买的额度数量:
"我来验证一下... ✓ 1美元可购买20额度,10美元可购买200额度,50美元可购买1000额度。是否符合你的预期?"
如果换算错误,使用
credyt:add_asset_rate
修正后重新验证。

Create products with pricing

创建带定价的产品

Use
credyt:create_product
for each billable activity. For example:
FieldValue
NameImage Generation
Code
image_gen
Event type
image_generated
Usage typeunit
Price10 credits per event
Key fields to confirm with the user:
  • Product name and code: What this billing item is called and its identifier
  • Event type: The activity name that triggers billing (e.g., "image_generated") — must match exactly what the app will send
  • Usage type: Per occurrence ("unit") or based on a quantity like tokens ("volume")
  • Pricing: How much each event costs
For "tracking first", set price to zero and make that explicit in the table.
A product can have both a fixed recurring price and a usage-based real-time price. For example, a $20/month subscription that also charges 1 credit per AI job is a single product with two prices — a recurring USD price and a per-event credit price. By default, use a single product with multiple prices; only create separate products if the user specifically wants them.
To update pricing on an existing product, always create a new version using
credyt:create_product_version
— never create a new product. This preserves billing history and keeps customers on their existing subscription. Show the same confirmation table before creating a version.
After creating or updating every product, use
credyt:simulate_usage
to validate. Always specify the product version explicitly in the simulation (e.g.,
version: 1
) rather than relying on the default — this ensures you're testing what you just configured:
"Let me test this — one image generation should cost 10 credits... ✓ Confirmed: 10 credits deducted, that's $0.50. Does that match what you expected?"
If the simulation doesn't match, create a new product version with
credyt:create_product_version
using the corrected pricing and re-simulate until it's right. Confirm the new version parameters in a table before creating it.
Note on version changes: After creating a new product version, any existing test customers will still be subscribed to the old version. Either create a new test customer subscribed to the new version, or update the existing customer's subscription before running verification.
使用
credyt:create_product
为每个计费操作创建产品。例如:
字段
名称图片生成
代码
image_gen
事件类型
image_generated
使用类型按次
定价每次事件10额度
需与用户确认的关键字段:
  • 产品名称和代码:计费项的名称及其标识符
  • 事件类型:触发计费的操作名称(例如“image_generated”)——必须与应用发送的名称完全匹配
  • 使用类型:按次(“unit”)或基于数量如代币(“volume”)
  • 定价:每次事件的费用
对于“先跟踪数据”的场景,将价格设置为0,并在表格中明确说明。
一个产品可以同时包含固定 recurring价格和基于使用量的实时价格。例如,每月20美元的订阅,同时每执行一次AI任务收取1额度,这属于单个产品包含两种价格——一种是美元 recurring价格,另一种是按次的额度价格。默认情况下,使用单个产品包含多个价格;仅当用户明确要求时,才创建单独的产品。
要更新现有产品的定价,始终创建新版本,使用
credyt:create_product_version
——切勿创建新的产品。这样可以保留计费历史,并让客户继续使用现有订阅。创建版本前同样需要展示确认表格。
在创建或更新每个产品后,使用
credyt:simulate_usage
进行验证。始终在模拟中明确指定产品版本(例如
version: 1
),而非依赖默认值——这样可以确保测试的是刚配置的内容:
"我来测试一下——一次图片生成应该花费10额度... ✓ 已确认:扣除10额度,折合0.50美元。是否符合你的预期?"
如果模拟结果不符,使用
credyt:create_product_version
创建更正定价的新版本,重新模拟直到正确。创建新版本前需在表格中确认参数。
版本变更注意事项:创建新版本后,现有测试客户仍会订阅旧版本。需创建订阅新版本的测试客户,或更新现有客户的订阅后再进行验证。

Included credits (entitlements)

包含额度配置(权益)

If the billing model includes credits bundled into a subscription (e.g., "$20/month includes 1,000 credits"), those are configured as entitlements at the product level — not as a negative price or a separate product.
Include an
entitlements
array in the
create_product
(or
create_product_version
) call. For example, a product that grants 1,000 credits per day:
json
"entitlements": [
  {
    "name": "Daily Credit Allowance",
    "asset": "{assetCode}",
    "amount": 1000,
    "purpose": "bundled",
    "refresh": {
      "interval": "day",
      "strategy": "expire_and_replace"
    },
    "accounting": {
      "revenue_basis": 0.00,
      "cost_basis": "auto"
    }
  }
]
Confirm the entitlement fields (name, asset, amount, refresh interval) with the user before creating, using the standard parameter table.
Do not attempt to model included credits as a negative fixed price — this fails validation and isn't the correct approach.
如果计费模型包含订阅捆绑额度(例如“每月20美元包含1000额度”),这些需在产品级别配置为权益——而非设置为负价格或创建单独产品。
create_product
(或
create_product_version
)调用中包含
entitlements
数组。例如,每天赠送1000额度的产品:
json
"entitlements": [
  {
    "name": "每日额度赠送",
    "asset": "{assetCode}",
    "amount": 1000,
    "purpose": "bundled",
    "refresh": {
      "interval": "day",
      "strategy": "expire_and_replace"
    },
    "accounting": {
      "revenue_basis": 0.00,
      "cost_basis": "auto"
    }
  }
]
创建前需与用户确认权益字段(名称、资产、数量、刷新间隔),使用标准参数表格展示。
请勿尝试将包含额度设置为负固定价格——这会验证失败,且不是正确的配置方式。

Set up cost tracking (prompt for this)

设置成本跟踪(主动询问)

Before verification, ask if they want to track what activities cost them:
"Do you want to track what each activity actually costs you? For example, if generating an image costs you $0.03 in API fees, Credyt can record that alongside the revenue so you can see your margins in real time."
If yes, create vendors with
credyt:create_vendor
for each service provider (OpenAI, Anthropic, AWS, etc.):
"You mentioned you're using OpenAI for image generation — I'll register them as a cost provider so we can track those costs."
Explain that when they send usage events from their app, they'll include a
costs
array with the vendor and amount. Credyt then calculates profit automatically.
If no, that's fine — they can add cost tracking later.
在验证之前,询问用户是否需要跟踪操作成本:
"你是否需要跟踪每个操作的实际成本?例如生成一张图片的API费用为0.03美元,Credyt可以同时记录收入和成本,让你实时查看利润率。"
如果用户同意,为每个服务提供商(OpenAI、Anthropic、AWS等)使用
credyt:create_vendor
创建供应商:
"你提到使用OpenAI进行图片生成——我将把他们注册为成本提供商,以便跟踪这些成本。"
说明当应用发送使用事件时,需包含
costs
数组,其中包含供应商和金额。Credyt会自动计算利润。
如果用户不同意也没关系——他们可以之后再添加成本跟踪。

Verify the configuration

验证配置

After all products are configured, automatically run a full billing cycle test. Don't ask — just do it.
"Now let me verify everything works end-to-end by running a test billing cycle..."
Run the verification against each product that was created or modified in this session. For each product, follow the six-step procedure in
skills/billing-verification/references/procedure.md
.
If any step fails, explain what went wrong and help fix it, then re-run the verification for that product.
"The test customer will stay in your account — since you're in test mode, this won't affect anything."
所有产品配置完成后,自动运行完整计费周期测试。无需询问,直接执行:
"现在我将通过运行测试计费周期来端到端验证所有配置是否正常..."
针对本次会话中创建或修改的每个产品运行验证。对于每个产品,遵循
skills/billing-verification/references/procedure.md
中的六步流程。
如果任何步骤失败,说明问题所在并帮助用户修复,然后重新验证该产品。
"测试客户将保留在你的账户中——由于处于测试模式,这不会产生任何实际影响。"

Wrap up

收尾

Summarize what was created and verified, then suggest next steps:
"Here's what's set up and verified in Credyt:
  • [List assets created]
  • [List products with pricing summary and verification status]
  • [List vendors if created]
Run
/credyt:billing-integration
when you're ready to wire this into your app, or
/credyt:billing-setup
again to add more products."
总结已创建和验证的内容,然后建议后续步骤:
"以下是已在Credyt中配置并验证的内容:
  • [列出创建的资产]
  • [列出产品及定价摘要和验证状态]
  • [列出已创建的供应商(如有)]
当你准备将其接入应用时,运行
/credyt:billing-integration
;如需添加更多产品,可再次运行
/credyt:billing-setup
。"