If you scan a QR code for a secret base, you won't be able to battle them until the day after. This is probably to prevent people from deleting the base and re-scanning it so they don't have to wait until the next day to battle the base.
Source: Knowledge