# Soft-Delete Task and Close Payment Channel

> Soft-Delete Task and Close Payment Channel is a paid API for AI agents from scheduler.withzero.xyz, paid per call via MPP, metered — billed by usage, status healthy (last checked 2026-09-10, last successful call 2026-09-04).

Soft-deletes a scheduled cron task, closes its associated payment channel, and refunds any remaining balance to the buyer.

## Facts

- Endpoint: DELETE https://scheduler.withzero.xyz/api/v1/tasks/{id}
- Price: metered — billed by usage
- Payment: MPP
- Status: healthy
- Last checked: 2026-09-10
- Last successful call: 2026-09-04
- Success rate: 98% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 222
- Provider: scheduler.withzero.xyz
- Website: https://scheduler.withzero.xyz
- Canonical page: https://www.zero.xyz/c/scheduler-withzero-xyz-soft-delete-task-and-close-payment-channel-d7dc5747
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KkwLCkp7s5z_rLDnDXhHN

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 scheduler-withzero-xyz-soft-delete-task-and-close-payment-channel-d7dc5747 -d '<json body>'
```

Example prompt: Cancel my scheduled cron task with ID 3f2a1b4c-5d6e-7f8a-9b0c-1d2e3f4a5b6c on the zero scheduler and close the payment channel so I get my unspent USDC refunded.

## When to prefer this

Use this endpoint when you need to permanently cancel a recurring cron task and recover any remaining funds from the payment channel. Choose this over pause/resume when you have no intention of restarting the task and want finality with a refund.

## Known failure modes

- Task not found — 404 if the provided UUID does not exist
- Unauthorized — 403 if the caller cannot prove ownership of the task
- Task already deleted — 409 or similar if the task is already in a soft-deleted state
- Invalid UUID format — 400 if the path parameter is not a valid UUID
- Payment channel close failure — channel_close_tx may be null if on-chain settlement fails

## How this service works

Stop a task. Direct rail closes the payment channel and refunds remaining escrow. ZeroClick rail releases pending reservations and reports no refund because buyer billing is held by the marketplace. 📖 Full guide: https://scheduler.withzero.xyz/llms.txt

## Output

Returns a JSON object with the task UUID, updated status, the on-chain channel close transaction hash (or null), the amount in micros claimed by the seller, and the amount in micros refunded to the buyer.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "id",
  "status",
  "billing_rail",
  "channel_close_tx",
  "seller_claimed_micros",
  "buyer_refunded_micros"
 ],
 "properties": {
  "id": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "status": {
   "type": "string"
  },
  "billing_rail": {
   "enum": [
    "direct",
    "zeroclick",
    "account"
   ],
   "type": "string"
  },
  "channel_close_tx": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "buyer_refunded_micros": {
   "type": "string"
  },
  "seller_claimed_micros": {
   "type": "string"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scheduler-withzero-xyz-soft-delete-task-and-close-payment-channel-d7dc5747/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scheduler.withzero.xyz](https://www.zero.xyz/host/scheduler.withzero.xyz/llms.txt)
