# Submitting a direct debit funding request

## Prerequisites

Before triggering a direct debit request, you must ensure that:

- **Authentication scopes** — `mandates:admin`, `payments:admin`
For more information, refer to [Authentication scopes](/products/tol/concepts/api_concepts/authentication/authentication_oauth#list-of-authentication-scopes).
- **Webhook handler ready** — Set up a webhook endpoint to listen for direct debit lifecycle events.
  - Subscribe to [`DIRECT_DEBIT.*`](/products/tol/guides/payments/payments_webhooks) events.
For more information, refer to [Implementing webhooks](/products/tol/getting_started/implementing_webhooks).
- The [user is onboarded](/products/tol/guides/users/users_onboarding_overview) and active
- A valid [direct debit mandate](/products/tol/guides/payments/direct_debit/direct_debit_intro) is assigned


You must also ensure that a [user](/products/tol/guides/users/users_onboarding_overview) or a [business](/products/tol/guides/accounts/businesses_overview) is onboarded and active, and assigned a valid [direct debit mandate](/products/tol/guides/payments/direct_debit/direct_debit_intro).

The following flow diagram illustrates the direct debit flow including all related direct debit status changes, and cash balance updates:

To request a direct debit funding, specify the mandate and funding amount for the end user's or business entity's account group and call

**POST** [`/payments/direct_debits`](/api/direct-debits/create_direct_debit)

Request
```json
{
    "user_id": "83d83ec2-d2ca-49ff-bbea-b92b5c3be202",
    "account_group_id": "1ea60f56-b67b-61fc-829a-0242ac130003",
    "mandate_id": "95b8304e-19fc-4cd9-8e50-82532e6b8d8c",
    "cash_amount": "200.00",
    "currency": "EUR",
    "remittance_information": "payment for green energy portfolio",
    "purpose_code": "OTHR"
}
```

Response
```json
{
    "id": "6ffa6b16-2380-4e7a-88b2-ae625c8eef99",
    "created_at": "2020-08-24T14:15:22Z",
    "updated_at": "2020-08-24T14:15:22Z",
    "reference_account_id": "295378ec-036e-4f3f-ae5c-2be85c93e837",
    "account_group_id": "ac1c39e9-2101-46b8-a624-d10a9e351b6c",
    "user_id": "b668282b-cdf3-439a-bda2-3f3c9f655bb7",
    "amount": "200.00",
    "currency": "EUR",
    "remittance_information": "Withdrawal",
    "taxes": [
        {
            "type": "TOTAL",
            "amount": "38.00",
            "currency": "EUR"
        }
    ],
    "status": "NEW",
    "purpose_code": "OTHR"
}
```

The `user_id` field is optional and in the process of being removed from the request. You should not include the `user_id` in the request.

**Remittance Information Disclaimer**

Please be aware that while our API allows you to specify detailed remittance information for your direct debits, we cannot guarantee that this information will be transmitted to the recipient's bank without modification.

Some banks may have limitations on the characters or length of remittance information they can process. This may result in the information being truncated, altered, or omitted entirely.

We recommend keeping your remittance information concise and avoiding special characters or non-standard formatting.

You will also receive a direct debit `NEW` webhook with exactly the same payload.

Webhooks notify you of events in business processes, not the success or failure of the initialisation of those processes.

Please be sure to check the [HTTP status](/api_errors) of the response to your requests and handle failure cases appropriately.

## Direct debit update

**Recommended: Use webhooks to track direct debit status**

To track the direct debit statuses, set up a webhook listener for `DIRECT_DEBIT.PROCESSING` and `DIRECT_DEBIT.CONFIRMED` events. You will receive automatic notifications as the direct debit progresses through processing and settlement (typically 2–5 business days via SEPA).

For more information, refer to [Payment webhook events](/products/tol/guides/payments/payments_webhooks)

Once all relevant payment checks have been passed and the payment instruction has been forwarded to our payment partner, the direct debit transitions into the `PROCESSING` status and you will receive a direct debit event via webhook.

Afterwards, the direct debit gets executed and confirmed at our payment partner and you will receive a direct debit `CONFIRMED` webhook.

## Next steps

Now that the account group is sufficiently funded, you are ready to proceed with your first [order](/products/tol/guides/orders/orders_introduction) request. Alternatively, you can also register a reference bank account if you would like to withdraw funds instead.