# List, retrieve, then delete a payment plan.

List, retrieve, then delete a payment plan.

1. OPTIONAL — returns a paginated list of the terminal's payment plans and extracts the first result's `paymentPlanId`. Skip if you already hold the `paymentPlanId`.
 [listPaymentPlans](/api/list-payment-plans)
2. OPTIONAL — retrieve the payment plan to confirm its current state before deleting.
 [getPaymentPlan](/api/get-payment-plan)
3. Delete the payment plan — irreversible: the plan cannot be recovered and no further subscriptions can be added to it. The plan's `onDelete` value (`complete` vs `continue`) determines whether existing subscriptions stop or keep running. Returns 204 with no body.
 [deletePaymentPlan](/api/delete-payment-plan)

## Workflow diagram

```mermaid
flowchart TD
  step0["1. plan search · API"]
  step1["2. plan lookup · API"]
  step0 --> step1
  step2["3. delete plan request · API"]
  step1 --> step2
```
