#dahri_code

1 messages ¡ Page 1 of 1 (latest)

broken oracleBOT
#

👋 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/1282929102944469023

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

slow dust
#

Hi there, so you want to refund the first invoice created by the subscription?

lusty niche
#

Heyy,
Not first invoice just regular subscription.

slow dust
#

Can you elaborate?

lusty niche
#

I did not get the first invoice, like what its mean? user can have multiple subscriptions

slow dust
#

I just want to know which payment you want to refund. A subscription would generate invoices, and each invoice is associated with a payment.

#

Or do you mean you want to refund all inoivces generated by a subscritpion?

lusty niche
#

can you please share which invoices should be returned and which to keep?

#

because i just have to refund the payment, dont have idea regarding invoices

slow dust
lusty niche
#

thank you jack for helping,
But im using stripe.checkout.sessions.create not payment_intent, there i cant find payment_intent_id in the webhook event

slow dust
lusty niche
#

yes

#

have got the subsctiption Id now what to do

#

how to refund with it?

slow dust
#

Hmm, I thought I've answered this. You can't refund a subscription directly, but you can refund the paymentIntents associated with the invoices that the subscription created.

#

Can you take a look at the information that I shared earlier?

lusty niche
#

But the thing is we can not get paymentIntents through checkout.session.completed, so how i can refund?

slow dust
lusty niche
#

let me go through this

#

getting this error while subscriptionId is correct,
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such subscription: 'sub_1PxLqSS4f9sxCRXIeeJEzPfi'",
"param": "id",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_OnVSjismKucs8Q?t=1725947023",
"type": "invalid_request_error"
}
}

Learn more about error codes and how to resolve them.

#

this is happening while retrieving invoices by subscriptionID