> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# HeadlessPaymentMethodButton

The button instance returned by a [NativePaymentMethodManager's `createButton` function](https://primer.io/docs/sdk/web/v2.x.x/primer-headless-checkout/methods/createPaymentMethodManager#native).

**Methods**

**render** `(containerId: string, options: HeadlessButtonRenderOptions) =\> Promise\<void\>`

Render the button inside a container with the given ID and options.

**HeadlessButtonRenderOptions**

**style** `Record\<string, unknown\>`

The style options for the button.

**setDisabled** `(disabled: boolean) =\> Promise\<void\>`

Set the disabled state of the button.

**clean** `() =\> void`

Remove the button from the DOM.

**focus** `() =\> void`

Set focus on the button.

**blur** `() =\> void`

Remove focus from the button.

**addEventListener** `(event: EventTypes, callback: EventListener) =\> void`

Add an event listener to the button.

**Types**

**EventTypes** `"blur" | "change" | "click" | "close" | "error" | "focus"`

**EventListener** `(event?: Event) =\> void`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.