# WritersLogic Booking Change Penalty Calculator

> WritersLogic Booking Change Penalty Calculator is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Computes the applicable cancellation/change penalty tier and penalty amount in minor currency units for a booking, given caller-supplied tiered deadline policies based on hours or local calendar days before the booking start.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/booking-change-penalty?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-booking-change-penalty-calculator-81e34343
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Cm5W1M7HCa0Ym-mrw6fUx

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 writerslogic-booking-change-penalty-calculator-81e34343 -d '<json body>'
```

Example prompt: My venue booking starts on 2025-08-15T14:00:00+02:00, the guest wants to cancel right now at 2025-08-13T10:00:00+02:00, the booking total is 25000 minor units (EUR), and my policy has two tiers: free cancellation if more than 48 hours before start, then 5000 basis points penalty if 48 hours or less — can you calculate the applicable tier and exact penalty amount using half-up rounding?

## When to prefer this

Use this endpoint when you need to apply a custom, caller-defined cancellation or change penalty policy — not a fixed airline, hotel, or marketplace policy — and require DST-correct local calendar day deadline resolution, basis-point or fixed minor-unit penalties, deterministic rounding, and optional penalty assertion checking. Prefer this over manual calculation when policies mix hours-based and local-time-based tiers.

## Known failure modes

- Missing required fields (startAt, changeAt, amountMinor, tiers) return a 400 validation error
- Invalid datetime format or timezone string causes a parse error
- Tiers with neither hoursBefore nor daysBefore, or both, are rejected as invalid policy
- Both penaltyBps and penaltyMinor specified on a single tier returns a conflict error
- changeAt after startAt triggers noShowTier logic or defaults to most severe tier
- Timezone not recognized or DST ambiguity may cause a 422 error
- amountMinor of zero results in zero penalty regardless of tier

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

Returns the name of the applicable penalty tier, the deadline instants (start and end) for that tier in UTC, the computed penalty in minor currency units (capped at the booking amount, rounded per the requested mode), the instant when the next stricter tier begins, and a pass/fail check if a claimed penalty amount was supplied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tiers": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "name"
    ],
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 64
     },
     "daysBefore": {
      "type": "integer",
      "maximum": 3650,
      "minimum": 0,
      "description": "...later than the local date of start minus this many days at atLocalTime."
     },
     "penaltyBps": {
      "type": "integer",
      "maximum": 10000,
      "minimum": 0,
      "description": "Percent of the amount in basis points. Exactly one of penaltyBps or penaltyMinor."
     },
     "atLocalTime": {
      "type": "string",
      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      "maxLength": 5,
      "description": "With daysBefore."
     },
     "hoursBefore": {
      "type": "integer",
      "maximum": 87600,
      "minimum": 0,
      "description": "This tier applies when the change is later than start minus this many hours. Exactly one of hoursBefore or daysBefore."
     },
     "penaltyMinor": {
      "type": "integer",
      "maximum": 1000000000000,
      "minimum": 0
     }
    }
   },
   "maxItems": 12,
   "minItems": 1
  },
  "startAt": {
   "type": "string",
   "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,9})?)?(Z|z|[+-]\\d{2}:?\\d{2})$",
   "maxLength": 36
  },
  "changeAt": {
   "type": "string",
   "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,9})?)?(Z|z|[+-]\\d{2}:?\\d{2})$",
   "maxLength": 36,
   "description": "The moment of cancellation/change; never read from the clock."
  },
  "currency": {
   "type": "string",
   "pattern": "^[A-Z]{3}$",
   "maxLength": 3
  },
  "rounding": {
   "enum": [
    "half-up",
    "floor",
    "ceil"
   ],
   "type": "string",
   "description": "Applied to percentage penalties."
  },
  "timeZone": {
   "type": "string",
   "pattern": "^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+){0,2}$",
   "maxLength": 64,
   "description": "Needed for daysBefore tiers."
  },
  "noShowTier": {
   "type": "string",
   "maxLength": 64,
   "description": "Tier name charged when changeAt is after startAt; default the most severe tier."
  },
  "amountMinor": {
   "type": "integer",
   "maximum": 1000000000000,
   "minimum": 0
  },
  "claimedPenaltyMinor": {
   "type": "integer",
   "maximum": 1000000000000,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-booking-change-penalty-calculator-81e34343/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
