Yes, it is possible for the widget to automatically detect the brand of the card based on the first 2 digits of the card.

This feature can be enabled using the Copy and Pay API. You can view the entire api reference here:

var wpwlOptions = {
        style: "plain",
brandDetection: "true"

<script async src="{checkoutId}"></script>

The above sample code sets the style of the payment widget to "Plain" and also enables automatic brand detection.