CardPaymentDetails.bin has too many characters

We’re seeing a bunch of cases where the bin number in order payment details is 9-characters long. Bin numbers are only supposed to be 8 characters. Seems they’re padded with an extra zero.

query GetOrderTransactionPaymentDetails {
  order(id: "gid://shopify/Order/foo") {
    transactions(first: 10) {
      id
      gateway
      kind
      status
      processedAt
      paymentDetails {
        ... on CardPaymentDetails {
          paymentMethodName
          bin
          number
          company
          wallet
        }
        ... on PaypalWalletPaymentDetails {
          paymentMethodName
        }
        ... on ShopPayInstallmentsPaymentDetails {
          paymentMethodName
        }
        ... on LocalPaymentMethodsPaymentDetails {
          paymentMethodName
        }
      }
    }
  }
}
                    "paymentDetails": {
                        "paymentMethodName": "card",
                        "bin": "465108000",
                        "number": "xxxxxxxxx",
                        "company": "Visa",
                        "wallet": "SHOPIFY_PAY"
                    }

Hi @josephtaylor,

I can confirm that this is correct and expected behaviour, as it is now possible for BINs provided by banks to be above 8 digits, and we are receiving 9 digit BINs from some banks in certain cases.

I found this 3rd party blog post, discussing how to handle BINs that are above 8 digits in further detail:

Thank you for the context and response! Much appreciated

1 Like