One natural way to handle this — especially if you're not strictly tied to real-time communication — is to use a message queue (like RabbitMQ, Kafka, or AWS SQS FIFO queues).
By having the sender push messages into a queue, and the receiver consume them in order, the queue itself can help preserve message ordering, retries, and even buffering when one side is temporarily unavailable.
This can offload complexity (like sequence number tracking) from your API/application layer and let infrastructure handle message delivery and ordering guarantees.
Considering you're using a REST API and not a socket-based solution, this approach can be especially helpful to enforce ordering and reliability in an asynchronous, stateless environment.