'Stripe Detach Payment Method of a customer under Connect

I'm trying to implement Stripe payment and I'm quite new at it. I can detach payment methods of the regular customers. I can even delete the regular customers, programmatically.

The problem is I cannot detach payment methods of the Customers under the Connect account. I cannot delete the Customers under the Connect account either. I can do this via the dashboard, though.

Is there a way to achieve this programmatically?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source