Skip to content
Docs
Reference

<tl-checkout-credit>

The checkout's gift cards and credit: apply the signed-in buyer's account credit, or a gift card by its code, see what each covers, and remove either before paying.

HTML tag<tl-checkout-credit>
Reactimport { TlCheckoutCredit } from '@ticketlayer/elements-react'
CategoryCheckout
Runs inweb (browser DOM), native (planned React Native set)

The checkout's gift cards and credit: apply the signed-in buyer's account credit, or a gift card by its code, see what each covers, and remove either before paying. The rest is paid by the payment method chosen below. The rest is paid by the method chosen in tl-payment-picker.

<tl-checkout-credit></tl-checkout-credit>

Properties#

PropertyAttributeDescriptionTypeDefault
headingheadingThe section's heading.string'Gift cards and credit'
showCreditshow-creditOffer the signed-in buyer's account credit, when they have some in this order's currency.booleantrue
showGiftCardsshow-gift-cardsOffer paying with a gift card by its code.booleantrue
unstyledunstyledRender into the light DOM with no stylesheet, for a page that styles the element itself: every node carries a tl-checkout-credit__* class. Without it the element is styled, and each node is a ::part() of the same name.booleanfalse

Events#

EventDescriptionType
tlErrorEmitted when a gift card or credit cannot be applied, with the message shown.CustomEvent<{ message: string; }>
tlTendersChangedEmitted when gift cards or credit are applied or removed: what they pay and what is left. Never carries a code.CustomEvent<TlTendersChanged>

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.