Cancel payment

Payments API v1

Warning

The v1 API has been deprecated. The v1 API will be supported for the foreseeable future, at least until July 2023. However, new features will only be added to the v2 API.

The documentation for canceling payments in the new v2 API can be found here. For more information on the v2 API, refer to our v2 migration guide.

DELETEhttps://api.mollie.com/v1/payments

Some payment methods are cancellable for an amount of time, usually until the next day. Or as long as the payment status is open. Payments may be canceled manually from the Dashboard, or automatically by using this endpoint.

The canBeCancelled property on the Payment object will indicate if the payment can be canceled.

Parameters

Replace id in the endpoint URL by the payment’s ID, for example tr_7UhSN1zuXS.

Access token parameters

If you are creating an app with Mollie Connect, the testmode parameter is also available.

testmodebooleanoptional

Response

200 application/json

A payment object is returned, as described in Get payment.

Example

Request

1
2
curl -X DELETE https://api.mollie.com/v1/payments/tr_WDqYK6vllg \
    -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
HTTP/1.1 200 OK
Content-Type: application/json

{
    "resource": "payment",
    "id": "tr_WDqYK6vllg",
    "mode": "test",
    "createdDatetime": "2018-03-16T14:30:07.0Z",
    "status": "cancelled",
    "cancelledDatetime": "2018-03-16T14:34:50.0Z",
    "amount": "35.07",
    "description": "Order 33",
    "method": "banktransfer",
    "metadata": {
        "order_id": "33"
    },
    "details": {
        "bankName": "Stichting Mollie Payments",
        "bankAccount": "NL53ABNA0627535577",
        "bankBic": "ABNANL2A",
        "transferReference": "RF12-3456-7890-1234"
    },
    "profileId": "pfl_QkEhN94Ba",
    "links": {
        "webhookUrl": "https://webshop.example.org/payments/webhook",
        "redirectUrl": "https://webshop.example.org/order/33/"
    }
}