Skip to main content
Skip table of contents

Direct debit

The Direct debit functionality is under active development, this section is subject to change.

Overview

The Crassula Direct debit feature, also known as the Subscription management functionality, provides a streamlined process for managing direct debit mandates and observing all your subscriptions. This feature is tailored to give you control over the regular payments and ensure you always have an up-to-date overview of your subscription status.

This section explains how to synchronize the Crassula direct debit feature with your existing direct debit mandates and how to manage them.

Related pages

Accounts
Transactions

Managing mandates programmatically

This section provides general instructions on how to use the Crassula API and CLI commands to manage your direct debit mandates.

The following instructions for the accounts with the ClearBank provider outline a generic workflow, covering the main operations involved in managing direct debit mandates. This aims to provide you with a general understanding of the implemented functionality. As we continue to develop this feature, you can expect more specific examples and more advanced functionalities.

Creating a direct debit mandate

Before you start, make sure that you have an account with the ClearBank provider in real GBP.

To create a direct debit mandate on the Clearbank side, run the following command:

CODE
./run bin/console rbk-payments-data:handle-clearbank-mandates create {accountId}
  • Replace {accountId} with the account number of the newly created account. Please note, this step only creates a mandate on the ClearBank side, not in Crassula.

  • To view the newly created mandates, you can either run the command below or synchronize the mandates in the Admin Panel.

Synchronizing account mandates

To synchronize the account mandates on ClearBank side and in Crassula, run the following command:

CODE
./run bin/console rbk-payments-data:handle-clearbank-mandates list {accountId}

Replace {accountId} with your account number.

Alternatively, you can achieve the same effect by making the following GET API call:

CODE
GET /api/clients/{clientId}/accounts/{accountId}/direct-debit-mandates

Cancelling a direct debit mandate

To cancel a mandate, make a POST call to the following endpoint:

CODE
POST /api/clients/{clientId}/direct-debit-mandates/{directDebitMandateId}/cancel

The mandate status will change to Waiting For Cancel.

To check if the mandate is cancelled on the ClearBank side, you can use one of the following methods:

  • Synchronize from the Admin Panel and view the list of direct debit mandates;

  • Perform an API call or run the command from this step;

  • Or, use the command below:

    CODE
    rbk-payments-data:process-cancelled-mandates

    This command checks if the mandate in status Waiting For Cancel is cancelled on the ClearBank side.

Synchronizing mandates via Admin Panel

You can synchronize existing mandates with the Crassula direct debit feature directly via Admin Panel by selecting a corresponding account.

To synchronize existing mandates with Crassula, perform the steps below:

  1. In the Admin Panel, navigate to Banking > Accounts on the left sidebar;

  2. Choose an account for synchronizing direct debit mandates with Crassula;

  3. Click the Sync mandates button in the Action column of the selected account.

The Sync mandates button in the Admin panel is available for the clients with Railsr and ClearBank providers.

Please note that funds are debited even if you don't use the Sync mandates button. This is because the functionality operates on the provider's side, not on Crassula's.

Consider using the Sync mandates button to:

  • View the complete list of mandates;

  • Decline a mandate.

You don't need to use the button often, as it doesn't influence the feature's main function.

After syncing mandates, check your account logs to see the updated status.

As a result, the corresponding subscriptions are added to the list of Crassula direct debits under the Banking > Direct Debit Mandates section of the Admin Panel.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.