#mounika_api

1 messages ¡ Page 1 of 1 (latest)

dense waveBOT
weak relicBOT
#

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.

dense waveBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260274097510682676

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

hollow vigil
#

hello! let me read up, haven't looked at multi capture in a bit

#

yep so going to have the same Charge ID on the PaymentIntent. The Charge has its amount_captured updated on each capture.

2 ways to track:

  • do it as you're making more capture requests (what I'd recommend)
  • if based on webhooks, track Charge ID and amount_captured on your end and compare on following webhook events
rain pecan
#

Question, When we want to tally with data from stripe side of how much capture happened. Other than the data we store on our side, Stripe doesnot have it saved about each capture ?

hollow vigil
#

how much capture happened
the amount_captured field no?

#

tells you what amount was captured

rain pecan
#

amount_captured will be the final amount right (Like sum of all capture amounts). If i want to look for each capture how much was done, there wont be a field to refer from stripe side ?

hollow vigil
#

ah I see what you mean, one sec

#

see the amount_captured vs previous_attributes hash which also has the prev amount_captured

#

that tells you a capture happened

rain pecan
#

Okay amount_captured in previous_attributes is (total of amount capture up to then) and charge.updated (Which we can get via webhook) event will have current capture amount.

hollow vigil
#

yep, a "before" vs "after" kind of thing

rain pecan
#

My major problem i am looking to solve is (I did for eg: 10 captures on a payment intent) and i want to save each capture with an ID in database on my side, which i want to use for further checks or tallys that i want to do, In this case is there anything that can help to identify for me

hollow vigil
#

honestly, that's what I'd recommend doing. Saving each Charge ID <> capture amounts on your end for easier look up / filtering / etc

rain pecan
#

But a charge ID can have multiple capture amounts, there will be no way on stripe to check individual capture with any specific id right?

#

I am looking for confirmation, if there wont be a unique id we can check on for each capture in a payment intent from stripe side that we can call (Like how with charge_id we can get information on that charge including metadata), multiple captures will become hard to maintain on long run for the scenario i am looking in to.

hollow vigil
#

if there wont be a unique id we can check on for each capture
with your code making the requests, you will be able to track each one, no?

#

and on the webhooks side, each Event ID for charge.updated would be unique, which you can also track in your system

rain pecan
#

Yes on our side we will create a unique id, but currently we are also storing the unique Id from the stripe side as well, so we can store the record and for comparison and reporting, it will be easier for us (When payout gets created, we will get only the charge_id, but we want all the individual capture details, so we can create for reporting and database correction on our side). One more reason to ask for unique id is so we can store metadata in that object and in case of our system restart or failure, we are relying on stripe to correct data on my side

#

But with this we will lose that

hollow vigil
#

yep so you can use a combination of Charge ID <> Event ID <> captured amount

#

(tracked on your end)

rain pecan
#

Ohhh okay Got it, Thanks