#akashpatil7596_api

1 messages ¡ Page 1 of 1 (latest)

rocky surgeBOT
#

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

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

indigo badgerBOT
#

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.

golden schooner
#

hi there!

valid gull
#

Hi, yes I know But The doc saying something else

#

and also for this API: stripe.refunds.create some says to pass paymentIntent as param and some says pass chargeId as params

golden schooner
#

can you share the link to this page?

valid gull
golden schooner
#

got it. and what's the issue exactly with what is mentioned in that article?

#

the doc basically tells you to get the credit balance amount, then create a Refund for that amount, and finally reset the credit balance to zero.

valid gull
#

By using which API I can get the customer's credit balance amount?

golden schooner
valid gull
#

There isn't any field related to credit balance

golden schooner
#

I see it in yours creenshot: balance: 0

valid gull
#

So I just take the balance, refund it and them reset the credit balance?

golden schooner
#

yes

valid gull
#

Let me get this straight one last time,
First I retrieve customer stripe.customers.retrieve
Then took the balance and refund it

stripe.refunds.create({
  charge: 'ch_1NirD82eZvKYlo2CIvbtLWuY',
})

In this I pass the balance of customer as an amount.
In this which charge Id do I have to pass?

golden schooner
#

you forgot to set the amount in the Refund, which should be equal to what you see in balance

#

In this which charge Id do I have to pass?
Find the latest Invoice of the user

#

this is covered in the screenshot you shared:

valid gull
#

And Stripe automatically resets the customer's credit balance Right? Or do I have to call some API for that too?

golden schooner
#

no, you have to reset it yourself

#

again, this is covered in yours screenshot:

#

please read carefully that page

valid gull
#

They are showing two APIs for that, which one to choose?

#

can I just update customer with balance 0? tha'll do the job?

#

Hello

brisk birch
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

valid gull
#

Okay, Thanks

brisk birch
#

Happy to help.