Skip to content

collana pay JS Docs v0.1.0


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?

optional merchantId?: string

Defined in: types.ts:1061

Merchant ID passed to the provider SDK (usage varies by provider).


options?

optional options?: 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?

optional style?: ProviderStyleMap[ExtractMethod<K>]

Defined in: types.ts:1065

Provider-specific visual style options.

CollanaPay SDK Documentation