billing-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCredyt 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 and .
credyt:list_assetscredyt:list_productsIf 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_assetscredyt: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会展示你的单位经济效益,你可以根据真实数据设置定价。"
对于这种情况:设置产品价格为零或占位符价格,并强调为事件关联成本。
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?"
Field Value ... ... "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 . Verify precision explicitly — credits are typically whole numbers (precision 0) but this must be confirmed. For example:
credyt:create_asset
Field Value Name Credits Code creditsPrecision 0 (whole credits, no fractions) Exchange rate 1 credit = $0.05 → $1 buys 20 credits
Explain the conversion in concrete terms so the user can verify it makes sense:
After creating, use to verify the conversion. Quote how many units $1, $10, and $50 would buy:
credyt:quote_asset"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 to correct it and re-quote.
credyt:add_asset_rate仅当用户选择自定义货币时执行此操作。必须在使用该货币的产品创建前完成自定义货币的创建。
使用。需明确确认精度——积分通常为整数(精度0),但必须得到用户确认。例如:
credyt:create_asset
字段 值 名称 积分 代码 credits精度 0(整数积分,无小数) 汇率 1积分=0.05美元 → 1美元可购买20积分
用具体术语解释转换关系,方便用户验证是否合理:
创建完成后,使用验证转换关系。查询1美元、10美元和50美元可购买的积分数量:
credyt:quote_asset"让我验证一下... ✓ 1美元可购买20积分,10美元可购买200积分,50美元可购买1000积分。这看起来是否正确?"
如果转换关系错误,使用进行修正并重新查询。
credyt:add_asset_rateCreate products with pricing
创建带定价的产品
Use for each billable activity. For example:
credyt:create_product
Field Value Name Image Generation Code image_genEvent type image_generatedUsage type unit Price 10 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 — 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.
credyt:create_product_versionAfter creating or updating every product, use to validate. Always specify the product version explicitly in the simulation (e.g., ) rather than relying on the default — this ensures you're testing what you just configured:
credyt:simulate_usageversion: 1"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 using the corrected pricing and re-simulate until it's right. Confirm the new version parameters in a table before creating it.
credyt:create_product_versionNote 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使用类型 unit(按次) 价格 每次事件10积分
需与用户确认的关键字段:
- 产品名称和代码:此计费项的名称及其标识符
- 事件类型:触发计费的活动名称(例如"image_generated")——必须与应用将发送的名称完全匹配
- 使用类型:按次("unit")或基于数量(如代币,"volume")
- 定价:每次事件的费用
对于“先跟踪数据”的场景,将价格设置为零并在表格中明确标注。
一个产品可以同时包含固定 recurring 价格和基于使用量的实时价格。例如,每月20美元订阅费加上每次AI任务1积分的收费,是一个包含两种价格的单一产品——一种是月度固定美元价格,另一种是按次积分价格。默认情况下,使用单一产品搭配多种价格;仅当用户明确要求时才创建单独产品。
要更新现有产品的定价,始终创建新版本,使用——切勿创建新产品。这样可以保留计费历史,并让客户继续使用现有订阅。创建版本前同样需要展示确认表格。
credyt:create_product_version创建或更新每个产品后,使用进行验证。在模拟中始终明确指定产品版本(例如),而非依赖默认值——这确保你测试的是刚配置的内容:
credyt:simulate_usageversion: 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 array in the (or ) call. Entitlements have two modes:
entitlementscreate_productcreate_product_versionRecurring — credits refresh on a schedule (e.g., 1,000 credits every month):
json
"entitlements": [
{
"name": "Monthly Credit Allowance",
"asset": "{assetCode}",
"amount": 1000,
"purpose": "bundled",
"lifecycle": {
"duration": "month",
"duration_count": 1,
"refresh": {
"strategy": "expire_and_replace"
}
},
"accounting": {
"revenue_basis": 0.00,
"cost_basis": "auto"
}
}
]One-off — credits granted once and never refreshed (e.g., a sign-up bonus or promotional grant). Omit :
lifecycle.refreshjson
"entitlements": [
{
"name": "Welcome Bonus",
"asset": "{assetCode}",
"amount": 500,
"purpose": "promotion",
"lifecycle": {
"duration": "month",
"duration_count": 1
},
"accounting": {
"revenue_basis": 0.00,
"cost_basis": "auto"
}
}
]lifecycle.durationduration_countduration: "month", duration_count: 3purpose"bundled""promotion"Confirm the entitlement fields (name, asset, amount, lifecycle duration, and whether it refreshes) 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_productcreate_product_versionentitlements定期刷新——积分按计划刷新(例如每月1000积分):
json
"entitlements": [
{
"name": "月度积分额度",
"asset": "{assetCode}",
"amount": 1000,
"purpose": "bundled",
"lifecycle": {
"duration": "month",
"duration_count": 1,
"refresh": {
"strategy": "expire_and_replace"
}
},
"accounting": {
"revenue_basis": 0.00,
"cost_basis": "auto"
}
}
]一次性发放——积分仅发放一次且不刷新(例如注册奖励或促销赠分)。省略:
lifecycle.refreshjson
"entitlements": [
{
"name": "欢迎奖励积分",
"asset": "{assetCode}",
"amount": 500,
"purpose": "promotion",
"lifecycle": {
"duration": "month",
"duration_count": 1
},
"accounting": {
"revenue_basis": 0.00,
"cost_basis": "auto"
}
}
]lifecycle.durationduration_countduration: "month", duration_count: 3purpose"bundled""promotion"创建前需与用户确认权益字段(名称、资产、数量、生命周期时长以及是否刷新),使用标准参数表格。
请勿尝试将包含积分设置为负固定价格——这会验证失败,且并非正确做法。
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 for each service provider (OpenAI, Anthropic, AWS, etc.):
credyt:create_vendor"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 array with the vendor and amount. Credyt then calculates profit automatically.
costsIf no, that's fine — they can add cost tracking later.
在验证前,询问用户是否想要跟踪每项活动的实际成本:
"你想要跟踪每项活动的实际成本吗?例如,如果生成一张图片花费你0.03美元的API费用,Credyt可以将其与收入一起记录,让你实时查看利润率。"
如果是,为每个服务提供商(OpenAI、Anthropic、AWS等)使用创建供应商:
credyt:create_vendor"你提到使用OpenAI进行图片生成——我将注册他们作为成本提供商,以便跟踪这些成本。"
解释当用户从应用发送使用事件时,需包含数组,其中包含供应商和金额。Credyt会自动计算利润。
costs如果否也没关系——他们可以后续再添加成本跟踪。
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.mdIf 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]
Runwhen you're ready to wire this into your app, or/credyt:billing-integrationagain to add more products."/credyt:billing-setup
总结已创建和验证的内容,然后建议下一步操作:
"以下是在Credyt中已设置并验证的内容:
- [列出已创建的资产]
- [列出产品及定价摘要和验证状态]
- [列出已创建的供应商(如有)]
当你准备将其接入应用时,运行,或再次运行/credyt:billing-integration添加更多产品。"/credyt:billing-setup
Next step
下一步
This skill only configures products and pricing. Do not write integration code yourself — SDK shapes, endpoints, and auth headers are easy to guess wrong.
Run the skill next. If it is not installed, ask the user to install it:
billing-integration"Run, then ask me to run the billing-integration skill."npx skills add credyt/ai-tools
If the skill is not available and the user has not explicitly asked you to write integration code, stop here and wait for them to install it. Do not hand-roll fetch calls or invent API endpoints.
The preferred way to call the Credyt API from application code is via one of the official SDKs: (TypeScript/Node.js) or (Python). If neither SDK suits your stack, the billing-integration skill also covers HTTP direct calls.
@credyt/api-clientcredyt-api此技能仅配置产品和定价。请勿自行编写集成代码——SDK结构、端点和认证头很容易出错。
接下来运行技能。如果未安装,请让用户安装:
billing-integration"运行,然后让我运行billing-integration技能。"npx skills add credyt/ai-tools
如果该技能不可用且用户未明确要求编写集成代码,请在此停止并等待用户安装。请勿手动编写请求调用或自行创建API端点。
从应用代码调用Credyt API的首选方式是使用官方SDK之一:(TypeScript/Node.js)或(Python)。如果这两个SDK都不适合你的技术栈,billing-integration技能也涵盖了直接HTTP调用的内容。
@credyt/api-clientcredyt-api