Skip to content

Automatically funding savings plan executions

You can automatically fund an end user's savings plan before each savings plan execution. By enabling direct debit funding, you can withdraw the required amount of funds from an end user's or a business's bank account ahead of each scheduled execution.

This approach leverages the end user's existing direct debit mandate.

This is especially useful for end users who haven't set up a recurring payment to their account, letting you offer fully automated, scheduled investing.

Prerequisites

How direct debit funding works

Once configured, direct debit funding runs before each savings plan execution, following the steps below.

1

Reminder & direct debit request

Prior to the execution_date (as shown in the SAVINGS_PLAN_EXECUTION.REMINDER webhook event), Upvest automatically requests a direct debit for the execution amount, referencing the mandate on the savings plan.

2

Direct debit collection

The direct debit is collected from the International Bank Account Number (IBAN) specified on the mandate, following the same lifecycle as any other direct debit funding.

3

Execution

On the execution_date, the savings plan executes as scheduled against the cash available in the account. If the account already holds sufficient funds, whether from the direct debit or from any other source, the execution proceeds even if the direct debit hasn't fully settled yet.

4

Automatic cancellation

If there still isn't enough cash in the account once the auto-cancellation threshold is reached, the execution is cancelled automatically, exactly as it would be for any other unfunded execution.

Direct debit settlement

Direct debit settlement can take a few business days. Because Upvest requests the direct debit ahead of the execution date, there is normally enough buffer for funds to arrive in time.

If a settlement takes longer than expected and no other funds are available, the execution is still cancelled once the auto-cancellation threshold is reached.

Enabling direct debit funding on a savings plan

To fund a savings plan via direct debit, include a funding object with method and mandate_id referencing an existing mandate when you create the plan.

When creating a savings plan with a direct debit, we recommend setting the start date to occur with enough time (at least two days) for the direct debit to settle.

Example funding a savings plan with direct debit

POST /savings_plans

{
  "user_id": "4b9732bd-7496-4914-8a5f-6360479d7fed",
  "account_id": "00ef0be8-d564-43af-b3c7-11b7a2188030",
  "name": "Weekly savings plan",
  "type": "INSTRUMENT",
  "instrument_id": "IE00BOM62058",
  "instrument_id_type": "ISIN",
  "cash_amount": "100.00",
  "currency": "EUR",
  "start_date": "2026-07-24",
  "period": "WEEK",
  "interval": 1,
  "funding": {
    "method": "DIRECT_DEBIT",
    "mandate_id": "95b8304e-19fc-4cd9-8e50-82532e6b8d8c"
  }
}
ParameterDescription
funding.methodThe funding method to use. This field supports: DIRECT_DEBIT.
funding.mandate_idSet this equal to the id of an existing, active direct debit mandate for the account.

The funding object is optional. If you omit it, the savings plan behaves exactly as before. However, you must ensure the account holds sufficient cash ahead of each execution.

Direct debit reference

Each direct debit collected for a savings plan shows the plan's name as the reference on the end user's bank statement and carries the Single Euro Payments Area (SEPA) purpose code INVS (a standard code identifying a collection made for an investment).

Give your savings plans a clear name so users can recognise the transaction.

Updating the funding method on an existing savings plan

You can change how a savings plan is funded after it has been created.

Example updating a savings plan to use direct debit funding

PATCH /savings_plans/{savings_plan_id}

{
  "funding": {
    "method": "DIRECT_DEBIT",
    "mandate_id": "95b8304e-19fc-4cd9-8e50-82532e6b8d8c"
  }
}

Only the funding method can be changed via this endpoint, and the change applies only to future savings plan executions.

An execution that has already been created keeps the funding it was created with and is never retroactively updated. If you need the new funding to apply to the very next execution, you must cancel and recreate the savings plan with the new funding method.

You should also check for a pending direct_debit_id and account for that collection before recreating the plan.

Tracking the direct debit for an execution

Each savings plan execution includes its own funding object and lists the id of the related direct debit (direct_debit_id). This is separate from the savings plan's funding configuration.

This value appears in the Savings plan execution events or when submitting the following GET request:

GET /savings_plans/{savings_plan_id}/executions

{
  "meta": {
    "offset": 0,
    "limit": 100,
    "count": 1,
    "total_count": 1,
    "sort": "execution_date",
    "order": "ASC"
  },
  "data": [
    {
      "id": "fc34d28e-38f5-49d2-92f6-82acb79098f4",
      "created_at": "2026-07-21T14:10:00.00Z",
      "updated_at": "2026-07-21T15:10:00.00Z",
      "user_id": "4b9732bd-7496-4913-8a5f-6360479d7fed",
      "account_id": "00ef0be8-d564-43af-b3c7-11b7a2188030",
      "savings_plan_id": "c31083c1-1cd3-405f-95d1-f49a37f0e032",
      "order_id": "68068440-6b8e-4700-8cfc-95bf21b34b96",
      "cash_amount": "100",
      "currency": "EUR",
      "status": "FILLED",
      "type": "INSTRUMENT",
      "instrument_id": "DE0007664005",
      "instrument_id_type": "ISIN",
      "execution_date": "2026-10-05",
      "fee_configuration": [
        {
          "type": "TRANSACTION_FEE_BUY",
          "transaction_fee_model_id": "3ae9403c-1611-46eb-84ee-e06a02bcfd08"
        }
      ],
      "funding": {
        "method": "DIRECT_DEBIT",
        "mandate_id": "3ae9403c-1611-46eb-84ee-e06a02bcfd08",
        "direct_debit_id": "1ab4fef9-a097-4c6f-9345-647025d5fde6"
      }
    }
  ]
}
FieldDescription
funding.direct_debit_idThe ID of the direct debit created to fund this execution. Only provided as a reference to the direct debit. The execution itself does not carry the direct debit's status.

The funding.direct_debit_id field is populated asynchronously. It is only present after the related direct debit has been created. Once the direct debit is created, this field appears in the response for every subsequent request and webhook events.

To track the status of the direct debit itself, subscribe to DIRECT_DEBIT.* webhook events. This automatically informs you of changes to the direct debit.

For example, it automatically notifies you when the funds have settled.

Cancelling an execution or plan with a pending direct debit

Cancelling a savings plan execution, or the whole plan, does not cancel a direct debit that has already been requested for it. Refer to Cancel a savings plan for the general cancellation behaviour.

If a direct debit was already requested for a cancelled execution, it is still collected as normal, and the resulting cash remains available in the account for future use.