跳到正文
cccskills
免费在 GitHub 公开

stripe-billing-cycle-test

Verify Stripe subscription billing cycles using a test clock. Use when you need to simulate time passing to trigger subscription renewals, recurring invoices, or to confirm that the next billing date generates the expected charge in Stripe test mode.

中文简介正在准备中。当前显示原文说明。

集成工具Stripe
查看安装方法

包含的文件(1)

  • SKILL.md3.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Stripe Billing Cycle Test

Standard procedure for validating that a subscription bills correctly on its next cycle by simulating time with a Stripe test clock. All steps run against Stripe test mode only (the MCP rejects live keys).

Order matters

The steps below are strictly ordered. A customer can be attached to a test clock only at creation time, so the clock must exist before the customer, and the customer before the subscription.

Steps

  1. Create the test clock. Tool: create_stripe_test_clock

    • frozen_time (required): Unix timestamp in seconds for the starting time.
    • name (optional): a label to find it later.
    • Keep the returned test clock id for the next steps.
  2. Create a customer attached to that clock. Tool: create_stripe_test_customers

    • test_clock: the id from step 1.
    • number: keep it at most 3 (max 3 customers per clock).
    • payment_method_id (optional but recommended): attach a test payment method (for example pm_card_visa) so the renewal invoice can be paid instead of staying open. Confirm against the Stripe docs which test payment method fits the card behavior you want.
    • Keep the returned customer id(s).
  3. Create the subscription. Tool: create_stripe_test_subscription

    • customer: the id from step 2.
    • items: array of { price, quantity }. The price must be a recurring price id from your test data.
    • proration_behavior (optional): create_prorations, none, or always_invoice.
    • payment_method_id (optional): the same test payment method.
    • This creates the first invoice for the current period.
  4. Advance the clock to the next billing date. Tool: advance_stripe_test_clock

    • test_clock_id: the id from step 1.
    • frozen_time: a Unix timestamp (seconds) after the current frozen time. Advance is forward-only; you cannot move a clock backward. Pick a time just past the subscription's current_period_end to cross the renewal boundary.
  5. Wait for the clock to settle, then verify.

    • advance_stripe_test_clock reports the clock status once, in its response text. Advancing is asynchronous. This MCP server does not expose a tool to retrieve or re-poll the clock, so you cannot programmatically watch it transition to ready.
    • If the response shows advancing, either wait a few seconds before proceeding, or ask the user to confirm the clock has settled in the Stripe Dashboard (test mode) before continuing.
    • Then confirm the new invoice for the renewed period was generated and has the expected amount and status. Inspect this in the Stripe Dashboard (test mode) or via the Stripe API, since the MCP does not expose an invoice-listing tool.

Notes

  • frozen_time is always a Unix timestamp in seconds (not milliseconds).
  • Customers created by this MCP are tagged with metadata.generator = stripe-testing-tools-mcp. The MCP cannot search customers by this tag, but it helps you locate them in the Stripe Dashboard or CLI; record the returned ids for programmatic cleanup.
  • For cleanup after verification, see the stripe-test-data-lifecycle skill.
  • For the full list of test-clock constraints, see the stripe-test-clock-constraints skill.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Stripe CLI の `stripe fixtures` コマンドで実行可能な fixture JSON を、対話的に整理しながら生成・検証する。test_clock を使った時間進行、サブスクのライフサイクル、失敗カードでの payment_intent 失敗、Connect 配下の Destination charge、bulk 件数のテスト顧客作成など、複数ステップの API リクエスト連鎖を扱う。「Stripe の fixture を書いて」「fixtures.json を作って」「このシナリオを fixture 化」「テストデータを大量に作りたい」「サブスクの月次失敗をテストしたい」「stripe trigger と fixture どっち使う」のような依頼で起動する。"fixture" という単語が無くても、複数ステップの Stripe テストデータ準備、 test clock を使った時間進行、 bulk なテスト顧客作成、 失敗パターンの再現といった意図が見えたら起動する。単発 API 呼び出しが目的なら起動せずに `stripe trigger` か API 1コールを案内する。

中文简介正在准备中。当前显示原文说明。

hideokamoto/stripe-testing-mcp-tools92026年7月29日 更新

Reference for Stripe test clock constraints and pitfalls. Use when planning or debugging test-clock workflows, when an advance or customer-attach step fails, or to check rules before building a time-simulation scenario with create_stripe_test_clock, advance_stripe_test_clock, and create_stripe_test_customers.

中文简介正在准备中。当前显示原文说明。

hideokamoto/stripe-testing-mcp-tools92026年7月29日 更新

Set up, verify, and clean up Stripe test data end to end. Use when creating test customers, products, or subscriptions and you want a repeatable setup-then-teardown workflow, or when you need to remove leftover test customers and products with delete_stripe_test_customers, archive_stripe_test_products, and delete_stripe_test_products.

中文简介正在准备中。当前显示原文说明。

hideokamoto/stripe-testing-mcp-tools92026年7月29日 更新

查看 hideokamoto 的全部技能

报告此技能的问题