Adds build_send_payload and batched_send