Skip to main content
POST
/
v0
/
testClocks
Create
curl --request POST \
  --url https://api.paygentic.io/v0/testClocks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "currentTime": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "merchantId": "<string>",
  "name": "<string>"
}'
{
  "id": "tc_a1b2c3d4e5f6g7h8",
  "createdAt": "2024-02-28T10:00:00Z",
  "currentTime": "2024-03-01T00:00:00Z",
  "deletedAt": null,
  "description": "Test clock for monthly subscription billing scenarios",
  "merchantId": "org_i9j0k1l2m3n4o5p6",
  "name": "Monthly Billing Test",
  "updatedAt": "2024-02-28T10:00:00Z"
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json
currentTime
string<date-time>

Initial time for the test clock (defaults to current time). Cannot be more than 1 hour in the past to prevent accidental backdating. The 1-hour buffer accounts for clock drift and network delays.

description
string

Description of the test clock's purpose

merchantId
string

The merchant organization that will own this test clock. If not provided, will be extracted from authenticated user's context.

name
string

Name of the test clock

Response

Test clock created successfully

id
string
required

Unique identifier for the test clock

createdAt
string<date-time>
required

When the test clock was created

currentTime
string<date-time>
required

The simulated current time of the test clock

merchantId
string
required

The merchant organization that owns this test clock

updatedAt
string<date-time>
required

When the test clock was last updated

deletedAt
string<date-time> | null

When the test clock was deleted (if applicable)

description
string | null

Description of the test clock's purpose

name
string | null

Name of the test clock