#isaacs - saved payment methods

1 messages · Page 1 of 1 (latest)

flint bane
#

Good question. Checking in to this.

sudden wharf
#

ok, but, (a) I'm not using a Link/PaymentIntent, I'm using a SetupIntent and attaching to customer.invoice_settings.default_payment_method, and (b) I need this to work without using Stripe React. Is that possible?

#

like, is there a stripe.Elements thingie I can just throw a PaymentMethod id in, and have it do the right thing?

#

oh! I see, is this it? ```const paymentElement = elements.create('payment', {
defaultValues: {
billingDetails: {
name: 'John Doe',
phone: '888-888-8888',
},
},
});

#

but i still don't see how to put in the saved payment method details, only the name/phone number/address/email

flint bane
#

It looks like there is a HTML + JS tab for how to integrate this without React. If it is feasible for you, you can use SetupIntents with Link going forward and I think you can display payment methods that weren't saved specifically with it but I am not 100% sure of that yet. https://stripe.com/docs/payments/link/save-and-reuse

sudden wharf
#

Yeah, I could be misreading this, but I don't think Link payments is at all what I want.

#

I'm doing 100% invoice billing

#

Link seems to be all about checkout

flint bane
#

The links I have been sending have been about incorporating that to your own custom page with Elements.

sudden wharf
#

Yes, but they're all related to a checkout page, not a user settings page where they update their invoice_settings.default_payment_method

#

same SetupIntent, different place to put the resulting PaymentMethod

#

what i'm saying is, I don't see a way to have a Link connection like what is described on this page, but related to the customer.invoice_settings.default_payment_method rather than the customer.default_source used at checkout

#

I still use a Payment Element from Stripe.elements to collect that payment method, but when the SetupIntent resolves, I attach it to the customer.invoice_settings.default_payment_method. I'm not setting a Link reference (or anything at all) as the customer.default_source field.

#

Sorry, I should have made that clear from the start. But does that make sense?

#

If there's no way to do it, that's fine, I can roll my own. Just wanted to make sure I'm not missing something obvious.

flint bane
#

Thanks for the clarification. It seems that I may not be familiar enough with this element and the server has been too busy for me to figure it out. I will reach out to colleagues to see if you can get your intended behavior with it. Otherwise you will have to roll your own, but hopefully we can save you some time here.