Correct sequence of API calls

This guide is intended to provide instructions on how to use the APIs in an external connection with our company. It describes the working flow of the APIs involved in the process of creating and managing orders. The following are the steps involved in the flow:

Starting a new order: The flow starts when the seller starts a new order. Whenever the seller searches the catalog for a product, the "SearchProduct" API is called to get information about the desired product.

Checking the order: Whenever a product is added, removed, edited or changed in the cart, the "OrderChecker" API is called to check if the order is still valid.

Creating the order: After the previous steps, the order is created and its status is changed to "CREATED". The provisioning API is called by OmniChat, and the order is also created within the seller's system. Then the OmniChat "statusChange" API is called to provision the order and change its status to "ORDER_GATEWAY_PROVISIONED".

Generating billing: Next, the payment gateway's provisioning API is called to create the order within the system responsible for generating billing and receiving payment from the customer.

Sending billing link: After the order is successfully created in the payment gateway, the order status is updated to "OPEN" and the billing link is sent to the customer.

Payment confirmation: When the customer makes the payment, the payment gateway processes the transaction and notifies OmniChat of the payment confirmation. The OmniChat "statusChange" API is called again to update the order status to "PAID". Additionally, OmniChat sends a status change notification to the seller's system.

Product delivery: With the product paid for, the product separation and delivery procedures begin. At each new process step, such as "PACKAGED", "SHIPPED" and "DELIVERED", the "statusChange" API is called to update the order status for the respective delivery step.

Cancellation request: If an order cancellation request is made via the "OrderCancel" API, the request is processed and the "statusChange" API is called to change the order status to "CANCELLED".