XBEE 868LP API mode communication with Particle Photon SPI mode

What Xbee library are you using? Have you looked at this one by @krvarma