#raffi23_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.
- raffi23_webhooks, 4 days ago, 14 messages
- raffi_invoice-questions, 4 days ago, 41 messages
- raffi23_docs, 5 days ago, 8 messages
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1239910901591572480
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
how are you accepting payments? Checkout Session, Payment Element, something else?
if you are using Checkout, then you should check the Checkout Session object itself, not the PaymentIntent: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-total_details
And for Subscriptions, you can check the Invoice object
so if i have a payment model in the database i need to create it within the checkout session completed event not payment intents right?
both are possible. but if you want more information (tax, dicounts, etc.), checkout.session.completed is better.
awesome, also i have one more question.
in case of a refund how can i get the total amount refunded on charge.refunded
do i need to expand the charge on the refund object?
do i need to expand the charge on the refund object?
correct
great, sorry for these too many question but another question popped in my mind
for example the information like tax and discount amounts are indeed on the checkout session in the case of the first payment
but what about the subscription being renewed ?
renewed automatically*
I already answered this earlier:
And for Subscriptions, you can check the Invoice object
happy to help 🙂
excuse me before this thread is closed i have another question,
I am creating the checkout session for subscription using price_data
in case i have changed the price in the future how can i update the amount being charged on stripe?
you want to change the amount of an existing Subscription?
yes
this is explained here: https://docs.stripe.com/billing/subscriptions/upgrade-downgrade