#test9
1 messages · Page 1 of 1 (latest)
once i updated the payment method with some new expiry month , in resposne it shiuld be reflected but as seen uts not
Hi! Let me help you with this.
yeah
{
"id": "pm_1MJvJ82eZvKYlo2CDk6NnGVU",
"object": "payment_method",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"card": {
"brand": "mastercard",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": "pass"
},
"country": "US",
"exp_month": 8,
"exp_year": 2023,
"fingerprint": "7a9bk9ncM08SXfua",
"funding": "credit",
"generated_from": null,
"last4": "4444",
"networks": {
"available": [
"mastercard"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1672217299,
"customer": "cus_4QFOF3xrvBT2nU",
"livemode": false,
"metadata": {
"order_id": "6735"
},
"type": "card"
}
I am testing on my side and I am able to update the payment method without a problem.
I am trying to understand why you are not able to do the same
Okay, I see that the body of your request is empty, that's why it is not updated: https://dashboard.stripe.com/test/logs/iar_dC0tOILeCCOGZ4
not ,its not
if i try metadata its working
if i try card expiry year via xml form its working
but if i try it by json its not wworking m i mean returning same resposne
Try using Query Params instead of Raw Body
This is expected, you should use query params when calling Stripe API.
raw json should work as i m using xml form header
osnt there a way to pass pure json body ?
instead of param
No, Stripe only accepts query params.
Yes.
However, if you want to use Stripe JS SDK, you can pass JS objects instead: https://stripe.com/docs/api/payment_methods/update?lang=node
I am not sure I understand the question.
For all requests we use form-encoded request bodies: https://stripe.com/docs/api