Skip to content
Docs
Reference

<tl-payment-picker>

The checkout's Payment section: the ways this order can be paid, each with any surcharge it adds, and the reason beside one that cannot be chosen.

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

The checkout's Payment section: the ways this order can be paid, each with any surcharge it adds, and the reason beside one that cannot be chosen. Choosing re-prices the cart's quote. Choosing writes it to the cart (PUT /sales/carts/\{cartId\}/choices) and tl-checkout-summary re-prices from the quote.

<tl-payment-picker></tl-payment-picker>

Properties#

PropertyAttributeDescriptionTypeDefault
autoChooseauto-chooseChoose the only method that can be chosen when nothing is chosen yet, so the quote includes it.booleantrue
collapsecollapseFold the section to one line when its only method is chosen, with Change when there is more to see.booleantrue
headingheadingThe section's heading.string'Payment'
unavailableunavailableWhich methods that cannot be chosen are shown, disabled with the reason: relevant (closed by a cut-off, business customers only), all, or none."all" | "none" | "relevant"'relevant'
unstyledunstyledRender into the light DOM with no stylesheet, for a page that styles the element itself: every node carries a tl-payment-picker__* class. Without it the element is styled, and each node is a ::part() of the same name.booleanfalse

Events#

EventDescriptionType
tlErrorEmitted when a choice is refused or the options cannot be read.CustomEvent<{ message: string; }>
tlPaymentChosenEmitted once a payment method is chosen, with the re-priced total.CustomEvent<{ method: string; total: number | null; }>

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.