#mejackreed_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ 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/1367836163565424680
๐ 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.
- mejackreed_best-practices, 2 days ago, 11 messages
๐
Is there a way this can be done automatically? I don't believe so.
Yeah you need to implement a script for this
I've been working on a script to iterate through subscriptions -> invoices to manually calculate this. Is there a way to query Charges or PaymentIntents based off of the Invoice to then create a Refund?
You can list all Susbcription's latest invoices and issue refund if paid
Reading the Refund API docs:
When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
What's the cleanest way to do this, given a Subscription's latest Invoices?
ah got it. ty!
And one last quick question.. is there anyway on cancelation to send a custom message?
And making API requests to retrieve Invoice, I don't seem to have access to the payments property. Are there additional API arguments I need to send?
Nope, you need to do it via your integration
You need to add expand
got it thank you!