# Delete

`DELETE https://api.paybeta.ng/v2/scheduled-payments/scheduleReference`

Authentication: `P-API-KEY` header.

Permanently delete a `cancelled` schedule and its run history. Transactions it created stay in your transaction history.

## Response 200: Success

```json
{
    "success": true,
    "message": "Schedule permanently deleted."
}
```

## Response 422: Error

```json
{
    "success": false,
    "message": "Cancel this schedule first. Only archived schedules can be deleted.",
    "errors": {
        "schedule": [
            "Cancel this schedule first. Only archived schedules can be deleted."
        ]
    }
}
```
