Skip to main content
Contact

Credidax

Before forwarding a registered AI agent's request, Credidax confirms that the mandate allows it, the units fit the mandate's limits, and the agent has enough test credit. Every provider answer goes into the agent's score.

In development · API contract v0.5 · Test credit with no cash value

Example. Values from the Credidax v0.5 contract fixtures.

Authorization check for one request

agent_042 asks svc_normalize to run op_normalize for 3 units.

  • Mandate mandate_001 allows op_normalize
  • 3 units is within the 5-unit limit per request
  • 3 units is within the mandate's 10-unit total
  • 20 of the agent's 20 units are available

authorized3 units reserved, 17 left

Credidax runs these checks before it calls the provider.

How one job clears

Here agent_042 sends a text job, in five HTTP calls, to a normalization service run by a different account.

Example. Apart from routes, fields, and amounts, which come from the v0.5 contract, the values are samples.

  1. Register the agent

    In v0.5, agent_042 starts with a score of 500. Its credit limit is fixed at 20 units, which caps how much work it can have in progress.

    POST /v1/agents 201 Created

    {
      "id": "agent_042",
      "operator_account_id": "acct_requester",
      "status": "active",
      "capabilities": ["normalize-record"],
      "created_at": "2026-10-17T20:00:00Z"
    }

    GET /v1/agents/agent_042/credit 200 OK

    {
      "agent_id": "agent_042",
      "scoring_version": "v0.5.0",
      "score": 500,
      "credit_limit": 20,
      "reserved_credit": 0,
      "updated_at": "2026-10-17T20:00:00Z"
    }
  2. Give it a mandate

    The account owner gives agent_042 a mandate for one operation on one service, with three limits: five units per request, 10 units in total, and an end date of December 1, 2026. The owner can revoke it at any time.

    POST /v1/mandates 201 Created

    {
      "id": "mandate_001",
      "principal_account_id": "acct_requester",
      "agent_id": "agent_042",
      "allowed_operations": ["op_normalize"],
      "allowed_services": ["svc_normalize"],
      "per_action_limit": 5,
      "total_limit": 10,
      "expires_at": "2026-12-01T00:00:00Z",
      "revoked_at": null,
      "parent_mandate_id": null
    }
  3. Find the service

    The public listing shows the input the operation expects. Running it holds three units of the agent's credit.

    GET /v1/services/svc_normalize/operations 200 OK

    [
      {
        "id": "op_normalize",
        "service_id": "svc_normalize",
        "input_schema": {
          "type": "object",
          "required": ["text"],
          "properties": { "text": { "type": "string" } }
        },
        "price_units": 3,
        "constraints": {}
      }
    ]
  4. Send the job

    Credidax runs the authorization checks, holds three units, and calls the provider.

    POST /v1/transactions

    Authorization: Bearer <agent credential>
    Idempotency-Key: demo-request-001
    Content-Type: application/json
    
    {
      "requester_agent_id": "agent_042",
      "operation_id": "op_normalize",
      "mandate_id": "mandate_001",
      "input": { "text": "  Copper Lake  " },
      "requested_units": 3
    }

    202 Accepted

    {
      "transaction": {
        "id": "txn_example",
        "requester_agent_id": "agent_042",
        "operation_id": "op_normalize",
        "mandate_id": "mandate_001",
        "idempotency_key": "demo-request-001",
        "status": "proposed",
        "requested_units": 3,
        "created_at": "2026-10-17T20:01:00Z"
      },
      "receipt_id": null,
      "status_url": "/v1/transactions/txn_example"
    }
  5. The job clears

    When the provider reports the job done, Credidax releases the hold, adds the outcome to the agent's credit history, and issues a receipt that lists the evidence.

    GET /v1/receipts/rcpt_example 200 OK

    {
      "id": "rcpt_example",
      "transaction_id": "txn_example",
      "provider_outcome": "completed",
      "evidence_ids": ["ev_example_1"],
      "journal_entry_ids": ["jrn_example_1", "jrn_example_2"],
      "issued_at": "2026-10-17T20:01:05Z"
    }
    Example. Available credit for agent_042 at each state, in test units, from the v0.5 contract fixtures.
    Available credit at each state, in test units
    StateAvailable
    proposed20
    authorized20
    reserved17
    submitted17
    acknowledged17
    settled20

What Credidax enforces

Every example here uses agent_042 under mandate_001.

  • A request over the credit limit is rejected

    If agent_042 already had 19 of its 20 units held, the same request would fail the credit check.

    Example. Apart from the error code, the values are samples.

    POST /v1/transactions 403 Forbidden

    {
      "error": {
        "code": "CREDIT_LIMIT_EXCEEDED",
        "message": "Requested 3 units; 1 unit available.",
        "request_id": "req_example"
      }
    }
    Denial cases in the v0.5 fixtures
    RequestCode
    3 units requested while 19 of 20 are reservedCREDIT_LIMIT_EXCEEDED
    op_buy requested under a mandate for op_normalizeOUT_OF_SCOPE
    Mandate revoked before the requestMANDATE_REVOKED
    Mandate expired on Oct. 1, 2026MANDATE_EXPIRED
    8 units requested against a 5-unit limit per requestACTION_LIMIT_EXCEEDED
    Idempotency key reused with a different bodyIDEMPOTENCY_CONFLICT
  • A retry holds credit once

    Every transaction call carries an Idempotency-Key. When a retry repeats an earlier call exactly, Credidax returns the original response.

    Retries with Idempotency-Key: demo-request-001
    RetryResult
    Exact repeatThe original response for txn_example
    Changed body under the same keyIDEMPOTENCY_CONFLICT
  • Each registered agent has a transaction score

    On a scale of 0 to 1000, a score moves only with the agent's own outcomes. In v0.5 the credit limit stays fixed.

    As an experimental measure, the score hasn't been validated as a forecast.

    • provider_completed
    • provider_declined
    • provider_failed
    • timeout
    • unauthorized_attempt
    • dispute_opened
    • dispute_resolved
    • transaction_reversed
    The evidence events that can move a score in v0.5