Reputation: 45
I'm currently using Laravel cashier. I already have the endpoints to create a new card, delete it or set it as a default payment method, but I can't get in the documentation the use to update the credit card information.
I got this method in the stripe backend documentation. https://stripe.com/docs/api/payment_methods/update
And I don't get anything similar in the documentation of the stripe js. https://stripe.com/docs/js
Awaiting your answers, thank you very much.
Upvotes: 0
Views: 1697
Reputation: 45
UPDATE:
I solved the problem as follows
Every payment method has a method called
asStripePaymentMethod
to access the underlying Stripe object.
The data comes from a form on the front, the structure of the data is displayed in the official stripe documentation.
through the payment method id, I could access to the payment method object on Laravel Cashier library, and through ORM, I could save the data.
Laravel Version: 7.X
Laravel Cashier Version: 12.2.0
Upvotes: 2