#brett-t_api

1 messages ยท Page 1 of 1 (latest)

west trailBOT
#

๐Ÿ‘‹ 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.

jagged berry
latent oriole
#

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

jagged berry
#

Sorry, I'm lost. Relative to the Payment Intent, where is the data you're looking at?

latent oriole
jagged berry
#

No, you're right. I missed it.

latent oriole
#

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.

jagged berry
#

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.

west trailBOT
latent oriole
#

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.

short oak
#

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.

latent oriole
#

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?

short oak
#

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

latent oriole
#

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?

short oak
#

The API version is in the JSON. Line 4 has "api_version": "2018-05-21",

latent oriole
#

OH and it has charges on it

#

so ok we are good in that regard

short oak
#

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.

latent oriole
short oak
#

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

latent oriole
#

yes thats what im refering to

short oak
#

I can see this generated the Payment Method pm_1RlviHDvB1CWiwibZnerxJUL and that Payment Method has the related Mandate: mandate_1RlviiDvB1CWiwibGsDqefrD

latent oriole
#

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

short oak
#

India mandates are very particular and behave differently due to RBI regulations

latent oriole
#

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

short oak
#

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

latent oriole
#

oh, alright thank you

#

i can also put another test through, just let me know what you need

short oak
#

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

latent oriole
#

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)?

short oak
#

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.

west trailBOT
latent oriole
#

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?

short oak
#

Yeah, webhook endpoints are pinned to specific API versions

latent oriole
#

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?

short cargo
#

hi there, stepping in for my colleague! you can link to this Discord thread in your message to support, as the channel is public