If the error is invalid card, Apple is submitting only your name, card number and expiration date, nothing else, to the Payment Network Operator (Visa, MasterCard, American Express etc.) for validation. If the card is validated, other information is sent for verification including iPhone information, CVV security code and some usage data.
The most common reason for a failed validation is the card wasn’t activated or PNO, doesn’t show it as activated. The bank may show it as activated, but PNO doesn’t. Contact your bank’s support team and they can contact the PNO and figure out why the card is invalid.
Apple is not the card issuer and cannot determine if the card is valid or not. This is the first step in the process of verifying the card. If it fails validation, there is no need to go any further.