pinax/pinax-stripe-light

Actions to delete accounts/bank accounts/cards

georgy95 opened this issue · 0 comments

Issue Summary

Right now, we are able to sync accounts from current stripe data, but it would be great to have actions to do with deletions.

For example: User creates a custom account, which automatically creates an external bank account.

If this user changes their payment method and decides to add new account (using stripe API), we can sync_account() using actions.

However, the user now wants to delete their previous (very first external bank account). We do this using stripe API:

account = stripe.Account.retrieve("acct_19c2PSCoyI6kORCB")
account.external_accounts.retrieve("ba_1CfV4JCoyI6kORCBWALOqwBd").delete()

But this time, we need to manually remove this from BankAccount model, because syncing the data will not remove, but instead only add/update existing accounts.