#ilyeselb
1 messages ยท Page 1 of 1 (latest)
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.
i see that we have payment_method_options as body ont setup creation
andpayment_method_data
Ah, yup, it's inside of payment_method_data, specifically payment_method_data.metadata:
https://stripe.com/docs/api/setup_intents/create#create_setup_intent-payment_method_data-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
anyway its not wroking will find a way
That doesn't sound good, do you have an example that I can take a closer look at?
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
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.
Thank you, hope you do the same!
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 ?
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.