#Rahim Dobani
1 messages · Page 1 of 1 (latest)
If you have a PaymentMethod ID, you can use https://stripe.com/docs/api/payment_methods/update?lang=node to change the billing_details.name
const paymentMethod = await stripe.paymentMethods.update(
'pm_1NvFfeAOo6YEPSo03gPwKKn7',
{metadata: {name: 'rahim'}}
);
i will pass name like this is this syntax correct?
?
Yes looks correct to me. Does it work?
no its not working
{
"paymentMethod": {
"id": "pm_1NvFfeAOo6YEPSo03gPwKKn7",
"object": "payment_method",
"billing_details": {
"address": {
"city": null,
"country": "PK",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"card": {
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": "pass"
},
"country": "US",
"exp_month": 11,
"exp_year": 2029,
"fingerprint": "hpxT9s6BC5uhUy15",
"funding": "credit",
"generated_from": null,
"last4": "4242",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1695890046,
"customer": "cus_Oih3cpWib0y448",
"livemode": false,
"metadata": {
"name": "rahim"
},
"type": "card"
},
"success": true
}
i want to change name in billing details
not in mera
*Meta data