Cancel stripe subscription if setupintent status is incomplete

how can I implement cancellation of multiple subscriptions in stripe when setupIntent status of payment method is ‘incomplete’.