#eblackey - payment methods
1 messages · Page 1 of 1 (latest)
So when you create a payment method, it's implied you know what type it's going to be
That's why
What does your current flow look like? In most recommended flows, the PaymentMethod is created by stripe.js when selecting a payment method in the PaymentElement and inputting info
Sorry, to clarify. I'm trying to pull a list of all saved payment methods available for a customer so that I can allow a customer service agent to select a saved payment method to charge.
Ah I see
So yeah type is required there. I don't know if I have a good answer as to why though
Ok, darn. This will require us to increase calls to the API by 3x to replace the Sources API. And that assumes we won't add any new PaymentMethods. If we do, that will be a new call.
Are you currently using the default payment method feature?
That could help reduce calls
Not sure. Do you have any documentation on that?
Just backing up for a second and adding context - one of the reasons why you need to pass in a type is because the shape of the returned Payment Method can differ depending on what kind of type it is. By requiring type that ensures that all the returned Payment Methods are all of the same shape
Ok, that makes sense. The problem is that now I have to make multiple calls to the API to retrieve all of the possible methods for a single customer. Right now, we use card and us_bank_account. As we add more in the future, I think it will require we make more and more calls. The only thing I need in the response is the payment_method_id that I would use to charge the payment method. So, nothing else in the payload response is really necessary.
Is there a specific reason you nee the full list of payment methods for the customer? Is it for something like you're displaying the full list of payment method options to use for a returning customer?
In my ERP system, we allow a Customer Service representative to view a list of saved payment methods for a customer so that they can choose how to collect payment for an invoice.