"Cannot charge a customer that has no active card" error when creating a charge using PaymentMethod and Charges API

Create a PaymentIntent for the customer instead. PaymentMethods are not compatible with the Charges API,

Additional Information