#issac
1 messages · Page 1 of 1 (latest)
Can you share the example payment intent ID (pi_xxx)?
pi_3OPyIGIgHTmGKAPW07NFMSFJ
i am developing a new feature ,need to get the capture status and id from capture response,so could you help with it?
now i can just get the payment intent id and status
sdk: github.com/stripe/stripe-go/v71 v71.39.0
You will be able to get the amount that has been captured in the latest_charge: https://stripe.com/docs/payments/multicapture#capture-payment-intent
Charge object in latest_charge is not expanded by default, so it should be added as the expanded parameter: https://stripe.com/docs/api/expanding_objects
Latest charge is available from stripe-go v74.0.0: https://github.com/stripe/stripe-go/blob/v76.9.0/CHANGELOG.md#7400---2022-11-15
so if i want capture two or more times, how can i identify every capture? is there any id could do it?
The amount in each capture should be saved in your own database. Stripe doesn't provide an unique ID of each capture
so one payment intent only have one charge id? payment intent id and chagre id are one-to-one?
Not necessary. If there is any failed attempt of a payment in the past, it will also create a charge.
If the payment intent is succeeded, the latest_charge should be the successful charge that is capturable
if i capture payment intent there times, every time i capture will get same charge id or different charge id?
and this payment intent would have there charge records or only one charge record
if i capture payment intent there times, every time i capture will get same charge id or different charge id?
Every time will be on the same charge ID with the successful authorisation
and this payment intent would have there charge records or only one charge record
A payment intent can have multiple charges, but there will only be one successful authorisation charge which is thelatest_chargeif the payment intent is succeeded. Any multi-capture on the payment intent will on the sucessful charge inlatest_charge
got it thx :)