It's not clear what you are using but since the data is encrypted, suppose that you are using LoRaWAN.
First of all, we should know which type of the packet is. Is it an uplink message or a downlink message? You may refer to the LoRaWAN specification to figure out the message type.
Secondly, you may move ahead to understand how MAC frame payload is encrypted/decrypted. The section.4 in the specification can help you.
Thirdly, if you want to implement the encryption/decryption in , maybe this pure node.js repo can help you: anthonykirby/lora-packet. Please pay attention to the LoRaWAN packet structure, there payload(data) is only part of the whole packet. You may filter the data first, and then do decryption. Hope this could solve your problem.