Skip to main content

Delay taking a payment

You can control how long it takes GOV.UK Pay to take (‘capture’) a payment from your user’s bank account after your payment service provider (PSP) has authorised that payment.

You may want to use delayed capture if you need time to do your own anti-fraud checks on payments, or check that users are eligible for your service.

During the delay, your user’s available bank balance is reduced by the payment amount.

You cannot use delayed capture if you only use payment links.

To use this feature, include "delayed_capture": true in the body of a Create new payment request.

The user experience matches the current payment flow. Once your user selects Confirm on the Confirm your details page:

  • the payment status will change to capturable
  • your service can call the POST /v1/payments/{PAYMENT_ID}/capture endpoint to send a delayed capture request

There are 7 possible responses:

Status code Meaning
204 Your capture request succeeded.
400 The server cannot process the request due to a client error, for example missing details in the request or a failed payment cancellation.
401 Required authentication has failed or has not been provided.
404 No payment matched the paymentId you provided.
409 You cannot capture the payment because its status is not capturable.
429 Too many requests. Request rate is above the rate limit.
500 Something is wrong with GOV.UK Pay. Please contact us.

Your service must send the delayed capture request within 120 hours (5 days) of creating the payment, regardless of how long your user takes to complete the payment flow. If you do not, the payment will expire.

If you’ve enabled sending payment confirmation emails, GOV.UK Pay will send a payment confirmation email to your user once we’ve received and processed your service’s capture request.

See the capture URL for a payment

If a payment is available for capture, you can see its capture URL in responses to API calls. For example:

  • GET /v1/payments
  • GET /v1/payments/{PAYMENT_ID}

Replace {PAYMENT_ID} with the ID of the payment you want to see the capture URL for.

The "__links" object will contain:

"capture": {
"href": "https://publicapi.payments.service.gov.uk/v1/payments/{PAYMENT_ID}/capture",
    "method": "POST"
    }

If the payment is not available for capture, the "__links" object will not contain a capture object.