#marcus_api
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/1397164730958741578
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
for some reason when I open you link I'm redirected to an ad. so I can't really see your code.
but can you share more details about your issue? did you actually try your code? is it working? if not, what is the exact issue, like do you get an error message?
and I don't see how I could (easily) test this at the moment.
you could test it in test mode. what's the exact issue?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
As I wrote in the description - I have a webhook, that is called for every refund.
yes, I tried opening that link, but I can't see your code.
Sometimes in the past, I accidentally create refunds without a creditnote attached
so I wrote this code, that will check if the refund has a credit note attached, if not, create a credit note and attach the refund to it
then I can never fuck up again 😉
I wrote this, now with the new api version, it got more complex, so I wanted to ensure my code truly works
well, next step is to test your code on the new API version.
well, since I dont have any refunds at the moment, especially non without a credit note.. that's difficult
you should test this in test mode, and create refunds in test mode.
that's what test mode (or sandbox) is for: testing your code before pushing it to production with real payments/refunds.
Can you please check my code and tell me if generally it looks correct or not?
For instance, I use this together with another tax related api.. and they don't have a test system at all.
sorry we can't really review code. and even if I had the time, I can make mistakes.
the solution here is simply to test your code in test mode, and see if everything works as expected or not.
why don't you want to use test mode or sandbox? do you need help setting that up?
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
Version changes cannot be made in test mode—switch to live mode to upgrade or rollback.
see the shit. This cant even be done 😦
Right, the recommended way to test code in an API upgrade is to pass the Stripe-Version headers ensuring that everything works end-to-end
Only then once that is fine should you upgrade your account default
what do you have a test system for if I can't make use of it from my test system? 😦
The default API version has always been cross-environment. You can't have differing version between test/live. If you want to rely on that, use different Stripe accounts
But the recommended way is to use Stripe-Version head as I noted
The default API version has always been cross-environment. => Yes, it has always the been the same shit. Which is why I wanted to ask here if it looks okayish, and then YOLO and see if it works, or rollback quickly if it doesn't