-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Billable::cards does not return bank accounts #507
Comments
We should probably add something to Cashier for explicitly removing bank accounts. Add a bankAccounts method to the Billable trait, and add a deleteBankAccounts method. |
You could also remove the filtering and handle all objects as an ExternalAccount instead of handling them as the typical StripeCard class. You still have all the same data and functions available, they abstracted the concept of a payment method to an abstract class called ExternalAccount. The only difference is the data coming back from Stripe, but that can be parsed out using the object type of either 'card' or 'bank_account'. I hope I'm making some sense here. |
I don't really know how this problem can happen with Cashier itself as you only add cards and not bank accounts. Do you add bank accounts yourself through the Stripe API? |
I am able to get a token that represents a bank account by using a third party called Plaid. I use their front-end, which securely generates me a token, and I use that through Cashier. I just wanted to point out that you could technically use bank accounts with Cashier, and that it does seem to be favoring only using credit cards. This could be changed to manage payment methods in a more abstract way, that way I can manage my customers who pay with ACH without having to dig up the underlying Stripe API objects. |
Ah ok so this is more of a feature request. At the moment Cashier indeed only supports cards but I can see that bank accounts might be of use to more people as well. I'll mark this as a feature request. If you could manage to implement this in a clean way for the next major version then we could consider merging a PR in. |
Small update: we've moved to the Payment Methods API in Cashier. Support for different methods is planned by Stripe but not available atm: https://stripe.com/docs/payments/payment-methods |
so the limitation is Stripe
not sure at which point the user has to pay .. I guess it depends on how stripe is configured, ie. if you allow people to be behind their payments and still allow the subscription to be active or not. wdyt? |
@lsmith77 not sure sorry. We're just going to wait until Stripe provides support for bank accounts in their payment methods api. |
FYI https://stripe.com/docs/payments/payment-methods was just updated. following payment methods are now supported via the new API
|
@lsmith77 don't you mean "now" instead of "not"? |
yes .. sorry for the typo. fixed it in the comment |
Would it be a clean way to add the possibility for other payment methods by passing the type as parameter to the functions? For example in the $paymentMethods = StripePaymentMethod::all(
['customer' => $this->stripe_id, 'type' => 'card'] + $parameters,
$this->stripeOptions()
); ... with ... $paymentMethods = StripePaymentMethod::all(
['customer' => $this->stripe_id] + $parameters + ['type' => 'card'],
$this->stripeOptions()
); so if you pass Of course you would have to adjust the other functions as well. |
@ZiIMoIN I'm more thinking of passing a second parameter to that method in an upcoming release like so: public function paymentMethods($parameters = [], $type = 'card') But we'd need to make sure that the rest of the methods indeed would still work. Like |
I'm happy to say that the next version of Cashier will support all possible payment methods. All current methods on a billable will support a At the moment we're still looking at updating the |
As you can see below, when pulling the sources back it's being filtered by ['object' => 'card']. This means that it will not return bank accounts. The issue with this method is that it is consumed by the deleteCards() method. This means that bank accounts are not removed by the deleteCards method, and if a customer deletes an association to a bank account, and attempts to re-add it, an exception is thrown that the bank account already exists for that customer.
The text was updated successfully, but these errors were encountered: