#ilyeselb

1 messages ยท Page 1 of 1 (latest)

viral helmBOT
vague tide
#

Hi there ๐Ÿ‘‹ once the Payment Method is created you can make a request to update it and add the appropriate metadata. Double checking, but I don't think there's a way to proactively supply that metadata to the Setup Intent so it carries over.

sick rivet
#

i see that we have payment_method_options as body ont setup creation

#

andpayment_method_data

vague tide
sick rivet
#

anyway its not wroking will find a way

vague tide
#

That doesn't sound good, do you have an example that I can take a closer look at?

sick rivet
#

public async setPaymentIntent(customerId: string) {
const metadata = {
saved: true,
};
try {
return await this.stripe.setupIntents.create({
customer: customerId,
automatic_payment_methods: {
enabled: true,
},
});
} catch (e) {
throw new PaymentServiceException(e.message, e.statusCode);
}
} the error is on node js

#

i cant put both

#

metadata and automatic-pm

#

as i said i follow this method to save pm

#

for future usage

vague tide
#

Yup, understood.

#

Looking again to see if there's a way to do that without updating the PM after it's been created.

#

Hm, not readily finding a way to do that. Thank you for raising, I'll make sure to capture feedback that this is something you'd like to see made available in the future.

sick rivet
#

thanks

#

for your help

#

anyway have a good day

vague tide
#

Thank you, hope you do the same!

sick rivet
#

thank you

#

can i ask somthing elese

#

every time i buy a subsctiption i have the paymentMethode assigned to the customr

#

do we have a way to seperate the ones that i save for future usage and the subsctiption ones ?

vague tide
#

Not unless you track those yourself. Payment methods that are created for Subscriptions are also automatically set up for future usage since those Subscriptions have recurring payments that depend on that happening.

sick rivet
#

yes i will try to add metadata to these ones

#

and not retreve them back to the user

#

im afraid the ueser delete it and it cause issue in future subs ppayment