---
title: GoCardless Mandates
slug: payments/gocardless-mandates
description: Manage GoCardless direct debit mandates in Unaric Payments for recurring and one-off bank payments.
docTags: 
createdAt: 2025-02-03T22:45:04.963Z
---

A GoCardless Mandate (sometimes referred to as an **Authorisation**) is a customer's permission for you to collect payments from their bank account via Direct Debit.

:::hint{type="info"}
If you are not using GoCardless as a Payment Service Provider (PSP), consider removing the **View Mandate** button for your users. This can be done by customizing the page layout in Salesforce Setup.
:::

## View mandates

To view a mandate:

1. Go to the **Unaric Payments Authorisation** tab and select the authorisation record.
2. On the record page, click the **View Mandate** button on the action bar.&#x20;
3. The mandate will open as saved with GoCardless.

## Update mandates

You can update a customer's email address and billing address on an *In-Force* Authorisation record with a payment route of Direct Debit directly within Salesforce.

:::hint{type="info"}
Ensure the **Update Authorisation** Lightning Action button has been added to the page layout. Refer to the release notes [v2.23.5 (Winter '23)](docId\:kYf5ucEXLbIVwUoxKIK2c)  for instructions on adding this button.
:::

1. Go to the **Unaric Payments Authorisation** tab and select the *In-Force* Authorisation record.
2. Click the **Update Authorisation** button in the action bar.
3. Update the customer's email or billing address.
4. Click **Save**. The Salesforce record and the customer record in GoCardless will be updated with the new details.

## Cancel mandates

:::hint{type="info"}
For users running on Unaric Payments package 2.15 and below, cancellation has to be done directly on the GoCardless by logging in to your GoCardless Dashboard.
:::

1. Go to the **Unaric Payments Authorisation** tab and select the Authorisation record.
2. Click the **Cancel Mandate** button. This button may be located under the dropdown menu in the action bar.
3. You will be asked to confirm cancellation. Click **I understand, Cancel Mandate&#x20;**&#x74;o finish. The Salesforce record will update to Cancelled and the Mandate will be cancelled with GoCardless.

:::hint{type="warning"}
Once you have cancelled a Mandate, you won't be able to process the payments from this authorisation record.
:::

:::hint{type="warning"}
If a *Cancelled* Mandate is processed again in Salesforce, then the Authorisation record in Salesforce is updated fro&#x6D;*&#x20;Cancelled* t&#x6F;*&#x20;Pending* and a new Customer record is created within GoCardless. This is because GoCardless treats cancelled mandates as deleted. This behaviour is by design to avoid conflicts with existing mandates. If you intend to reactivate a mandate, it's recommended to contact GoCardless support directly rather than simply re-processing the cancelled authorisation record. You will need to create a new authorisation to process payments again.
:::

### Cancel mandates programmatically

The **Cancel Mandate** functionality is accessible through Apex code and flows, offering greater flexibility and automation capabilities.

To cancel a mandate using custom code or a Flow, use the `asp04.CancelMandateProcess.CancelMandate()` Apex method. Here's an example:

:::BlockQuote
asp04.CancelMandateProcess.CancelMandate('a022z000002Fq3AAAS'); // Replace with the actual Authorisation record ID
:::

This method can be incorporated into your custom Apex code or called from a Flow to automate mandate cancellations as part of your overall business logic.

