Skip to main content

Prefill payment reference and amount when using a payment link

You can prefill the payment reference and amount when you send a payment link to your users. When the user opens your payment link, the Total to pay and reference fields will already be completed.

Prefill these details by adding reference and amount information to your payment link URL using query parameters. You can use one or both parameters.

When the user opens this example payment link, the payment reference will be ‘0451’ and the payment total will be £200:

https://www.gov.uk/payments/government-service/payment-link-title?reference=0451&amount=20000

  1. In the GOV.UK Pay admin tool, find or create the payment link you want to share with a user.

  2. Add a question mark (?) to the end of the payment link.

  3. To prefill a reference, add reference={PAYMENT_REFERENCE} after the ?. Replace {PAYMENT_REFERENCE} with the reference you want to prefill. You can use letters and numbers. Use an underscore (_) to add a space. For example, reference=0451_ABCD.

  4. To prefill a payment amount, add an ampersand (&) after the payment reference, followed by amount={PAYMENT_AMOUNT}. Replace {PAYMENT_AMOUNT} with the amount you want your user to pay in pence. For example, amount=20000.

  5. You should test this link by following it yourself before sending it to your users.

We’ve created a tool to help you generate prefilled payment links.

  1. Make a copy of the spreadsheet tool on Google Sheets or download the spreadsheet directly.

  2. In the Data tab of the spreadsheet, paste the payment link you want to prefill.

  3. Add the information you want to prefill to the columns in the Generate a link to share tab.

  4. Send the URL from the Payment link to give to your user column to your user.