Skip to main content
Coat of arms of Barbados
Official government website

Payment

Walks users through paying a fee, and reports whether it worked.

Preview

Payment

The Payment component summarises a fee before the user pays it (the service, unit price, quantity and total), with a button that takes them to the payment provider, and a note telling them where they are being sent. The itemised rows are a description list (<dl>), so screen readers announce each label with its value. There is no React wrapper yet, so use the HTML directly.

When to use this component

Use the payment component at the payment step of a service, once the user has reviewed their application and the fee is fixed. Keep the note honest about what happens next: name the payment provider the user will be redirected to.

When not to use this component

Do not use it to list fees the user is not about to pay. Use a table instead. Do not use the success or failed variants for anything other than the outcome of a payment. Use the status banner for page-level notices.

Success

Show the success variant once the payment provider confirms payment. Give the user a reference number and date they can keep, and confirm what happens next (such as a confirmation email).

Successful payment

Failed

Show the failed variant when the payment could not be processed. Reassure the user about whether they have been charged, and give them a way to try again.

Failed payment