> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plane.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel a payment

> Cancel a previously created payment.

You can cancel a previously created payment if its status is `pending`.

### Parameters

<ParamField type="string" path="id" initialValue="pt_LcjXBMrTTwS1GreTcqWSvGhW" required>
  The ID of a payment object.
</ParamField>

### Returns

Returns the payment id and status if the cancellation succeeds. Returns an error if the payment is already cancelled or can’t be cancelled.

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "pt_KhzQL81YnE3B7K6MZb65gCJx",
    "status": "cancelled"
  }
  ```
</ResponseExample>
