#mmv_api

1 messages ¡ Page 1 of 1 (latest)

obsidian talonBOT
#

👋 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/1350074856313720873

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

limpid warren
#

Hi, let me help you with this.

#

Could you please share a few example PaymentIntent IDs?

lost merlin
#

Hi, sure

#

Here are two examples of payment intents that I would like to retrieve (no failed capture attempt on them): pi_3R2WvTENSucQYV1Q1DoYPVKHm, pi_3R2D4GENSucQYV1Q1ythsTJr

#

here are two examples of PIs that I would NOT like to retrieve (there are failed capture attempts on them): pi_3QzzhMENSucQYV1Q0LmqUcQW, pi_3R05vPENSucQYV1Q1ZM22ErV

limpid warren
#

I don't think you can check if it have failed captures. You will need to fetch all of the uncaptured PIs and check if a capture took place manually in your own code.

lost merlin
#

Thank you for this information

#
  1. How would I query PIs based on the status field? There is no Status field on the PaymentIntentListOptions object in the Stripe .NET library
#
  1. How would I check if a capture took place manually in code?
#

(I am using the latest version of the Stripe.net NuGet package published by Stripe (v47.4.0)

limpid warren
#
  1. Please see the link I shared above.
  2. How are you checking this right now?
lost merlin
#
  1. I did check the link above, however I don't know how this can be implemented in .net as there is no "Status" field that can be added when retreiving the PIs
#
  1. I am not because I don't know how, this is why I have reached out to you
limpid warren
#
  1. I don't think it is possible to check if you attempted to capture the PaymentIntent via API. I recommend cancelling the PaymentIntent if a capture request fails, so it's not retrieved.
lost merlin
#

Thank you, I have managed to find all information for listing the PI's with status=requires_capture - The PaymentIntent Search endpoint needed to be used instead of the List one I was using

#

for (2.), the problem I am trying to solve is more complex, I have simplified it for the purpose of this chat. Essentially I am trying to build a tool that will periodically query Stripe's API for uncaptured payments and email a reminder to the supplier responsible for approving that order. Once they approve the order, we capture the PI

#

This would work fine so far, except for the cases where they have actually approved but the PI did not capture due to an error. Those are the cases that I am trying to filter out - so not as simple as cancelling the PI, because Customer Support needs to investigate and potentially capture the PI manually, so it cannot be calcelled

limpid warren
#

I understand, basically you need to identify these PIs that have a failed capture attempt.

lost merlin
#

exactly

limpid warren
#

One workaround would be to modify the PaymentIntent metadata after a failed attempt to capture the funds. After that you can fetch all the PIs with the given key-value pair in the metadata.

lost merlin
#

That is a great ideea, thank you

#

No more questions for now, I'll come back and reference this if I need any more help. Thank you for your time

#

Actually, does this chat have an ID that I can reference in future requests?

obsidian talonBOT
limpid warren
#

You can just copy the URL.

#

Happy to help.