#bugkiller.

1 messages ยท Page 1 of 1 (latest)

cinder ospreyBOT
spice prism
#

Hello

#

You mean if you update a Plan object itself?

crude leaf
#

yeah, I mean if I remove this

spice prism
#

Yeah it won't affect any already-created Subscriptions

#

Only new Subscriptions will be affected

crude leaf
#

ah, so it's ok to delete this trial period from price.

spice prism
#

Yep

crude leaf
#

what about refund?

#

I mean, I want to have refund button in my dashboard (backend is python)

#

so admin click the refund button, then we will just refund and then cancel subscription for user

radiant vale
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needed to step away.

#

Can you elaborate on what you're hoping to accomplish when you say "we will just refund" with regards to a Subscription? Is that refunding all previous Invoices, only some of them, or possibly something else?

crude leaf
#

user made subscription but sometimes, tehy asks for refund

#

they say like made subscription by accidently

#

so I want to give our website admin to manage this easily

#

what I want to do is

#

refund stripe invoice made by subscription and cancel that subscription

radiant vale
#

Gotcha, I believe you can use this endpoint to Refund the undelrying Charge of the Invoice:
https://stripe.com/docs/api/refunds/create
I'm not sure whether you'll want to use Credit Notes as part of your flow, but would recommend taking a look through here to check whether they're relevant.
https://stripe.com/docs/invoicing/integration/programmatic-credit-notes

You can then use this endpoint to cancel the subscription:
https://stripe.com/docs/api/subscriptions/cancel

Use the Invoicing API to adjust or refund finalized invoices with credit notes.

crude leaf
#

ok, thanks for giving me a link.

#

let me check

#

Can I make a refund based on invoice?

#

like refund specific invoice id

#

100% not partial

radiant vale
#

Not by creating a Refund, you would need to create a Credit Note to initiate a refund using an Invoice ID.

crude leaf
#

not sure yet

#

didn't catch about credit note

#

my purpose is just refund specific invoice

#

not partial refund . just total for that invoice

radiant vale
#

The second document I linked previously walks through how to create a Credit Note, when doing so you can provide the ID of an Invoice to trigger a refund for that already paid Invoice.

crude leaf
#

trigger a refund?

radiant vale
crude leaf
#

why refund amount here?

#

Is there any way for refund like 100%

#

full refund for that invoice

#

why I need to specify the refund amount

radiant vale
#

Hm, I'm thinking Credit Notes may be more than you're after.

crude leaf
#

Once I create a credit note for refund, refund will be done asap?

radiant vale
#

Instead, let's pivot back to talking about Refunds directly.

#

You can't provide the ID of an Invoice when creating a Refund, instead you will need to find the associated Charge object.

crude leaf
#

what if payment_intent is null for invoice?

radiant vale
#

Then the Invoice hasn't been paid or is a zero-dollar Invoice, and there isn't anything to refund.

crude leaf
#

you mean, payment_intent will never be null if it's paid invoice?

radiant vale
#

It will be null if it's a zero-dollar Invoice that didn't require payment to move into a paid state. Do you have a specific example you're looking at, or is this a hypothetical question?

crude leaf
#

just asking to know not about specific invoice question

#

then for now let me try and then will ask again ๐Ÿ™‚

#

thanks for your kind answers.

radiant vale
#

Gotcha, totally understand. Was just curious if there was a specific example to look at as a reference so we could discuss that specifically.
Glad I could help! If any of that doesn't accomplish what you're hoping, you know where to find us ๐Ÿ˜„

cinder ospreyBOT
crude leaf
#

if we make refund as you explained, it will make an update for invoice object as refunded?