<primer-payment-method-container>
Automatically renders available payment methods with built-in filtering. Eliminates manual event handling and state management.This component is useful when building custom layouts. It simplifies the creation of custom payment method layouts by automatically rendering available payment methods with built-in filtering capabilities. It eliminates the need for verbose event listeners and manual state management.
Quick Reference
Examples
All Methods
Include Specific Methods
Exclude Methods
Sectioned Layout
Disabled
Properties
Events
<primer-payment-method-container> does not emit its own events. It subscribes to parent events internally to render and filter methods automatically.
Relevant Parent Events
When you need to react to rendered methods
The container handles rendering automatically. If you need to know which methods rendered, listen on the parent:Filter Logic
- If
includeis set, only those types render - If
excludeis set, those types are filtered out - Both can be combined:
includeapplies first, thenexclude - Renders nothing if no methods remain
PAYMENT_CARD not payment_card).
CSS Properties
States
Note: This component delegates visual states to its child <primer-payment-method> components.
Usage Guidelines
Do
- Use for automatic method rendering without manual event handling
- Create sectioned layouts with multiple containers
- Combine
includeandexcludefor complex filtering
Don’t
- Don’t include
PAYMENT_CARDif using a custom<primer-card-form>(causes duplicate) - Don’t forget: values are case-sensitive
Content Guidelines
Section headings
See also
primer-payment-method
Individual method component
Layout customization
Layout patterns