#raffi23_api

1 messages · Page 1 of 1 (latest)

haughty crystalBOT
small wedgeBOT
#

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.

haughty crystalBOT
#

👋 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.

hardy smelt
#

hi there!

#

how are you accepting payments? Checkout Session, Payment Element, something else?

chilly spruce
#

hello 👋🏻checkout session

#

i am also handling both subs and one time orders

hardy smelt
#

And for Subscriptions, you can check the Invoice object

chilly spruce
#

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?

hardy smelt
#

both are possible. but if you want more information (tax, dicounts, etc.), checkout.session.completed is better.

chilly spruce
#

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?

hardy smelt
#

do i need to expand the charge on the refund object?
correct

chilly spruce
#

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*

hardy smelt
#

I already answered this earlier:

And for Subscriptions, you can check the Invoice object

chilly spruce
#

ah sorry i missed this one

#

awesome i guess that's all i need

#

thanks a lot!

hardy smelt
#

happy to help 🙂

chilly spruce
#

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?

hardy smelt
#

you want to change the amount of an existing Subscription?

chilly spruce
#

yes

hardy smelt