Broadly speaking, two types of payments can be collected from clients using GoCardless - individual payments and recurring subscriptions.
For funds to be collected, an active mandate must exist for the client you wish to charge. A mandate is stored on a client’s bank account (and logged in their GoCardless customer record), confirming that they have approved your collection of funds from their bank account.
If you haven’t yet familiarised yourself with the flow of funds through the GoCardless payment process, you can learn more here.
Payments are created on a one-off or ad-hoc basis. They are ideal for businesses that charge (or invoice) their customers variable amounts or on an irregular schedule.
Subscriptions, on the other hand, are created with a fixed amount that is charged on a recurring cycle, either on an ongoing basis or with a defined end date or set number of payments.
Once you’re comfortable with how you wish to bill your customers, the next step is getting them set up!
Inviting your clients for approval to collect payments
As mentioned earlier, before you can begin collecting payments from a client you first need their approval (or authorisation) to do so. The setup method you choose here could influence your client’s experience, as well as the time you’ll spend on admin, both during setup and in the future.
Please note: If you have moved, or are in the process of moving, existing bank debit clients to GoCardless via the bulk change process, you are already authorised to collect funds from their account and can move ahead to the section on Setting up your payment run.
Requesting client authorisation using the API
If you are using your own custom payment pages to collect information and approval from your clients, the authorisation request process will be individual to you. Once your client has completed their authorisation action, your integration will need to set up the customer within GoCardless. The process requires three steps to be completed in the following order:
- Create a customer
- Create a bank account for that customer*
- Create a mandate against that bank account
- Optional - create a payment or subscription for the customer. We’ll cover this in more detail in the next section, ‘Setting up payments’.
Please see information on the Customer endpoint within our developer documentation for details on how to handle this process.
If you are using GoCardless hosted payment pages to collect authorisation from your clients, you will use a redirect flow via the GoCardless API to confirm completion of the authorisation flow and subsequently set up the customer within GoCardless. You can find out more about the redirect flow here.
Setting up your payment run
When setting up your first payment run, you can build the creation of a client’s payment and/or subscription into their request for authorisation, or set them up as a separate action.
You do not need to wait for your client to complete the authorisation process before payments and/or subscriptions can be created for them. However, if you specify a charge date which, by the time the client has authorised, does not leave sufficient time for the advance payment notice period or the charge date itself has passed, the payment will not be collected.
Advance payment notice
Clients must receive a minimum advance notice prior to any individual payment being collected from their account, or prior to the start of a recurring subscription. The notice provides details including the business collecting the funds, the amount, charge date, and billing frequency in the case of subscriptions.
When creating a payment for a client via the payments API endpoint you must include the amount, currency, and links[mandate] parameters. (The currency must match that of the Direct Debit scheme the client’s mandate is set up through).
Further optional parameters include a payment description, charge_date, bank statement reference, among others.
For a full list of payment parameters and information on how to create single payments via the API, please see the relevant section of our API documentation here.
To help you get started, we also have example code samples on creating a one-off payment here.
Subscriptions follow a very similar process to create as single payments, the main difference being the required addition of the interval_unit parameter, to include alongside the amount, currency, and links[mandate] parameters.
The interval_unit is used to specify the unit of time between each payment charge date in the subscription - one of weekly, monthly, or yearly.
Other optional parameters you may wish to use include interval (to specify the number of interval_units between each charge date), count (to define a specific number of payments in the subscription), or day_of_month to specify the date you would like the client to be charged.
Adding the creation of payments and/or subscriptions to the customer authorisation flow is a great way to streamline the process, both for yourself and your client. With the creation of a payment and/or subscription tied in, the client can be notified of the charge(s) at the same time as being asked to authorise the collection of payments from their account, creating a smoother opening experience.
If you are using custom notifications, you are responsible for ensuring your customers are notified in accordance with the advance notice requirements. If you've chosen GoCardless to handle all client notifications for you, we will ensure your clients receive all their required notifications on time and with the necessary information.
Your client’s experience
If you’re using GoCardless hosted payment pages and/or notifications, you can learn more about what your clients will experience here.