Skip to main content

Use your own payment failure pages

You can contact us to set this feature up for your service.

If you do not use your own payment failure pages, your users will see standard GOV.UK Pay payment failure pages.

Terminal, unsuccessful payment states are:

  • payment declined
  • payment cancelled
  • payment expired
  • error (for example, technical error)

If you use this feature, GOV.UK Pay will immediately redirect your user to the return_url when a payment reaches a terminal unsuccessful state. You can set the return_url manually when you create a payment with the POST /v1/payments API request.

You should configure your service to query payments to determine what payment failure states are from API responses. Once your service knows the state of a payment, it should direct your user appropriately. For example if your user’s payment expires, you may want your service to return your user to the start of their payment journey.

In very rare cases, GOV.UK Pay is unable to redirect payments. You should contact us if this happens.

Expired payments

If your user abandons a payment and it expires, GOV.UK Pay can only redirect your user if they did not leave the payment screen. If your user tries to continue their journey from the payment screen after their payment has expired, they will be returned to the service.

Read about what happens when your user does not complete their payment journey.