#Naitik
1 messages · Page 1 of 1 (latest)
https://stripe.com/docs/api/payment_methods/update#update_payment_method-card you can only update the exp_month and exp_year
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
any solution for update card number as well?
sometimes older card not working then how can we manage it?
You should create a new card payment method then
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You are not understading my question.
For ex: 2 days ago I added one credit card and today also I added new one card
You can see both card in above image
Default card is older one I want default is new one
Default card is older one I want default is new one
I mean the link my colleague provided (https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method), is how you set which card should be the default. Is that not what you're asking? If not, please rephrase the question.
card = await stripeClient.customers.createSource(customerId, {
source: cardToken,
metadata:{
cardHolderName: req?.body?.businessName,
cardHolderEmail: req?.body?.email,
}
});
name and email not stored
that's an old and deprecated API overall, Sources have been replaced with PaymentMethods for serveral years.
name and email not stored
probably that means your variables likereq?.body?.businessNameare actually null at runtime. You can add logging in your code to check that, and you can check your Stripe API logs at https://dashboard.stripe.com/test/logs to see what you actually sent us.
Its official document
yep it's part of the API but like I said it's old
okok
I want to create a card with name and email can you please send me a example or react code
well the code you shared above would generally work but like I said your variables must be null; so you need to fix that part either way and get that working