Please, could you consider adding to the Billable class a deleteCard method?
Nowadays it is possible to delete all cards of a given customer, see this blog post and the relevant API.
I'm being frustrated by the amount of websites based on Stripe that don't let deleting the card, despite this being such a fundamental requirement IMO.
You can have an influence on this, just by adding this class method. Thank you in advance.
PR created https://github.com/laravel/cashier/pull/357
I wasn't able to get this to work with deleteCard(). I looked at the cashier git and apparently the method is actually deleteCards(). Now it's working great. So if you're having trouble getting this to work try deleteCards() with an s instead of deleteCard().
Thanks for pointing this out. Indeed, Taylor renamed the method from deleteCard() to deleteCards() in a subsequent commit.
EDIT: Please refer to the new documentation for Laravel 6, https://laravel.com/docs/6.x/billing#deleting-payment-methods, my comment is referring to an old version of documentation
There is currently no mention of the deleteCards() method, nor any way to delete customers from Stripe's/Braintree's in the docs (https://laravel.com/docs/5.7/billing).
@themsaid, can this be added?
I don't feel like this should be closed. While, yes, there's a method for deleting all cards. There's no method for deleting a specific card.
@tallcoder yes there is: https://laravel.com/docs/6.x/billing#deleting-payment-methods
You also have removePaymentMethod on the billable entity
Most helpful comment
@tallcoder yes there is: https://laravel.com/docs/6.x/billing#deleting-payment-methods