#anay-208_code
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/1222208427007410187
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- anay-208_api, 5 days ago, 11 messages
- anay-208_api, 5 days ago, 19 messages
- anay-208_code, 5 days ago, 13 messages
payment_method_options: {
card: {
mandate_options: {
reference: uuidv4(),
amount_type: "maximum",
amount: 50000,
start_date: Math.floor(new Date().getTime() / 1000),
end_date: Math.floor(new Date().getTime() / 1000) + 30 * 24 * 60 * 60, // 1 month from now
interval: "sporadic",
supported_types: ["india"],
},
},
},
My main concern is that, If mandate was not setup, I just want the payment to be declined, as I tried in prod and mandate returned null, probably because user has disabled mandate with their bank
Where are you seeing that exactly?
I'm seeing when I'm trying to retreive the latest_charge of a intent to get the mandate id
return stripe.charges.retrieve(id);
Can you provide the Charge ID?
ch_3OwoZJSBaY8pfsc519yIkbx3
Thanks, looking
๐ Stepping in for my teammate while we look into this!
If you retrieve ch_3OwoZJSBaY8pfsc519yIkbx3 separately (versus looking at the object included in the charge.succeeded payload), do you see the mandate there?
@fierce verge just to be clear, if you retrieve the Charge manually, do you see the mandate ID returned or is payment_method_details.card.mandate still null?
a moment
I'm retreiving the charge manually only using this
I'm not sure what you mean by manually? I'm currently Fetching the charge using this:
stripe.charges.retrieve(id);
Right, that's what I mean.
The call you make above is different/separate from inspecting the Charge object that is returned in the charge.succeeded event
So do I get the charge.succeeded from paymentIntent?
In one of my other intent, where I used my own card which had mandates enabled, the payment_method_details.card.mandate actually had a mandate id.
charge.succeeded is an event that is emitted and sent to your webhook endpoint when a charge succeeds. at that point in time, a mandate ID may not be available so, if that's the case, the mandate is null when you receive that event.
If you make a call to stripe.charges.retrieve(ch_3OwoZJSBaY8pfsc519yIkbx3); now, is payment_method_details.card.mandate still null?
Yup, its still null.
And I don't have an webhook set as of now to get the mandate.
However, with a different charge id where I used my own card, the payment_method_details.card.mandate has a mandate id
My flow of the program actually is that:
- User processes the payment, which also creates a mandate
- Upon processing, either I should get an mandate id or payment should fail
- Store the mandate id + payment_method in database for charging in future
Hm, I see. Can you clarify what you mean by "charge id where id where I used my own charge" ?
A typo. I meant "Where I used my own card"
Got it. This will need to be a longer investigation. We won't be able to find an answer in real time so we'll need to move over to email.
Could you reach out to our support team and let them know you were chatting with developer support on Discord: https://support.stripe.com/contact/
In your message, please include a link to this thread, a summary of the issue with missing mandate IDs, and include the Charge ID you mentioned above
Please reply here when you've opened up the case so I can find it
Sure
I opened a case with id: 12409061
Alright, Thank you
Also, another thing(related to discord server)
The url in #help message
redirects to a 404 page
Ah, thanks for the heads up! Looks like Discord changed something. ๐
Looks like they moved it here: https://discord.com/safety/360044103651-reporting-abusive-behavior-to-discord
I guess the url should be updated