#rbole
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
It has the payment_intent attached that has more information about the time of the payment.
ok, so I after receiving the invoice I have to query the payment_intent, then I can store this info in our DB as well.
but in the payment_intent object, which property shows the date of the payment ?
Actually, an even better object would be payment_intent.latest_charge.created: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-latest_charge
You can use "expand": ["payment_intent.latest_charge"] on the Invoice to populate the nested objects too: https://stripe.com/docs/api/expanding_objects
I receive the invoice after the webHook event. How can I expand it in that situation ?
What programming language are you using?
node.js
You can expand objects when you call constructEvent.
sorry but I can't find this in the hook request from stripe to our API endpoint.
Let me check.
I can't find it in the docs right now, maybe it's not possible anymore. Sorry for confusion.
In this case, please use the retrieve PaymentIntent API and expand the latest_charge: https://stripe.com/docs/api/payment_intents/retrieve
ok I got it, but the paymentDate is represented with the created property ?
Yes
alright, thank you for helping me out.
Happy to help!