> ## 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](/sdk/web/v2.x.x/primer-headless-checkout/methods/createPaymentMethodManager#native).

<Expandable title="Methods" defaultOpen>
  <ResponseField name="render" type="(containerId: string, options: HeadlessButtonRenderOptions) => Promise<void>">
    Render the button inside a container with the given ID and options.

    <Expandable title="HeadlessButtonRenderOptions">
      <ResponseField name="style" type="Record<string, unknown>">
        The style options for the button.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="setDisabled" type="(disabled: boolean) => Promise<void>">
    Set the disabled state of the button.
  </ResponseField>

  <ResponseField name="clean" type="() => void">
    Remove the button from the DOM.
  </ResponseField>

  <ResponseField name="focus" type="() => void">
    Set focus on the button.
  </ResponseField>

  <ResponseField name="blur" type="() => void">
    Remove focus from the button.
  </ResponseField>

  <ResponseField name="addEventListener" type="(event: EventTypes, callback: EventListener) => void">
    Add an event listener to the button.

    <Expandable title="Types">
      <ResponseField name="EventTypes" type="&#x22;blur&#x22; | &#x22;change&#x22; | &#x22;click&#x22; | &#x22;close&#x22; | &#x22;error&#x22; | &#x22;focus&#x22;" />

      <ResponseField name="EventListener" type="(event?: Event) => void" />
    </Expandable>
  </ResponseField>
</Expandable>
