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

# Cancel Payments

In this guide, you will find step-by-step instructions on manually canceling a previously created payment on Yuno.

<Note>
  **Automatic Delayed Cancel**

  If you prefer to have Yuno automatically cancel authorizations after a specified delay, you can configure `delayed_cancel_settings` when creating the payment. This helps improve customer experience by automatically releasing held funds. Learn more in the [Cancel and Capture Flow](/docs/payment-features/Cancel-and-capture-flow) guide.
</Note>

<Warning>
  **Cancellable Payments**

  Only payments with **PENDING** status can be canceled. Check the [Payment status](/docs/payments-1) page for further details regarding the possible payment status.
</Warning>

## Requirements

To cancel a payment, you need to:

* Access your [API credentials](/docs/developers-credentials) on the Yuno Dashboard, which consist of:
  * `public-api-key`
  * `private-secret-key`
* Have the payment identification data received after creating the payment using the [Create Payment endpoint](/reference/create-payment):
  * `id`: The unique identifier of the payment, obtained from the parameter `id` after creating the payment.
  * `transaction_id`: The unique identifier of the transaction obtained from the parameter `transaction.id` after creating the payment.

<Note>
  **Explore Yuno Postman Collections**

  Yuno provides [Postman Collections](/reference/postman-collections) that you can use to replicate the use cases locally.
</Note>

## Cancel a payment

You can cancel a payment only if it has the PENDING status. Use the [Cancel Payment endpoint](/reference/cancel-payment) to cancel the payment. To identify the payment to be canceled, you need to provide its `id` and the `transaction_id`.

To confirm you have successfully canceled the payment, check if the parameters from the [Cancel Payment endpoint](/reference/cancel-payment) response contain the following values:

* `type = CANCEL`
* `status = SUCCEEDED`
* `payment.status = CANCELED`
* `payment.sub_status = CANCELED`

If the response contains the above values, the cancellation was successful.

### Check the payment status

If, for some reason, you need to confirm the payment cancellation:

* Use the [Retrieve Payment by ID](/reference/retrieve-payment-by-id) or [Retrieve Payment by merchant\_order\_id](/reference/retrieve-payment-by-merchant-order-id) to get detailed information about the payment.
* Alternatively, set up webhooks to receive notifications for each event. Refer to the [Webhooks](/docs/configure-webhooks) guide to learn how to configure webhooks in Yuno.
