跳转到主要内容
已经在用 Stripe 或 Creem?@waffo/pancake-migrate CLI 会把你的产品、价格、Webhook 和品牌信息复制到 Waffo Pancake 店铺——无需手动重新录入。
迁移会迁移你的商品目录和设置,而非实时计费。活跃订阅、客户和支付方式仍保留在原处——参见 哪些内容不会迁移,了解原因及对应处理方式。
在用其他平台?我们目前支持从 StripeCreem 迁移,更多平台正在路上。联系我们,告诉我们你想从哪个平台迁移——我们会优先支持。

概念如何映射

在运行任何命令之前,先看看你现有的配置与 Waffo Pancake 如何对应。CLI 会自动处理这些映射——下表只是让你了解会发生什么。
Stripe / CreemWaffo Pancake说明
Product + Price一个产品(含 pricesPancake 将价格内嵌进产品。Stripe 的多币种价格会被保留;Creem 为单币种。
Recurring intervalbillingPeriodweekweeklymonthmonthly、每 3 个月→quarterlyyearyearly
Webhook endpoint店铺 WebhookStripe 端点会连同 URL + 事件类型映射一起迁移。(CLI 不读取 Creem 的 Webhook。)
Account branding店铺品牌信息Stripe 的客服邮箱 + 网站会迁移。
Tax behaviortaxCategoryCreem 的分类自动映射;Stripe 则通过 --tax-category 传入一个默认值。
Test / live keystest / production根据你的密钥前缀自动识别(sk_test_→test,sk_live_→production)。

开始之前

你需要准备三样东西:
  1. Node.js 18+
  2. 一个 Waffo Pancake API 密钥——即你的 Merchant ID(MER_...)和 RSA 私钥。在 Dashboard → API & Development 中创建。密钥处理方式参见 SDK 指南
  3. 你的源平台密钥——Stripe Secret Key(sk_test_... / sk_live_...)或 Creem API Key(creem_test_... / creem_...)。
迁移会在你的密钥所对应的目标环境(test 还是 live)中创建产品。请始终先用 --dry-run 预览将要创建的确切内容。

最快路径:交互模式

npx @waffo/pancake-migrate
它会一步步引导你完成:
1

选择来源

Stripe 或 Creem。
2

选择目标店铺

选择一个已有店铺,或当场创建一个新店铺。
3

预览

在创建任何内容之前,准确查看将要迁移的内容。
4

迁移

产品、价格、图片、Webhook 和品牌信息将在你的店铺中创建。

脚本化迁移

如果你更倾向于把所有内容作为 flag 传入(用于 CI,或重复执行),请使用按来源划分的子命令。

从 Stripe 迁移

# Full migration (products + webhooks + branding)
npx @waffo/pancake-migrate stripe \
  --stripe-key sk_test_xxx \
  --merchant-id MER_xxx \
  --private-key ./private.pem \
  --store-id STO_xxx \
  --tax-category saas
先用 --dry-run 预览:
npx @waffo/pancake-migrate stripe \
  --stripe-key sk_test_xxx \
  --merchant-id MER_xxx \
  --private-key ./private.pem \
  --store-id STO_xxx \
  --tax-category saas \
  --dry-run
还没有店铺?传入 --store-id new 在迁移过程中创建一个:
npx @waffo/pancake-migrate stripe \
  --stripe-key sk_test_xxx \
  --merchant-id MER_xxx \
  --private-key ./private.pem \
  --store-id new \
  --tax-category saas
--skip-products--skip-webhooks--skip-branding 跳过你不需要的步骤:
npx @waffo/pancake-migrate stripe ... --skip-webhooks --skip-branding
Stripe flag
Flag说明
--stripe-key <key>Stripe Secret Key(sk_test_...sk_live_...
--merchant-id <id>Pancake Merchant ID(MER_...
--private-key <path>Pancake API 私钥文件的路径,或原始密钥内容
--store-id <id>目标 Store ID(STO_...),或 new 以创建一个
--tax-category <cat>默认税务分类:saasdigital_goodssoftwareebookonline_courseconsultingprofessional_service
--dry-run仅预览,不创建任何内容
--yes跳过确认提示
--skip-products跳过产品迁移
--skip-webhooks跳过 Webhook 迁移
--skip-branding跳过品牌信息迁移

从 Creem 迁移

npx @waffo/pancake-migrate creem \
  --api-key creem_test_xxx \
  --merchant-id MER_xxx \
  --private-key ./private.pem \
  --store-id STO_xxx
先预览:
npx @waffo/pancake-migrate creem \
  --api-key creem_test_xxx \
  --merchant-id MER_xxx \
  --private-key ./private.pem \
  --store-id STO_xxx \
  --dry-run
Creem flag
Flag说明
--api-key <key>Creem API Key(creem_test_...creem_...
--merchant-id <id>Pancake Merchant ID(MER_...
--private-key <path>Pancake API 私钥文件的路径,或原始密钥内容
--store-id <id>目标 Store ID(STO_...),或 new 以创建一个
--dry-run仅预览,不创建任何内容
--yes跳过确认提示

哪些内容会迁移

从 Stripe 迁移

数据是否迁移
Products + Prices会——多币种、图片、描述
Billing periods会——weekweeklymonthmonthly、每 3 个月→quarterlyyearyearly
Webhook endpoints会——URL + 事件类型映射
店铺品牌信息会——客服邮箱 + 网站
环境自动识别——sk_test_→test、sk_live_→production

从 Creem 迁移

数据是否迁移
Products + Prices会——单币种、图片、描述
Billing periods会——每月→monthly、每三个月→quarterly、每年→yearly
Tax categories会——saassaasdigital-goods-servicedigital_goodsebooksebook

哪些内容不会迁移

这些都是有意为之——以下是各自的处理方式:
不会迁移原因处理方式
活跃订阅订阅是与客户银行之间的实时计费授权,无法在不同支付处理方之间复制现有订阅者通过 Waffo Pancake 结账 重新订阅。过渡期内并行运行新旧支付处理方。
客户数据在首次购买时自动创建无需处理——客户会在其首次 Pancake 支付时创建
支付方式出于 PCI 合规要求,卡数据绝不离开原支付处理方客户在结账时重新输入支付信息
优惠券 / 折扣Pancake 暂不支持
结账主题颜色Stripe 不通过 API 暴露这些信息Dashboard → Settings → Checkout 中设置

迁移之后

1

核对你的商品目录

打开 Dashboard → Products,确认价格、计费周期和图片都正确迁移过来了。
2

发布到生产环境

产品会落在你的密钥所对应的环境中。如果你迁移到了 test,请对每个产品执行 发布 以上线。
3

接入结账

将你的应用指向 Waffo Pancake 结账会话Webhook
4

先并行运行,再完成切换

在现有订阅者按各自续费节奏迁移期间,保持旧支付处理方处于活跃状态。Pancake 结账上线后,在旧支付处理方上停止新的注册。
迁移后正在搭建集成?Waffo Pancake Skill 为 AI 编码代理提供了用于结账、Webhook 和订阅的精确 @waffo/pancake-ts 工作流。