I accidentally purchased an Apple Music subscription and want to request a refund. I can sign in to my Apple account, but it asks me to update the account. When I visit the account website and complete the two-factor authentication step, I receive the verification code but get an "Unknown error, try again later" message after entering it. I've tried several times since last night, and now the system says it can't send me any more codes. I'm concerned because I may only have a limited refund period and want to recover the charge.
2 Answers
If the refund deadline is approaching, don’t keep testing the login over and over. Save screenshots of the error and the subscription charge, then contact Apple Support through its official support options and explain that two-factor authentication is preventing you from submitting the request. They can help restore account access or review the accidental purchase directly.
It sounds like the verification system has temporarily limited code requests. Since repeated attempts can trigger that restriction, stop trying for a while and wait before requesting another code. Make sure your phone has service, your device date and time are set automatically, and that you’re using the same trusted phone number and Apple account. Once sign-in works again, submit the refund request through Apple’s official purchase-support page.
It only worked a few times before the code limit appeared, so I’ll wait and try again later rather than keep requesting codes.

I’m trying to act quickly because only a short time has passed since the purchase, so I’ll keep the error screenshots and contact support if the account page still fails.