# Thank you component

The thank you component confirms that the purchase was successful and displays the [order's](https://www.digitalriver.com/docs/digital-river-api-reference/#tag/Orders) identifier.

![](https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FamhRIGKWNupj7gfStBVJ%2FThank%20you%20element.png?alt=media\&token=eee1e0a3-c992-44d1-85ab-47f464c0e631)

The component can also display instructions on authorizing [Konbini](https://docs.digitalriver.com/digital-river-api/payments/supported-payment-methods/konbini), [Wire Transfer](https://docs.digitalriver.com/digital-river-api/payments/supported-payment-methods/wire-transfer), and other delayed payment methods. More specifically, if the [`flow`](https://docs.digitalriver.com/digital-river-api/payments/payment-sources#authentication-flow) of an [order's](https://www.digitalriver.com/docs/digital-river-api-reference/#tag/Orders) [primary `payment.sources[]`](https://docs.digitalriver.com/digital-river-api/payments/payment-sources/using-the-source-identifier#primary-payment-sources) is `receiver`, then the component provides customers guidance on how to push the funds.

![](https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2F1mKNz8Y7LqsUSrsdxbYk%2Fthank%20you%20element%20-%20delayed%20payment%20instructions.png?alt=media\&token=993a587e-3fdd-43d4-86ac-94da06a4953d)

Refer to [Handling success events](https://docs.digitalriver.com/digital-river-api/integration-options/low-code-checkouts/implementing-a-components-checkout#success-events) on the [Components checkout](https://docs.digitalriver.com/digital-river-api/integration-options/low-code-checkouts/implementing-a-components-checkout) page for details on determining when to display this component.

## Creating the thank you component

To create an instance of the thank you component, pass `'thankyou'` to [`createComponent()`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/..#createcomponent-componenttype).

```javascript
let thankYouComponent;
...
thankYouComponent = components.createComponent('thankyou');
...
```

## Mounting the thank you component

To attach the thank you component to your DOM, pass the `id` of its container to [`mount()`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/components/..#mount-elementid).

```javascript
<div id="order-details-container" style="display: block">
...
thankYouComponent.mount('order-details-container');
...
```
