Cancel payment

Payments API v2
DELETEhttps://api.mollie.com/v2/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 isCancelable 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.

Response

200 application/hal+json; charset=utf-8

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

Example

Request

1
2
curl -X DELETE https://api.mollie.com/v2/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
29
30
31
32
33
34
35
36
37
HTTP/1.1 200 OK
Content-Type: application/hal+json; charset=utf-8

{
    "resource": "payment",
    "id": "tr_WDqYK6vllg",
    "mode": "live",
    "createdAt": "2018-03-19T10:18:33+00:00",
    "amount": {
        "value": "35.07",
        "currency": "EUR"
    },
    "description": "Order 33",
    "method": "banktransfer",
    "metadata": null,
    "status": "canceled",
    "canceledAt": "2018-03-19T10:19:15+00:00",
    "details": {
        "bankName": "Stichting Mollie Payments",
        "bankAccount": "NL53ABNA0627535577",
        "bankBic": "ABNANL2A",
        "transferReference": "RF12-3456-7890-1234"
    },
    "profileId": "pfl_QkEhN94Ba",
    "sequenceType": "oneoff",
    "redirectUrl": "https://webshop.example.org/order/33/",
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/payments-api/cancel-payment",
            "type": "text/html"
        }
    }
}