Apple has opened a replacement program for iPhone battery cases, specifically for the iPhone XS, XS Max and XR. So, if you have one of those, and it doesn't work, you're in luck.
The company says that this is because it was confirmed that there are "charging problems" with the X-series battery boxes, that is, it is not charging. Either, the case will not charge constantly when plugged in, or the phone will not charge. If you have any of those problems. The troubleshooting posts that detail user issues with this have been emerging since the cases were launched. According to Apple, the affected units were made between January and October of last year. There is no security risk, it assures everyone: it is annoying.
To replace your case, you should take it to the Apple store or an authorized service provider. You will then be "examined before any service to verify that you are eligible for this program." It does not specify exactly what that means, perhaps all X-series battery boxes can be replaced even if they do not show the defect. Because, otherwise, it will be like going to the doctor or the mechanic: it will be the only time the defective equipment decides to start working properly.
The X series of cases was originally launched a year ago, and at that time they were competitively priced with products like Mophie. We've always thought that they look a bit weird, but they adapt very well to the phones for which they are made, assuming they really charge, of course.
You can replace the battery case for up to two years after purchasing it, although Apple warns that it does not extend the warranty on the case. For more information on how you can replace your battery, see the Apple support page here.
through Ars Technica