#brett-t_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1395463080669876255
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! The Payment Intent object doesn't have a mandate field; where are you expecting to see it exactly?
Hi! For us_bank_account I am seeing payment_method_details under charges. Then under us_bank_account there is a "mandate". But i should go find the doc and look under "card" thats a good idea
Sorry, I'm lost. Relative to the Payment Intent, where is the data you're looking at?
If you mean the pi.latest_charge.payment_method_details, then the card doesn't have a mandate: https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card
i do see a mandate there https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card-mandate
No, you're right. I missed it.
I cant find it in the paymentIntent object Stripe docs, but for some async payment method we get an actual "charges" array in the payment intent. Other times we get a latest_charge which is documented better. I would be fine with getting either for a India card in the webhook.
You wouldn't see either of those in the Payment Intent event, you'd need to retrieve the related Charge to see it.
Or rather: you wouldn't see deep enough into the object structure to see those from an Event payload.
so here is a us bank account example
its got charges object on it. But maybe card payment method type doesnt have charges
im sorry i couldnt find that in the logs to send you a link, its a different account than mine. But if you need that in a link to stripe dashboard i could get it later.
Hi ๐
I'm taking over as my colleague needed to go. The object in this event appears to be a Payment Intent. When I examine the latest_charge: "py_3RC1mSGdhhnWYuXY1YmsvQml", I can see it was paid with a us_bank_account Payment Method pm_1RC1mLGdhhnWYuXY8D3ihhK6. The Mandate information will be associated with that payment method.
im asking why we dont get that charges object in this webhook https://dashboard.stripe.com/test/payments/pi_3Rlvn8DvB1CWiwib27RWhzTo
is charges only on a payment intent when its a certain payment method type? Is there some configuration i could setup to get charges returned for card payment method?
Charges are not expanded by default
Actually wait, no. The charges property doesn't exist in the current API version we document here
This Payment Intent was created using the latest API version
so it's shape conforms to that API version
was charges removed recently? Can you tell the api version that was used for the json i sent and if thats different than the one on the dashboard link?
The API version is in the JSON. Line 4 has "api_version": "2018-05-21",
You can review all the changes for each Stripe API version in our Changelog: https://docs.stripe.com/changelog
You can see we removed the charges attribute in version 2022-11-15: https://docs.stripe.com/changelog/2022-11-15
the link example appears to have the same version though am i wrong about that? https://dashboard.stripe.com/test/events/evt_3Rlvn8DvB1CWiwib279NT5GC
OH and it has charges on it
so ok we are good in that regard
Yup. Working with different API versions can be tricky. It's one of the reasons we include it the Event payload, because it would be very easy to get confused by the same kind of objects with different API version.
ok great. So that brings me back to the original question. The payment intent was created with a mandate. Do you know why mandate is null in the Stripe webhook here? https://dashboard.stripe.com/test/events/evt_3Rlvn8DvB1CWiwib279NT5GC
here is the payment intent i created, i sent the mandate id https://dashboard.stripe.com/test/logs/req_6MXM5XpcqnyDFd
Payment Intents don't have mandates. Payment methods have mandates.
I am assuming you are referring to the payment_intent.charges[0].payment_method_details.card.madate property
yes thats what im refering to
I can see this generated the Payment Method pm_1RlviHDvB1CWiwibZnerxJUL and that Payment Method has the related Mandate: mandate_1RlviiDvB1CWiwibGsDqefrD
For other payment methods like the us_bank_account one i shared the mandate was returned in payment_intent.charges[0].payment_method_details.card.madate. Now that we are opening up mandates to India cards, i expected that not to be null. Do you know why its null for this card payment_method_detail?
or it would have been payment_intent.charges[0].payment_method_details.us_bank_account.madate obviously
India mandates are very particular and behave differently due to RBI regulations
To be perfectly honest, we still consider recurring payments with India payment methods to be in a Beta status: https://docs.stripe.com/india-recurring-payments
sure, i think im doing it all correctly, I just dont understand why that field is null when it was created with a mandate and was successul
yes those are the docs im using
Yes what I mean by that is this is not considered GA or production ready. It should be but we haven't dedicated enough resources. I'm looking through the logs for the confirmation request (https://dashboard.stripe.com/test/logs/req_oinezf4N2OMr8e) that created the mandate to see if the event was generated from data that predated the mandate creation
oh, alright thank you
i can also put another test through, just let me know what you need
I'm reviewing the logs for that request. You passed all the right data. I'm just looking for a smoking gun in terms of why we returned null for the mandate in the event
Okay, I found a place where we flagged this internally where webhook events do not contain the mandate. It was created 1.5 years ago but is still in the backlog.
So this is a known issue with India card mandates and webhook events
ok, i will get this escalated and see what people say, otherwise i guess we query the charge. Any other info you could give me (name of the ticked on your end or anything)?
I am adding your request and webhook event as examples of this still being a problem to that ticket.
You can also write in to Support https://support.stripe.com/contact asking about this issue that should get linked to the internal ticket and help push to prioritize a fix for this.
Additionally, regarding the version mismatch, when i created the payment intent its using Stripe-Version: 2025-03-31.basil. However the webhook we got said "api_version": "2018-05-21". Could you tell me how to make sure at least that our webhooks version is the same in production that it is in my test account?
oh nevermind i think i found it https://dashboard.stripe.com/webhooks/we_0Ie26qkZhqK69boNhh70SnYT
Yeah, webhook endpoints are pinned to specific API versions
alright thanks for your help. When you say "you can also write support asking about this issue that should get linked to the internal ticket..." How should i reference this issue? Do you have a ticket number or do i point them to this thread?
hi there, stepping in for my colleague! you can link to this Discord thread in your message to support, as the channel is public