sincecutoff.com
← all changes

Stripe test clock creation accepts a customer parameter

Introduced 2026-05-27 · score 0.97

HOW TO USE IT

When creating a test clock for API-based testing with an existing customer, pass the customer ID in `customer`; Stripe says an attached customer cannot be removed.

curl https://api.stripe.com/v1/test_helpers/test_clocks \ -u "<YOUR_SECRET_KEY>" \ -H "Stripe-Version: 2026-05-27.dahlia" \ -d frozen_time=<UNIX_TIMESTAMP> \ -d customer=<CUSTOMER_ID>

WHY THIS HELPS

When automating test clock setup for API-based testing, create the test clock with an existing customer attached.

BEFORE THIS CHANGE

Use the Dashboard to attach a customer to a test clock.

REQUIREMENTS AND LIMITATIONS

  • frozen_time (required): Timestamp for the test clock’s initial frozen time.
  • customer: Existing customer to attach to the test clock; attached customers cannot be removed.
  • Stripe-Version (required): Set to `2026-05-27.dahlia` to use the documented API version.
  • Prerequisite: Use a Stripe secret key for authentication.
  • Prerequisite: Send API requests with `Stripe-Version: 2026-05-27.dahlia` for this version.
  • The `customer` parameter accepts an existing customer ID.
  • After a customer is attached to a test clock, it cannot be removed.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card