Xbee PRO S3B in API mode, inconsistent communication.

where a zero is "transferred" to the device

To what device? The XBee is NOT an SPI device. Unless you have some non-standard XBee, in which case you need to provide a link to it.