#atul
1 messages · Page 1 of 1 (latest)
hello! do you need to show all payment for a Subscription? including Subscription renewal payments?
yyes
in which case, you would probably want to listen for webhooks and the invoice.paid event instead - https://stripe.com/docs/billing/subscriptions/overview#subscription-events
you can save the events to your DB as they happen if you listen to webhooks. I guess alternatively if you don't want to do that - you can simply retrieve the relevant invoices using https://stripe.com/docs/api/invoices/list
Did you got my requireemnt
we are in production with checkout.session.list to fetch all payment history, now we also want to get reciept_url
okay but Checkout Session wouldn't show all the payment history. The Checkout Session would only show the first payment for a Subscription.
Or do you mean you only want the details from the Checkout Session?
okay means checkout session will not show auto payment details ??
Hey! Taking over for my colleague. Let me catch up.
I want to show all payment history, success or failed donot matter
i am using ceckout for subscription mode
Thanks for your clarifications. First of all, I want to mention that after each successful checkout session, a PaymentIntent is created. So you can retrieve the list of all the PaymentIntent, you can refer to the property:
invoicefor the related invoice https://stripe.com/docs/api/payment_intents/object#payment_intent_object-invoice
You can find the receipt_urlin the related charge property: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-charges
Can i get charge below information from paymentIntent
- Actual amount paid by customer
- Discount availed
- Actual price ??
Just 1), 2) and 3) no AFAIK
AFAIK ??
ah sorry, as far as I know
In other words, you can refer to the amount of the PaymentIntent https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount in order to get the actual amount paid by the customer
but for 2 and 3 no that's something you need to trace in your integration