Ensure your code syntax is correct, especially that all attributes are capitalized or in lower-case correctly.
Passing card
and CardElement
will result in this error. The cardElement
attribute is incorrectly capitalized. Instead, pass card
and cardElement
to createPaymentMethod
.
JavaScript is a case-sensitive language. If you are passing a parameter comprised of two words together, the first letter of the first word should be lowercase and the first letter of the second word should be uppercase.
Example: BankName
would be bankName
, and HidePostalCode
would be hidePostalCode
.