Managing Mandates
New for release 3.0 is the ability to cancel or amend any mandate that was previously set up via WPdirectdebit. Amending a mandate is limited to the first pair of metadata. (GoCardless provides for 3 key/value metadata pairs.)
To cancel or amend a mandate, you’ll need a very simple mandate management form. This will be embedded automatically into the new ‘Mandate’ tab of your WPdirectdebit settings page.
Follow this guide to create and embed your mandate management form like the one shown above: Time to complete, around 10 minutes.
Either download and import this set of ready-made forms, or follow the steps below to make your own form.
How to make your own Mandate Management form
- Create a new Gravity Form and call it Mandate Management (or similar). Under the Restrictions, we recommend you check the box marked ‘require user to be logged in’.
- Add a single line text field, and call it Mandate ID. In the general settings for this field, check ‘Required’. In the advanced settings, set the Parameter Name to gocardless-mandate-id exactly as written here.
- Add a drop-down field, and call it Action. Under the general settings for this field, click Edit Choices. Add two choices labelled Cancel and Amend, and set their values to cancel and amend respectively (capital letters make no difference).
- Save your form.
Now that you have a form to use, navigate to Forms -> Settings then click the GoCardless tab and scroll down to the Mandate Managment Form drop-down and select your new form. Save the settings.
Return to your form, and under ‘Settings’, choose GoCardless, then click ‘Add New’ to add a new GoCardless feed. Because you’ve now selected a Mandate Management Form, you’ll find there’s a feed type available called Mandate Management.
Complete the feed settings as follows:
- Set the Feed type to Mandate Management.
- A unique Feed name will have been auto-generated.
- Map Mandate ID to your Mandate ID field.
- Set Action to Map field. Map Action mapped field to your Action drop-down field.
- If you are using metadata, enter your Metadata key and map the Metadata value to your Metadata value field.
Click Save settings. It should look similar to this:
Confirmations
If you wish to, you can visit the Confirmations tab to tailor the confirmation message, or choose to redirect to a URL. A good choice of URL could be the customers tab. It will be something like this, but with your own website at the start:
https://example.com/wp-admin/options-general.php?page=wpdirectdebit_options_page&tab=tab_customers
How to manage a mandate.
Access your mandate management form via the WPdirectdebit settings. Click on the tab labelled ‘Manage Mandates’. Now you can enter the ID of any GoCardless mandate created by WPdirectdebit, and cancel or amend the mandate.
Tip: You don’t have to memorise a mandate ID. Wherever you see an underlined mandate ID, just click it to be taken to the Manage Mandates tab, with the mandate ID pre-populated on the form.
Keeping track
Gravity Forms helps you to keep track of changes you have made. Each time you make a change, you are creating a new entry for your mandate management form. You can view and edit these as you would with any form entry. In addition, the result of the amendment request is added to the entry as a note.
GoCardless will send an email to the customer automatically whenever a mandate is cancelled. You can also send your own notifications via Gravity Forms using the event ‘GoCardless mandate cancelled’. This could be useful if you want to send an email to your accounts department, for example.
Security considerations.
All you need to manage a mandate is access to the form and the mandate ID. It’s obviously not a good idea to give everyone the ability to amend mandates. To prevent misuse, we’ve added checks to the code to ensure that you must be an Admin to use the form. However anyone who has admin access to your site will be able to view your GoCardless customer data and modify mandates.