Failed transactions aren’t available through PSD2 APIs, so it's not possible to see any unpaid or failed payments for a direct debit.
/direct-debits endpoint returns the direct debits set up for an account. It doesn’t list transactions (successful or failed) made against a DD mandate.
/transaction endpoint lists transactions, and there is a
transaction_type field which indicates which transactions are direct debit.