> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt. # Check-in and Key Rotation Check in and rotate keys using the current terminal credentials. Confirm the rotation frequency during setup; do not automatically check in after a payment timeout. ## API Information - **Endpoint:** POST `https://api.aimt-horizon.com/terminal/checkin` - **Signature:** Uses the current `terminal_sn` + `terminal_key` ## Request Parameters | Field | Type | Requirement | | --------------------------------------- | ------ | ------------------------------------------------------------------------ | | `terminal_sn` | String | Required; matches Authorization. | | `return_store` / `return_time` | String | Optional; string "1" requests store details / server epoch milliseconds. | | `device_id` / `os_info` / `sdk_version` | String | Optional; actual caller device metadata. | ## Request Example ```json { "terminal_sn": "2101107140290972547", "return_time": "1" } ``` ## Response Verification and Key Update A successful response contains the new `biz_response.terminal_key`. **This is an exception to ordinary response signing:** the successful response is signed with the new key, not the request key. Keep HTTPS certificate validation enabled. Retain the raw response, extract the new key and verify the original bytes with it; atomically persist the key after validation and use it for subsequent requests. Failure responses still use the matched request key. :::warning Concurrent Rotation and Key Storage Avoid concurrent rotation by multiple instances for one terminal. The server supports next/current/last transitions, but old keys are not guaranteed indefinitely. Never put new keys in logs, screenshots or frontend configuration. :::