API guide — Manage SEPA Direct Debit failures and returns
Before you start
This guide walks you through an example of usage of the Memo Bank API for managing SEPA Direct Debit failures and returns. For a guide to initiating SDD collections, refer to this article.
📑 For an in-depth understanding of the Memo Bank API resources and how you can interact with them, take a tour of our Memo Bank API Reference.
Setup your webhooks
Memo Bank uses webhooks to inform your system on mandate statuses. Understanding how our webhooks function is essential for tracking the status of a transaction and managing any necessary follow-up after they have been sent.
📑 Follow the API Reference | Webhooks to configure them for your API application and find all the details on the webhooks events structure.
Failures and returns
If for any reason the counterparty bank does not accept a collection, this will result in a failed collection.
In addition, even after the collection has been settled and your account has been credited, the counterparty bank can request a refund or return for specific reasons in accordance with the European Payment Council’s rulebook. When this happens, a refund transaction (R-transaction) is made, debiting your account.
In all cases, you can implement your own logic for the actions to take next, to either retry the failed or returned collections at a later date, or contact your debtor, depending on the reason for the failure or return.
For more details on direct debit collection errors, refer to this page. Note that fees are incurred for returns, which will be billed in the monthly invoice.
Failed collections
In these cases, we will send a collection_failed
webhook event.
{ "id": "813c987c-eb58-410b-bec4-4578846820d5", "date": "2024-10-30T06:14:25.580328Z", "event_type": "collection_failed", "resource_type": "collection", "resource_id": "696e4e1e-18ac-458c-b45e-04471b801c0e" }
From the resource_type
, you can deduce that it concerns a collection. The resource_id
sent in the event details correspond to the collection ID, which you can use to check the failure_code
by calling v2/collections/{resource_id}
.
{ "id": "beb555a8-d8c0-45db-9d81-bcc4b9bff127", "reference": "2b8cbaca-4cdd-420f-be92-3525ca212214", "amount": 600, "currency": "EUR", "mandate": { "reference": "RUMB2", "scheme": "core" }, "scheduled_date": "2024-10-29", "local_iban": "FR7617338000017890121285329", "status": "failed", "failure_code": "invalid_mandate_iban" }
Returned collections
In these cases, we send a collection_returned
webhook event.
{ "id": "e6eb1724-5def-41ef-8216-8b2843bf20ca", "date": "2025-05-28T11:07:03.088834Z", "event_type": "collection_returned", "resource_type": "collection", "resource_id": "1d329157-33bc-4e7c-8c30-58ad9341ab4c" }
From the resource_type
, you can deduce that it concerns a collection. The resource_id
sent in the event details correspond to the collection ID, which you can use to check the details by calling v2/collections/{resource_id}
.
{ "id": "1d329157-33bc-4e7c-8c30-58ad9341ab4c", "reference": "8ff45e77-86af-40a8-9f53-0f97082c26f6", "amount": 1200, "currency": "EUR", "mandate": { "reference": "RUM1", "scheme": "core" }, "scheduled_date": "2025-05-26", "local_iban": "FR7617338000011406008180976", "account_id": "874aa250-7fd8-4d9e-af2f-ee16e244cb25", "status": "returned", "return_transaction_id": "f85e527b-4485-4537-805f-170f3396eeb8" }