Reference
<tl-refund-request>
Ask for a refund on an order, with a reason and where the money should go: back the way it was paid, or as account credit.
| HTML tag | <tl-refund-request> |
| React | import { TlRefundRequest } from '@ticketlayer/elements-react' |
| Category | Account |
| Runs in | web (browser DOM), native (planned React Native set) |
Ask for a refund on an order, with a reason and where the money should go: back the way it was paid, or as account credit. Staff decide the request.
<tl-refund-request order-id="ord_..."></tl-refund-request>Properties#
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
allowCredit | allow-credit | Offer account credit as well as a refund the way the order was paid. | boolean | true |
heading | heading | The form's heading. | string | 'Ask for a refund' |
orderId (required) | order-id | The order to ask about. | string | undefined |
unstyled | unstyled | Render into the light DOM with no stylesheet, for a page that styles the element itself: every node carries a tl-refund-request__* class. Without it the element is styled, and each node is a ::part() of the same name. | boolean | false |
Events#
| Event | Description | Type |
|---|---|---|
tlError | Emitted when the request cannot be sent, with the message shown. | CustomEvent<{ message: string; }> |
tlRefundRequested | Emitted once the request is sent. | CustomEvent<TlRefundRequested> |
Events are CustomEvents; the payload is on event.detail. In HTML, listen with element.addEventListener('tlXxx', handler); in React the wrapper exposes each one as an onTlXxx prop.