GOV.UK Pay

Central Government is becoming smarter. It has recognised that there are common functions provided in local government and it makes sense for these to be commoditised to enable reuse across departments and across local government. To that end they've built dedicated functions to:

  • Take payments

  • Issue notifications (email/SMS/letters)

  • Confirm someone's identity.

These are the PAY, NOTIFY, VERIFY, services respectively. In its Blue Badge platform, IEG4 has already integrated to both PAY and NOTIFY and our intention is to leverage these wherever logical and of benefits across its products.

So in this release, we've built in the no code ability to build an online form that fully integrates to GOV.UK PAY. For some perspective, I was able to add a payment integration to a form and test it for the first time in less than 5 minutes.

Setting GOV.UK PAY up

The only technical element to this process is to add your council's API reference key as provided by GOV.UK PAY. You access these within your GOV.UK PAY account. You can create an account here if your council has not already done so.

The settings within System Management you can update are as follows with the critical one being the GovPayBearerToken:

GovPayBaseUrl

This is the default URL for GOV.UK PAY integration. This can thus be changed if this URL does change.

GovPayBearerToken

blank

This is the API key you get from your GOV.UK PAY account and is the only thing needed to be done by you in terms of set up of this function

GovPayPaymentUrl

v1/payments

This is the default endpoint for where we should pass payment info. This can thus be changed if this URL does change.

Raise a ticket with IEG4 Support

You can only have one Payment provider for your form's integration. So if you currently integrate using Capita/Civica payment gateways you can change it to GOV.UK PAY but this will mean all forms will thus have that payment mechanism too.

Functionality

It's incredibly easy to add GOV.UK Pay integration to an online service once the above set up is done. It can also leverage the existing functionality dynamically change the amount to pay/sum a number of items and show them in a payment summary.

To illustrate we will build a form that allows people to sign up to a council's garden waste service. This takes a payment of £120.00 for the year.

So to start we've created a form:

Basic form to take a payment

We then go to the designer menu and click 'Payment Settings':

Payment Settings

The above is for the actual GOV.UK PAY Description. Then to associate a monetary value with an item or items we need to add a payment item to the form. This is done by first selecting the following when adding an item:

Adding a payment item

The following is presented and we add Garden Waste Services as a 'Purchasable item'. This is to relay the amount of money that should be passed into the payment summary:

Setting up a payment item

We then add a question to allow the person to opt in to receiving the service:

Adding a question to control whether the payment item will appear or not

And add conditional logic (using Page Rules) to only show/add the payment if they select 'Yes':

Hiding a payment item with rules

Once done, we now have a form that will capture their opt-in, conditionally show the amount to pay and integrate to GOV.UK PAY. This literally takes seconds to do and we can see the description we added showing in the GOV.UK PAY Payment Summary on the far right image:

Payment Flow - GOV.UK Pay

Other Information

  1. Whilst you can still use the built in payment summary (shopping basket) function to automatically calculate a total to pay, the GOV.UK Pay API currently only supports one description. I.e. if I paid for a Black bin (£40.00) and a Blue bin (£25.00) this would show the two items and a total of £65.00. But for GOV.UK PAY purposes it would need a generic description of Bin Payments or something.

  2. Apple Pay and Google Pay Digital Wallets are currently in Private Beta. I.e. only certain central government departments are using them right now. We will, however, be able to leverage this straight away when publicly available.

Custom Metadata

eDesigner's GOV.UK Pay plugin enables one to leverage use of the 'Custom Metadata' functionality in GOV.UK Pay.

This is described as follows:

"You can add custom metadata to a new payment. For example, you can add a reference number from your finance or accounting system, so you can reconcile the payment later.

You add metadata when you make an API call to create a new payment.

Your users cannot see metadata while they’re making a payment."

And you can read more about it here:

https://docs.payments.service.gov.uk/custom_metadata/#add-custom-metadata

Essentially, as a council, you can pass additional, council-specific content to GOV.UK Pay whenever a payment is made on a form by form basis.

To access this open Click on the Design Tools button when in the Development environment of a form and click on 'Payment Settings' from the menu system:

Payment Settings - where one can add meta data on a per form basis
  • Field names must be between 1 and 30 characters

  • You can have a maximum 10 custom metadata fields

  • String fields can be no more than 100 characters long

As well as the description that is passed to GOV.UK Pay, you will see there's now the ability to 'Add a new field' for Custom Metadata fields. The rules around these are provided at the top i.e.

Where one adds the metadata

When you click 'Add a new field' you're able to provide:

  • the name,

  • the value that should be populated,

  • the type (from a list of options that the GOV.UK Pay API supports)

Metadata item - types

The following illustrates an example set of 5 custom metadata fields:

Example of populated metadata for 5 metadata items

What the above would mean is that the following additional content is passed to GOV.UK Pay:

"metadata": {
   "vatCode": "N",
   "vatRate": "0.00",
   "ledgerCode": "GL",
   "accountString": "30-0-9999-9999-99999",
   "service": "Waste",
}

Last updated

Was this helpful?