collana pay JS Docs / ProviderButtonConfig
Interface: ProviderButtonConfig<K>
Defined in: types.ts:1055
Configuration for a single payment button.
Remarks
The generic parameter K narrows style and options to the correct provider-specific types based on the providerProtocolType and paymentMethodType combination.
Type Parameters
K
K extends ProviderKey = ProviderKey
A ProviderKey literal that determines the allowed style and options shapes.
Properties
container
container:
string
Defined in: types.ts:1063
CSS selector for the DOM element where the button will be rendered.
merchantId?
optionalmerchantId?:string
Defined in: types.ts:1061
Merchant ID passed to the provider SDK (usage varies by provider).
options?
optionaloptions?:ProviderOptionsMap[K]
Defined in: types.ts:1067
Provider-specific SDK and behaviour options.
paymentMethodType
paymentMethodType:
ExtractMethod<K>
Defined in: types.ts:1059
The payment method this button represents.
providerProtocolType
providerProtocolType:
ExtractProtocol<K>
Defined in: types.ts:1057
The payment processor / gateway for this button.
style?
optionalstyle?:ProviderStyleMap[ExtractMethod<K>]
Defined in: types.ts:1065
Provider-specific visual style options.
