Skip to main content
POST
/
subscription
/
test-clocks
Create test clock
curl --request POST \
  --url https://uat-api.clinkbill.com/api/subscription/test-clocks \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-Timestamp: <api-key>' \
  --data '
{
  "name": "April renewal simulation",
  "subscriptionId": "sub_xxxxx",
  "metadata": "{\"scene\":\"docs-demo\"}"
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "name": "<string>",
    "clockId": "<string>",
    "subscriptionId": "<string>",
    "frozenTime": 123,
    "lastAdvancedTo": 123,
    "livemode": true,
    "metadata": "<string>",
    "eventCount": 123,
    "createTime": 123,
    "updateTime": 123
  }
}

Authorizations

X-API-KEY
string
header
required

Your secret API key obtained from the Clink dashboard (Developers section)

X-Timestamp
string
header
required

Current timestamp in milliseconds since Unix epoch (required for request signing)

Body

application/json

Parameters required to create a test clock

name
string
required

Test clock name

Maximum string length: 64
subscriptionId
string
required

Unique identifier of the subscription bound to this test clock

metadata
string

Additional JSON-formatted metadata for merchant reference

Response

Test clock created successfully

Response object returned for a single test clock

code
integer<int32>

Response status code, 200 when success

Example:

200

msg
string

Brief description of what happened, 'success' when happy case

Example:

"success"

data
object

Test clock details