Add new card on file for subscriptions via API

Hey there, I am building an integration to update the card on file for customer’s and want it to automatically update the card used for subscriptions in Keap. I know the billing automations functionality allows us to send an “update card on file” email and it works just fine for this use case, however my client wants a custom update functionality, so we’re building it.

I’ve been able to successfully add a card to a contact profile POSTING to /contacts/{contactId}/creditCards. I then can grab the Credit Card ID from the response.

Then I tried the PUT /orders/{orderId}/paymentPlan endpoint to add this card ID to the subscription. However, the API is forcing me to add “days between payments, number of payments, and a plan start date”. All I want to do is update the card on file! I don’t want to replace anything that’s already there. I definitely don’t want to overwrite the start date or anything like that. Is there another way? Or am I missing something. This makes me feel like I’m stopped the original paymentplan/subscription and starting a new one with new criteria.

Thank yoU!
Matt