You can cancel an authorized transaction as long as it is not captured yet. You can also cancel a transaction you have already captured, if the capture has not been executed yet. Direct debit transactions are usually executed the next morning at about 6 a. m.
It is also a good practice to cancel authorized transactions if these shall not be captured anymore.
You can either use the API solution with POST, or the browser solution with GET. The API endpoint to capture the payment is /payment/<hash>/cancel. You need no parameters in addition to your API key.
Example of API solution with POST:
POST /payment/tujevzgobryk3303/cancel HTTP/1.1
Content-Type: application/json; charset=utf-8;
There is also a browser solution. It is very similar, but you need to call GET and to append the API key to the URL. To cancel the above transaction your URL is https://api-testing.secupay-ag.de/payment/tujevzgobryk3303/cancel/6801fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7ace.