#akash_subscription-refund

1 messages ยท Page 1 of 1 (latest)

sudden isleBOT
#

๐Ÿ‘‹ 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/1225007247545995284

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

desert cosmosBOT
#

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.

flint quail
#

hi! maybe there was no payment required, thus, no charge object? Have you looked at for example the amount of the PaymentIntent? or inspect the Invoice in your dashboard and see what it was, if there were discounts etc, you can debug this on your end a little.

vagrant violet
#

So If I want to know if this invoice is paid successfully or not even If the payment is 0, How can I know that?
And How can I get the invoice and receipt , even for $0 payment?

flint quail
#

So If I want to know if this invoice is paid successfully or not even If the payment is 0, How can I know that?
I'd start by looking at the Invoice in your Dashboard. Simply paste the Invoice ID in_xxx into the search bar for example.

vagrant violet
#

I got the list of invoice by stripe.invoices.list API, In that there is two data one with amount_paid: 99999 and one with amount_paid: 0 , the data withamount_paid : 0 is my latest invoice I think

#

This is the data I'm getting, can you tell me by which one of the field I can confirm that the payment is successful for sure.

flint quail
#

d I can confirm that the payment is successful for sure.
There is no payment, so that question doesn't appy. You can see the amount_due is 0, so there was no payment required.

vagrant violet
#

then why I'm getting this field in the response?

flint quail
#

because it's "paid" in the sense that it's closed and there's no further action required and your system can treat it as the """payment"""" for the update has been made and successful and give the customer access to the new thing they have subscribed to.

vagrant violet
#

Okay.
And How can I get the invoice and receipt , even for $0 payment?
??

flint quail
#

you can't, there isn't a receipt.

vagrant violet
#

Oh

#

Okay

#

Sure than It's solved.
But can you Help me with one another thing?

#

1). I'm hitting stripe.subscription.update API and downgrade from $999.99/year to $19.99/month
2). I catch the event In customer.subscription.updated
3). Now The Subscription plan got changed from 999.99/year to 19.99/month, and the first month got paid automatically from $999.99 and the remaining amount credited in customers stripe account or something like that.
4). I Don't know which API or How to refund that credited balance to customer...

flint quail
vagrant violet
#

Yes but I don't want to put amount in credited balance, I want to give it back as refund.

vagrant violet
#

No please, I read this thousand times, I don't get it.
can you explain to me in easier way like which APIs to call when, how?

flint quail
#

I can't explain it better than the docs does. If you have a specific question or something you've tried, we can try help with that.

vagrant violet
#

Umm, yes I will just pass the charge and amount to be refunded, and it's done ?

  charge: 'ch_1NirD82eZvKYlo2CIvbtLWuY',
  amount: 
});```
flint quail
#

that code (assuming you fix the broken syntax for amount ) would refund the charge with that ID yes, and can be tested in test mode.

desert cosmosBOT
sour rose
#

akash_subscription-refund

vagrant violet
#

Hello

#

I don't know how to refund tha amount

sour rose
#

@vagrant violet my colleague already explained exactly what to do with your code and how to fix it. Are you an experienced developer writing and controlling the code yourself?

#

@vagrant violet are you around?

vagrant violet
#

Yes

sour rose
#

Okay so can you answer what I asked above? sorry but you've said a few times it doesn't work or you don't know what to do but you haven't explained the real issue

vagrant violet
#

The real isssue is that I can't understand the doc and Don't know how the refund process works, for API side

sour rose
#

Are you an experienced developer writing and controlling the code yourself?

vagrant violet
#

Doc shows that I have to get list of invoice, then expand the charge , then create a refund.
I'm not sure how that works.

sour rose
#

What have you tried exactly?