Skip to Content
Paycose Docs
Test clocks

Test clocks

The test_clock object

A test clock freezes time for the subscriptions attached to it, so you can advance it and watch renewals, trials and invoices happen without waiting. Test mode only.

Attributes

  • livemodebooleanRequired

    true when the object exists in live mode, false in test mode.

  • idstringRequired

    Unique identifier for the object.

  • objectstringRequired

    String naming the object's type.

  • application_idstringRequired

    ID of the application the clock belongs to.

  • countrystringRequired

    Two-letter country code the clock belongs to.

  • namestring

    Your name for the clock; omitted when none.

  • frozen_timetimestampRequired

    The time the clock is frozen at. Attached subscriptions see this as now.

  • statusstringRequired

    ready when the clock can be advanced, advancing while an advance runs, internal_failure when the last advance failed.

    • ready

      The clock can be advanced.

    • advancing

      An advance is running or the provider is still catching up.

    • internal_failure

      The last advance failed.

  • providerstringRequired

    Who runs the clock: internal when Paycose bills the attached subscriptions, otherwise the provider that does.

  • provider_clock_idstring

    ID of the matching clock at the provider; omitted for internal clocks.

  • deletes_aftertimestampNullable

    When the clock and its test data are deleted; omitted when it is kept.

  • createdtimestampRequired

    Time the object was created, in Unix seconds.

  • updatedtimestampRequired

    Time the object last changed, in Unix seconds.

  • subscription_countintegerRequired

    Number of subscriptions attached to the clock.

  • pending_schedule_countintegerRequired

    Number of scheduled billing steps (renewals, trial ends, retries) still waiting on the clock.

  • next_event_attimestampNullable

    When the next scheduled step falls due; omitted when none is waiting.

  • max_advance_totimestampNullable

    The furthest one advance may move the clock, two billing intervals of its shortest subscription; omitted when it holds none.