# Ozmium Morpho Midnight Fixed-Rate Repay Calldata

> Ozmium Morpho Midnight Fixed-Rate Repay Calldata is a paid API for AI agents from ozmium.org, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Generates approve + repay calldata for repaying debt in a Morpho Midnight fixed-rate lending market, with face-value (1:1 at maturity) loan-token atomic units.

## Facts

- Endpoint: POST https://ozmium.org/v1/tx/fixed/repay
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ozmium-morpho-midnight-fixed-rate-repay-calldata-4e2c1fad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dA-IXsJJ8UJlhdZgqKqhB

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ozmium-morpho-midnight-fixed-rate-repay-calldata-4e2c1fad -d '<json body>'
```

Example prompt: Generate the approve and repay calldata for my Morpho Midnight fixed-rate loan — market ID 0xabc123, I want to repay 500 face-value loan-token units, and my wallet address is 0xOwner456.

## When to prefer this

Use this endpoint when you need to repay debt in a Morpho Midnight fixed-rate lending market and want pre-built, ready-to-sign approve + repay calldata. Prefer this over manually encoding calls when working with Morpho Midnight's face-value atomic units. Not appropriate for variable-rate Morpho Blue markets, Aave, or Compound repayments.

## Known failure modes

- Missing or invalid marketId returns an error or empty steps
- Invalid owner address (non-checksummed or malformed) causes a 400-level error
- Assets value of zero or negative may be rejected
- Market ID not found in Morpho Midnight registry returns an error
- Insufficient on-chain balance at execution time (calldata is valid but tx will revert on-chain)

## How this service works

Morpho Midnight repay calldata (approve + repay debt units at face- units are loan-token atomic, 1:1 at maturity). POST /v1/tx/fixed/repay { marketId, assets (atomic face), owner }.

## Output

Returns a structured object containing an array of transaction steps, each with 'to' (contract address), 'data' (encoded calldata), and 'value' (ETH value) fields, plus a 'network' identifier. Typically includes two steps: one ERC-20 approve and one repay call to the Morpho Midnight market contract.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "steps": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "to": {
          "type": "string"
         },
         "data": {
          "type": "string"
         },
         "value": {
          "type": "string"
         }
        }
       }
      },
      "network": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ozmium-morpho-midnight-fixed-rate-repay-calldata-4e2c1fad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ozmium.org](https://www.zero.xyz/host/ozmium.org/llms.txt)
