Can I create new credit card while creating a new subscription through API?

Can I create new credit card while creating a new subscription through API?

In new subscription creation API call, I can create a customer if needed. But what if I want to define card details too in that service request?

Thanks in advance.