#Spitzbua
1 messages · Page 1 of 1 (latest)
Hello 👋
I'm not super familiar with the firebase extension myself
I've reached out to a colleague to see if they can jump in and help
Typically you'd look at the list of charges on the PaymentIntent object
https://stripe.com/docs/api/payment_intents/object#payment_intent_object-charges
The charge object would have a refunded boolean property
https://stripe.com/docs/api/charges/object#charge_object-refunded
Unfortunately, the extension doesn’t track a refund against an existing payment document in Firestore at the moment
This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact
@verbal estuary , the thread is closed. Is there no option to synchronise the payment intent object on change of a charge (refund boolean flag u mentioned)?. If no - is there another option to check if an payment intent object is cancelled (direct api call)?
Like hanzo said, that would typically happen by making retrieve calls using the object IDs that you are working with. Is that not an option in your Firebase code here?
Could you explain that further? As of now the data in the payment intent object is not updating on refund - no syncronisation happens
Are these webhooks that you are working with here? Are these events getting send to your application and the data is not being updated there?
Those events are currently activated: checkout.session.completed
customer.subscription.created
customer.subscription.deleted
customer.subscription.updated
payment_intent.canceled
payment_intent.payment_failed
payment_intent.processing
payment_intent.succeeded
price.created
price.deleted
price.updated
product.created
product.deleted
product.updated
tax_rate.created
tax_rate.updated
The charge object is part of the payment_intent object but is not updated.
What PaymentIntent events are you getting after the refund has happened?
Can you manually retrieve the payment intent and see if it is updated? https://stripe.com/docs/api/payment_intents/retrieve#retrieve_payment_intent
No events are fired on refund. Webhook history is empty
This would be my last option as all data has been synchronised into the database so far.
This seems to be the feature request for: https://github.com/stripe/stripe-firebase-extensions/issues/315
Ah, I think I was thinking of this wrong. So the rest of the time, without you needing to write any code, your database will automatically update its entries like this?
Apologies I am also not familiar with these extensions. I can reach out to my colleague who is more familiar with them, I thought this extension worked closer to our other products so was still trying to gather info to pass on to my colleague.