# Canceling a Payment

**URL:** <https://community.rapyd.net/t/canceling-a-payment/58603>\
**Category:** General\
**Created:** [April 20, 2023, 10:52pm UTC](https://community.rapyd.net/t/canceling-a-payment/58603 "2023-04-20T22:52:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Community\_Team](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Community\_Team](https://community.rapyd.net/u/Community_Team)\
**Post date:** [April 20, 2023, 10:52pm UTC](https://community.rapyd.net/t/canceling-a-payment/58603/1 "2023-04-20T22:52:56Z")

</div>

If you want to cancel a payment that has a status of payment is ACT (Active), you can do so by using the [Cancel Payment](https://docs.rapyd.net/build-with-rapyd/reference/payment#cancel-payment) request.

Note: This is relevant to payment methods listed with is\_cancelable = true You can check this capability to cancel in the response to List Payment Methods by Country.

You can cancel after a payment is made through the API, or the checkout page.

Once you make the Cancel Payment request this will trigger the Payment Canceled webhook. This webhook contains the same information as the response.  
Note: If the status is already marked as CLO, use the Create Refund method.

## Cancel Payment

Created a payment request, with a payment id of payment\_ebb1ff323434fa8af1dd14125a5d8bb1

### Request

```auto
DELETE https://sandboxapi.rapyd.net/v1/payments/payment

Payment: payment_ebb1ff323434fa8af1dd14125a5d8bb1 

```

### Response

```auto
{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "c0812778-a182-4422-95f5-b0275d32bdd3"
    },
    "data": {
        "id": "payment_ebb1ff323434fa8af1dd14125a5d8bb1",
        "amount": 0,
        "original_amount": 1000,
        "is_partial": false,
        "currency_code": "EUR",
        "country_code": "gb",
        "status": "CAN",
        "description": "Payment by bank transfer1",
        "merchant_reference_id": "",
        "customer_token": "cus_183225bd57e4bc4967bf8b4ddc9c6144",
        "payment_method": "other_1250610cd81c35ed0f087c2759bd282b",
        "payment_method_data": {},
        "auth_code": null,
        "expiration": 1687214991,
        "captured": true,
        "refunded": false,
        "refunded_amount": 0,
        "receipt_email": "",
        "redirect_url": "https://sandboxcheckout.rapyd.net/complete-bank-payment?token=payment_ebb1ff323434fa8af1dd14125a5d8bb1&complete_payment_url=&error_payment_url=",
        "complete_payment_url": "",
        "error_payment_url": "",
        "receipt_number": "",
        "flow_type": "",
        "address": null,
        "statement_descriptor": " ******** LLL",
        "transaction_id": "",
        "created_at": 1682030991,
        "metadata": {},
        "failure_code": "",
        "failure_message": "",
        "paid": false,
        "paid_at": 0,
        "dispute": null,
        "refunds": null,
        "order": null,
        "outcome": null,
        "visual_codes": {},
        "textual_codes": {},
        "instructions": {
            "name": "instructions",
            "steps": [
                {
                    "step1": "The URL can be used for redirecting the user or to forward it to the consumer for signing. This link expires in 60 days or after its first use, whichever comes first."
                }
            ]
        },
        "ewallet_id": "ewallet_db4ad4a76278f94c4a83dd9b28b483ed",
        "ewallets": [
            {
                "ewallet_id": "ewallet_db4ad4a76278f94c4a83dd9b28b483ed",
                "amount": 1000,
                "percent": 100,
                "refunded_amount": 0
            }
        ],
        "payment_method_options": {},
        "payment_method_type": "gb_sepadirectdebit_bank",
        "payment_method_type_category": "bank_redirect",
        "fx_rate": 1,
        "merchant_requested_currency": null,
        "merchant_requested_amount": null,
        "fixed_side": "",
        "payment_fees": null,
        "invoice": "",
        "escrow": null,
        "group_payment": "",
        "cancel_reason": null,
        "initiation_type": "customer_present",
        "mid": "",
        "next_action": "not_applicable",
        "error_code": "",
        "remitter_information": {},
        "save_payment_method": true
    }
}

```
