This is called ‘spoofing’.
Government agencies, including police will never call you to ask for credit card details or payment by way of gift cards.
Never provide private information or credit card details to unsolicited calls, email or text messages.
Visit Scamwatch for more information.