Once you you have WPdirectdebit installed and working for you, there are several ways you can monitor the work it is doing for you.

GoCardless events

An event refers to a GoCardless resource which has been updated, for example a payment which has been collected, or a mandate which has been transferred. Events are generated by GoCardless and reported to your website so your site can act upon them if it needs to. This communication goes via the GoCardless API, and makes use of the webhooks mechanism which is a part of the WordPress API.

For example, when a new customer completes a form on your site to set up a recurring payment, a request will also be made to set up a new mandate. The changing of state of the mandate triggers an event; once the mandate has been created, WPdirectdebit will respond to the event by requesting that the recurring payment is set up.

Viewing Events

When WPdirectdebit has been installed and activated, you’ll notice a new addition to your website’s administrator dashboard.

In the left-hand menu you’ll now find an entry called GoCardless Events. This is where you can view the messages that have been received from GoCardless. These messages are how WPdirectdebit keeps track of relevant events as they occur in your GoCardless account, such as the acceptance of a Direct Debit mandate for a customer, receipt of a payment, the cancellation of a mandate, etc. There won’t be any events recorded until your site is linked to your GoCardless account and at least one payment or subscription has been created.

When an event is received and processed, a note may be added to the notes on the relevant form entry. If ‘Events History’ is enabled, the event ID is appended to the note, as shown here.

Here you can see some examples of logged events.

Two events from GoCardless recorded in the Events log.

Each event has a unique identifier, shown in blue. Events come in different types; here you can see examples of a payment event and a subscription event. The payment event has an identifier, starting with PM. Subscription events start with SB. The one here has ID SB0001WF12K6KQ. You can also see the time of the event and a brief description of the cause of the event.

Cross-referencing Events

In day-to-day use you won’t have much need to check this log of events but in your testing stage it will give you confidence that WPdirectdebit is receiving and responding to events as they are generated by GoCardless. Incidentally, GoCardless logs all events and you can see these in your GoCardless dashboard by logging on to your GoCardless account. You should find that you can match them up. The subscription event with ID SB0001WF12K6KQ appears here in the GoCardless events list.

Deleting Events

You can decide how many days to keep an event logged. Keeping events for a long period can make the database grow quite large and so after 30 days, stored events are deleted. You can choose to shorten this period; 3 – 5 days is a recommended minimum.

Event settings are located in the Event Logging section under WPdirectdebit Settings.

Notes on form entries

WPdirectdebit annotates form entries in response to events such as a mandate being activated or a user account being created. Yocan view these on the Entry detail page for a given form. ( https://docs.gravityforms.com/entry-detail/ ) It’s a useful place to look to check on the status of a subscription or payment.

Here’s an example:

This form was used to create a mandate and to register a user at the same time.  You can see that the mandate was created and the user account set up within a minute of the form being completed. One day later, the mandate was submitted by GoCardless to the user’s bank and two days after that, the mandate became active.

If the mandate were to be cancelled, another note would be added to that effect. This would be highlighted in red. Any subscriptions would also be cancelled when the mandate was cancelled and these would also generate a note to help you monitor changes. You might wish to reach out to the customer at this point.

The Users page

WPdirectdebit adds columns to the Users page so you can see the mandate ID and the entry ID of the form used to create the mandate.

The entry ID links directly to the form that was processed to set up the user account and the mandate.

Clicking the Mandate ID takes you directly to the mandate within the GoCardless dashboard for the corresponding user.

The User Profile

From the Users page, click the Edit link below the name of any user. Then scroll down to WPdirectdebit Account.

WPdirectdebit user profile fields

You can easily see the status of the mandate, without you needing to access the GoCardless dashboard. However if you wish to do so, the Inspect Mandate links takes you straight there. You can also click View Application to go directly to the registration application form.

Notifications

Every form that you design can have notifications set up to keep you and others informed of relevant events. Normally this would include an admin notification when a form is completed, and a copy of the entry may also be sent to the user via another notification. But these are not the only notifications you can request.

You can set up notifications for future events. For example if a payment fails, GoCardless sends an event via webhook to WPdirectdebit and if the Payment Failed notification has been enabled for the form used to create that payment, the notification is triggered. This can be used to keep you – and the customer – informed of the situation by email.

You can resend notifications via the Entry detail page. Perhaps a customer accidentally deleted their notification email or there was an email delivery problem.

 

Monitoring customers and payouts

Payouts and Customers tabs

For a list of customers or payouts, click on either the Customers tab or the Payouts tab. For further information on any customer or payout, click the ID in the first column; this links straight through to the corresponding record in your GoCardless dashboard.

You can scroll  through the payouts or customers using the Earlier and Later buttons.

If you see a small flag in the tab, this means there are new customers or payouts since you last viewed them.

Initially, of course, the list will be empty.

 

 

WPdirectdebit CRON task

WPdirectdebit runs a task twice daily in the background. This task is called wpdirectdebit_twice_daily_event. Every 12 hours it does two things:

1) Updates the exchange rates
2) Deletes expired events for the events log

You can ‘see’ this task by installing a CRON task plugin such as WP Crontrol ( https://en-gb.wordpress.org/plugins/wp-crontrol/ ). Once activated, you can check on all CRON tasks by selecting Cron Events from the tools menu.

If you wish to run the task immediately, for instance to update the exchange rates to the prevailing rates, WP Crontrol lets you do this.