Skip to main content
Guide: Testing.

Base URL

These routes only exist in test mode: an sk_live_ key receives 403 { "error": "Test clocks are not available in live mode", "code": "TEST_CLOCK_NOT_AVAILABLE" }.

The test_clock object

string
Identifier, prefixed clock_.
string
Your account.
string | null
Free label.
string
The clock’s current instant (ISO 8601).
string
ready, advancing, completed.
array
On the list: the attached objects.
string

Create a clock

Returns 201 and the object.

List · Retrieve · Delete

Deleting detaches the attached subscriptions and customers, which go back to real time.

Attach

At least one of the two. Returns 200 { testClock, attached: [{ type, id }] }.

Advance

Replays, for every attached subscription, everything real time would have triggered between the two instants: trial end, D-3 reminder (invoice issued and sent), due date (billing.due, which invoices and requests payment), scheduled cancellation.
200
The triggered processing is asynchronous: its outcome is read on the subscription, its invoices and your webhooks.

Simulate in one call

Creates the clock, attaches the subscription, advances. Same response as advance.

Errors

Body { "error": "…", "code": "…" }.