Contract validation
M01_TESTNET_OWNER_OBSERVED
POST https://kls.kinganlogic.com/v1/machine/contract/validate
M02–M13 are priced offers with paid execution held. Base collection is disabled.
Complete JSON contract · OpenAPI · Rail status
Authentication, request and response schemas
{
"schema": "KLS_MACHINE_FUNCTION_PAGE_V1",
"skuId": "KLS-M01",
"title": "Contract validation",
"url": "https://kls.kinganlogic.com/v1/machine/contract/validate",
"method": "POST",
"contentType": "application/json",
"documentationUrl": "https://kls.kinganlogic.com/capabilities/machines/M01",
"availability": "M01_TESTNET_OWNER_OBSERVED",
"authentication": {
"operatorSessionRequired": false,
"base": "Disabled. After separate activation: verified gateway PAYMENT-CONTEXT, KLS-Terms-Accepted and private KLS-Recovery-Token; wallet PAYMENT-SIGNATURE is for the gateway, not operator access.",
"testnetQuote": "No account session; buyer Testnet address required. Activation and approved signer required before a payable invoice.",
"testnetDeliveryAndRecovery": "Authorization: Bearer <private original order recovery token>"
},
"requestContract": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"input"
],
"properties": {
"input": {
"$ref": "#/components/schemas/MachineInput"
}
}
}
}
}
},
"responses": {
"200": {
"description": "After activation: signed M01 determination, not gateway settlement proof",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseSignedReceipt"
}
}
}
},
"400": {
"description": "Invalid bound request, terms or context; reconcile any attempted purchase",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
},
"402": {
"description": "After activation: gateway PAYMENT-REQUIRED; the origin does not synthesize a payable challenge"
},
"409": {
"description": "Repeated authorization or uncertain execution; use free recovery, not a new payment",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
},
"503": {
"description": "Collection, source identity, signer or configuration unavailable; not a payable promise",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
}
},
"parameters": [
{
"in": "header",
"name": "KLS-Terms-Accepted",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
{
"in": "header",
"name": "KLS-Recovery-Token",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"description": "Buyer-generated 32 random bytes encoded as lowercase hex. Save privately before payment; do not use a wallet address, input digest or UUID."
},
{
"in": "header",
"name": "PAYMENT-SIGNATURE",
"required": false,
"schema": {
"type": "string"
},
"description": "Compatible x402 v2 wallet client response to the gateway 402; never fabricated."
}
],
"workflowPaths": {
"/v1/ccd/testnet/contract/validate": {
"post": {
"summary": "M01 testnet native CCD quote; configured rail required; does not execute",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"buyer",
"input"
],
"additionalProperties": false,
"properties": {
"buyer": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{50}$"
},
"input": {
"type": "object",
"required": [
"schemaId",
"payload"
],
"additionalProperties": false,
"properties": {
"schemaId": {
"type": "string"
},
"payload": {}
}
}
}
}
}
}
},
"responses": {
"400": {
"description": "Unsupported or invalid input; no evaluation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
},
"402": {
"description": "Unpaid native CCD invoice, not x402; no evaluation or transfer. Persist the recovery token before signing.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NativeInvoice"
}
}
}
},
"503": {
"description": "Rail disabled or missing approved configuration",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
}
}
}
},
"/v1/ccd/testnet/orders/{orderId}": {
"parameters": [
{
"name": "orderId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"get": {
"summary": "Recover the original order; never makes a new payment",
"security": [
{
"orderRecovery": []
}
],
"responses": {
"200": {
"description": "Original receipt or pending original order; never requires another transfer",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/SignedReceipt"
},
{
"$ref": "#/components/schemas/PendingOrder"
}
]
}
}
}
},
"401": {
"description": "Recovery authorization required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
},
"409": {
"description": "Reconcile original order",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
}
}
},
"post": {
"summary": "Verify original transaction and admit at most one evaluation",
"security": [
{
"orderRecovery": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"transactionHash"
],
"additionalProperties": false,
"properties": {
"transactionHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Original signed receipt",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignedReceipt"
}
}
}
},
"401": {
"description": "Recovery authorization required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
},
"409": {
"description": "Unproven payment or uncertain original execution; do not repay",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
}
}
}
},
"/v1/machine/preflight": {
"post": {
"summary": "Free input identity and price reference; no evaluation or payment authority",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"input"
],
"properties": {
"input": {
"type": "object",
"required": [
"schemaId",
"payload"
],
"additionalProperties": false,
"properties": {
"schemaId": {
"type": "string"
},
"payload": {}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Canonical input/schema identities and reference price",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Preflight"
}
}
}
},
"400": {
"description": "Input rejected",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
}
}
}
},
"/v1/machine/schemas": {
"get": {
"responses": {
"200": {
"description": "Public supported schema identifiers and number domain"
}
}
}
},
"/v1/machine/schemas/{schemaId}": {
"get": {
"parameters": [
{
"in": "path",
"name": "schemaId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Selected public schema document"
},
"400": {
"description": "Unknown or private schema",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
}
}
}
},
"/v1/machine/contract/validate": {
"post": {
"operationId": "kls.contract.validate",
"summary": "Prepared Base M01 exact origin; collection disabled pending owner configuration and live acceptance",
"x-availability": "HELD",
"x-origin-implementation": "BASE_EXACT_CANDIDATE",
"x-payment": {
"network": "eip155:8453",
"asset": "USDC",
"scheme": "exact",
"priceAtomic": "50000",
"maximumAtomic": "50000",
"settlementEvidence": "Separate gateway PAYMENT-RESPONSE"
},
"parameters": [
{
"in": "header",
"name": "KLS-Terms-Accepted",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
{
"in": "header",
"name": "KLS-Recovery-Token",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"description": "Buyer-generated 32 random bytes encoded as lowercase hex. Save privately before payment; do not use a wallet address, input digest or UUID."
},
{
"in": "header",
"name": "PAYMENT-SIGNATURE",
"required": false,
"schema": {
"type": "string"
},
"description": "Compatible x402 v2 wallet client response to the gateway 402; never fabricated."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"input"
],
"properties": {
"input": {
"$ref": "#/components/schemas/MachineInput"
}
}
}
}
}
},
"responses": {
"200": {
"description": "After activation: signed M01 determination, not gateway settlement proof",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseSignedReceipt"
}
}
}
},
"400": {
"description": "Invalid bound request, terms or context; reconcile any attempted purchase",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
},
"402": {
"description": "After activation: gateway PAYMENT-REQUIRED; the origin does not synthesize a payable challenge"
},
"409": {
"description": "Repeated authorization or uncertain execution; use free recovery, not a new payment",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
},
"503": {
"description": "Collection, source identity, signer or configuration unavailable; not a payable promise",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
}
}
}
},
"/v1/base/orders/{orderId}": {
"get": {
"summary": "Free private recovery; no gateway context or new payment",
"security": [
{
"orderRecovery": []
}
],
"parameters": [
{
"in": "path",
"name": "orderId",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
}
],
"responses": {
"200": {
"description": "Same immutable signed Base receipt",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseSignedReceipt"
}
}
}
},
"401": {
"description": "Unknown order or wrong private recovery token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
},
"409": {
"description": "Uncertain original execution; reconcile without re-executing or paying",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
},
"503": {
"description": "Required signer or executor unavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachineError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"MachineInput": {
"type": "object",
"required": [
"schemaId",
"payload"
],
"additionalProperties": false,
"properties": {
"schemaId": {
"type": "string"
},
"payload": {}
}
},
"MachineError": {
"type": "object",
"required": [
"error"
],
"additionalProperties": false,
"properties": {
"error": {
"type": "string"
},
"authorityCreates": {
"const": false
},
"instruction": {
"type": "string"
}
}
},
"Preflight": {
"type": "object",
"required": [
"preflight",
"referenceUsdAtomic",
"maximumUsdAtomic",
"payment",
"evaluation"
],
"additionalProperties": false,
"properties": {
"referenceUsdAtomic": {
"const": "50000"
},
"maximumUsdAtomic": {
"const": "50000"
},
"payment": {
"const": "NOT_AUTHORIZED"
},
"evaluation": {
"const": "NOT_RUN"
},
"preflight": {
"type": "object",
"required": [
"skuId",
"schemaId",
"schemaSha256",
"inputSha256",
"payloadSha256",
"canonicalization",
"engineVersion",
"sourceCommit",
"schemaHashCanonicalization"
],
"additionalProperties": false,
"properties": {
"skuId": {
"const": "KLS-M01"
},
"schemaId": {
"type": "string"
},
"schemaSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"inputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"payloadSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"canonicalization": {
"const": "PCPD-JSON-UTF16-SAFE-INTEGER-V1"
},
"engineVersion": {
"type": "string"
},
"sourceCommit": {
"type": "string",
"pattern": "^[a-f0-9]{40}$"
},
"schemaHashCanonicalization": {
"const": "JSON_SORT_KEYS_UTF8_NO_WHITESPACE_V1"
}
}
}
}
},
"Quote": {
"type": "object",
"required": [
"orderId",
"skuId",
"inputSha256",
"schemaSha256",
"buyer",
"merchant",
"network",
"genesisHash",
"rail",
"asset",
"protocol",
"amountMicroCcd",
"maximumMicroCcd",
"referenceUsdAtomic",
"tariffVersion",
"tariffApprovedAt",
"createdAt",
"expiresAt",
"memo",
"signingKeyId",
"sourceCommit",
"networkFee"
],
"properties": {
"orderId": {
"type": "string",
"format": "uuid"
},
"skuId": {
"const": "KLS-M01"
},
"inputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"schemaSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"buyer": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{50}$"
},
"merchant": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{50}$"
},
"network": {
"enum": [
"concordium:testnet",
"concordium:mainnet"
]
},
"genesisHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"rail": {
"enum": [
"testnet",
"mainnet"
]
},
"asset": {
"const": "CCD"
},
"protocol": {
"const": "native-ccd-invoice-v1"
},
"amountMicroCcd": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})$"
},
"maximumMicroCcd": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})$"
},
"referenceUsdAtomic": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})$"
},
"tariffVersion": {
"type": "string"
},
"tariffApprovedAt": {
"type": "string",
"format": "date-time"
},
"createdAt": {
"type": "integer",
"description": "Unix milliseconds"
},
"expiresAt": {
"type": "integer",
"description": "Unix milliseconds"
},
"memo": {
"type": "string"
},
"signingKeyId": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"sourceCommit": {
"type": "string",
"pattern": "^[a-f0-9]{40}$"
},
"networkFee": {
"type": "object",
"required": [
"amountMicroCcd",
"paidBy",
"status"
],
"properties": {
"amountMicroCcd": {
"type": "null"
},
"paidBy": {
"const": "BUYER"
},
"status": {
"const": "WALLET_QUOTE_REQUIRED"
}
}
}
}
},
"NativeInvoice": {
"type": "object",
"required": [
"quote",
"recoveryToken",
"payment",
"evaluation",
"walletHandoff",
"recovery"
],
"properties": {
"quote": {
"$ref": "#/components/schemas/Quote"
},
"recoveryToken": {
"type": "string",
"x-sensitive": true,
"description": "Private order capability returned with the invoice. Persist before wallet signing; never place in a URL or public log."
},
"payment": {
"const": "UNPAID"
},
"evaluation": {
"const": "NOT_RUN"
},
"walletHandoff": {
"type": "object",
"required": [
"type",
"sender",
"recipient",
"amountMicroCcd",
"memoText",
"memoEncoding",
"network",
"genesisHash"
],
"properties": {
"type": {
"const": "NATIVE_CCD_TRANSFER_WITH_MEMO"
},
"sender": {
"type": "string"
},
"recipient": {
"type": "string"
},
"amountMicroCcd": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})$"
},
"memoText": {
"type": "string"
},
"memoEncoding": {
"const": "CBOR_TEXT_STRING"
},
"network": {
"type": "string"
},
"genesisHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
}
},
"recovery": {
"type": "string",
"format": "uri"
}
}
},
"Evaluation": {
"type": "object",
"required": [
"skuId",
"schemaId",
"schemaSha256",
"inputSha256",
"payloadSha256",
"canonicalization",
"engineVersion",
"sourceCommit",
"schemaHashCanonicalization",
"decision",
"issues",
"claimCeiling",
"authorityCreates",
"paymentFinalityCreates"
],
"properties": {
"skuId": {
"const": "KLS-M01"
},
"schemaId": {
"type": "string"
},
"schemaSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"inputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"payloadSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"canonicalization": {
"const": "PCPD-JSON-UTF16-SAFE-INTEGER-V1"
},
"engineVersion": {
"type": "string"
},
"sourceCommit": {
"type": "string",
"pattern": "^[a-f0-9]{40}$"
},
"schemaHashCanonicalization": {
"const": "JSON_SORT_KEYS_UTF8_NO_WHITESPACE_V1"
},
"decision": {
"enum": [
"PASS",
"BLOCK"
]
},
"issues": {
"type": "array",
"maxItems": 16,
"items": {
"type": "object",
"required": [
"validationPath",
"rule",
"validationHint"
],
"properties": {
"validationPath": {
"type": "string",
"maxLength": 240
},
"rule": {
"type": "string"
},
"validationHint": {
"type": "string"
}
}
}
},
"claimCeiling": {
"const": "STATELESS_SCHEMA_CONFORMANCE_ONLY"
},
"authorityCreates": {
"const": false
},
"paymentFinalityCreates": {
"const": false
}
}
},
"SignedReceipt": {
"type": "object",
"required": [
"body",
"receiptSha256",
"receiptSignature",
"signingKeyId",
"canonicalization"
],
"properties": {
"receiptSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"receiptSignature": {
"type": "string",
"description": "Compact Ed25519 JWS over the canonical body; independently pin the signing key."
},
"signingKeyId": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"canonicalization": {
"const": "PCPD-JSON-UTF16-SAFE-INTEGER-V1"
},
"body": {
"type": "object",
"required": [
"receiptVersion",
"catalogId",
"quote",
"evaluation",
"evaluationSha256",
"payment",
"thirdPartyAttestation",
"authorityCreates"
],
"properties": {
"receiptVersion": {
"const": "1.0.0"
},
"catalogId": {
"const": "KLS_OWNER_MACHINE_PRICING_V1"
},
"quote": {
"$ref": "#/components/schemas/Quote"
},
"evaluation": {
"$ref": "#/components/schemas/Evaluation"
},
"evaluationSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"thirdPartyAttestation": {
"type": "null"
},
"authorityCreates": {
"const": false
},
"payment": {
"type": "object",
"required": [
"finality",
"settlement",
"settlementAmountMicroCcd",
"networkFeeMicroCcd",
"finalityBasis"
],
"properties": {
"finality": {
"const": "FINALIZED_SUCCESS"
},
"finalityBasis": {
"const": "CONFIGURED_TRUSTED_READER"
},
"settlementAmountMicroCcd": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})$"
},
"networkFeeMicroCcd": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})$"
},
"settlement": {
"type": "object",
"required": [
"status",
"genesisHash",
"network",
"transactionHash",
"sender",
"recipient",
"amountMicroCcd",
"memo",
"blockHash",
"blockTime",
"feeMicroCcd"
],
"properties": {
"status": {
"const": "FINALIZED_SUCCESS"
},
"genesisHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"network": {
"type": "string"
},
"transactionHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"sender": {
"type": "string"
},
"recipient": {
"type": "string"
},
"amountMicroCcd": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})$"
},
"memo": {
"type": "string"
},
"blockHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"blockTime": {
"type": "integer",
"description": "Unix milliseconds"
},
"feeMicroCcd": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})$"
}
}
}
}
}
}
}
}
},
"BaseSignedReceipt": {
"type": "object",
"required": [
"body",
"receiptSha256",
"receiptSignature",
"signingKeyId",
"canonicalization"
],
"properties": {
"receiptSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"receiptSignature": {
"type": "string"
},
"signingKeyId": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"canonicalization": {
"const": "PCPD-JSON-UTF16-SAFE-INTEGER-V1"
},
"body": {
"type": "object",
"required": [
"receiptVersion",
"catalogId",
"binding",
"evaluation",
"evaluationSha256",
"payment",
"thirdPartyAttestation",
"authorityCreates"
],
"properties": {
"receiptVersion": {
"const": "1.0.0"
},
"catalogId": {
"const": "KLS_OWNER_MACHINE_PRICING_V1"
},
"evaluation": {
"$ref": "#/components/schemas/Evaluation"
},
"evaluationSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"thirdPartyAttestation": {
"type": "null"
},
"authorityCreates": {
"const": false
},
"binding": {
"type": "object",
"required": [
"orderId",
"skuId",
"inputSha256",
"schemaSha256",
"sourceCommit",
"signingKeyId",
"authorizationSha256",
"contextSha256",
"merchant",
"network",
"asset",
"priceAtomic",
"maximumAtomic",
"policyPublicationHash",
"createdAt"
],
"properties": {
"orderId": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"skuId": {
"const": "KLS-M01"
},
"inputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"schemaSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"signingKeyId": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"sourceCommit": {
"type": "string",
"pattern": "^[a-f0-9]{40}$"
},
"authorizationSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"contextSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"merchant": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"network": {
"const": "eip155:8453"
},
"asset": {
"const": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
},
"priceAtomic": {
"const": "50000"
},
"maximumAtomic": {
"const": "50000"
},
"policyPublicationHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"createdAt": {
"type": "integer"
}
}
},
"payment": {
"type": "object",
"required": [
"status",
"priceAtomic",
"maximumAtomic",
"settlementAmountAtomic",
"networkFeeAtomic",
"gatewayPaymentResponse",
"finality"
],
"properties": {
"status": {
"const": "AUTHORIZED_PENDING_GATEWAY_SETTLEMENT"
},
"priceAtomic": {
"const": "50000"
},
"maximumAtomic": {
"const": "50000"
},
"settlementAmountAtomic": {
"type": "null"
},
"networkFeeAtomic": {
"type": "null"
},
"gatewayPaymentResponse": {
"type": "null"
},
"finality": {
"const": "NOT_OBSERVED_BY_ORIGIN"
}
}
}
}
}
}
},
"PendingOrder": {
"type": "object",
"required": [
"orderId",
"state",
"quote",
"nextAction",
"paymentFinality"
],
"properties": {
"orderId": {
"type": "string"
},
"state": {
"enum": [
"QUOTED",
"EVALUATING"
]
},
"quote": {
"$ref": "#/components/schemas/Quote"
},
"nextAction": {
"type": "string"
},
"paymentFinality": {
"enum": [
"FINALIZED_SUCCESS",
"NOT_PROVEN"
]
}
}
}
},
"securitySchemes": {
"orderRecovery": {
"type": "http",
"scheme": "bearer",
"description": "Private per-order recovery token, not payment authority"
}
}
},
"openapi": "https://kls.kinganlogic.com/openapi.json",
"paymentStatus": "https://kls.kinganlogic.com/capabilities/payment-status.json",
"tariff": {
"testnet": "https://kls.kinganlogic.com/offers/kls-testnet-v1",
"base": "Owner-supplied 2026-11-16 KLS tariff; collection and enhanced-tier activation remain unapproved."
},
"boundary": "M02–M13 are priced offers with paid execution held. Base collection is disabled."
}Example calls
Free preflight; not an evaluation, invoice or wallet transfer
curl -sS 'https://kls.kinganlogic.com/v1/machine/preflight' -H 'Content-Type: application/json' --data '{"input":{"schemaId":"DefensibilityTriggerV0_1","payload":{"schemaVersion":"0.1.0","triggerId":"synthetic-m01-acceptance","priorDirectLockRef":"K0","professionalBoundaryTriggered":false,"externalDisclosurePlanned":false,"ownerDecisionRequired":false,"overlapPressureRefs":[],"designAroundQuestionRefs":[],"requestedServiceDepth":"OFF","authorityEffects":false}}}'Native Testnet invoice only after activation; set KLS_BUYER to your verified Testnet address, save the private recovery token before signing
curl -sS 'https://kls.kinganlogic.com/v1/ccd/testnet/contract/validate' -H 'Content-Type: application/json' --data "$(jq -n --arg buyer "$KLS_BUYER" --argjson input '{"schemaId":"DefensibilityTriggerV0_1","payload":{"schemaVersion":"0.1.0","triggerId":"synthetic-m01-acceptance","priorDirectLockRef":"K0","professionalBoundaryTriggered":false,"externalDisclosurePlanned":false,"ownerDecisionRequired":false,"overlapPressureRefs":[],"designAroundQuestionRefs":[],"requestedServiceDepth":"OFF","authorityEffects":false}}' '{buyer:$buyer,input:$input}')"Recover the same original order; no new payment or evaluation
curl -sS "https://kls.kinganlogic.com/v1/ccd/testnet/orders/$KLS_ORDER_ID" -H "Authorization: Bearer $KLS_RECOVERY_TOKEN"