#mounika_api
1 messages ¡ Page 1 of 1 (latest)
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.
- mounika_best-practices, 22 hours ago, 18 messages
đ 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.
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_capturedon your end and compare on following webhook events
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 ?
how much capture happened
theamount_capturedfield no?
tells you what amount was captured
referring to this: https://docs.stripe.com/api/charges/object#charge_object-amount_captured
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 ?
ah I see what you mean, one sec
You'll get a charge.updated event, have a look at this: https://dashboard.stripe.com/test/events/evt_1PaNtVKZdo2LWv7yBDqq4Mif
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
see the amount_captured vs previous_attributes hash which also has the prev amount_captured
that tells you a capture happened
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.
yep, a "before" vs "after" kind of thing
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
honestly, that's what I'd recommend doing. Saving each Charge ID <> capture amounts on your end for easier look up / filtering / etc
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.
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
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
yep so you can use a combination of Charge ID <> Event ID <> captured amount
(tracked on your end)
Ohhh okay Got it, Thanks