# Confirm an instruction is in progress, then cancel it.

Confirm an instruction is in progress, then cancel it.

1. OPTIONAL — confirm the instruction is still `inProgress` before canceling, via GET /payment-instructions/{paymentInstructionId}. Cancel is only allowed while the status is `inProgress`.
 [getPaymentInstruction](/api/get-payment-instruction)
2. Cancel the payment instruction via DELETE /payment-instructions/{paymentInstructionId}. Valid only while the instruction's status is `inProgress`. Returns HTTP 204 with no body.
 [deletePaymentInstruction](/api/delete-payment-instruction)

## Workflow diagram

```mermaid
flowchart TD
  step0["1. instruction status check · API"]
  step1["2. instruction cancellation · API"]
  step0 --> step1
```
