Learn how Rye submits orders to merchants
submitCart
mutation Rye is responsible for splitting the cart into separate orders for each store and managing the lifecycle of each child order.
submitCart
, Rye will break up the cart into separate orders for each store and submit each one separately.
The Cart
object exposes a stores
field which contains a list of stores that the cart contains products from. You can use this to determine which stores will receive orders when you submit the cart.
Here are some scenarios to illustrate this more concretely.
cart
, they would see only a single entry inside stores
. This indicates that the cart contains products from a single store.When Jack submits his cart, Rye debits your Developer Account for $50 and places an order with the influencer’s Shopify store. The order will be fulfilled by the influencer, and Jack will receive a single delivery.Checkout
resource. Developers are able to inspect the status of individual child orders by querying the orders
field on a Checkout
.
Additionally, Rye will also send out webhooks when child orders change their status. This allows developers to integrate with Rye’s order lifecycle and keep their own systems in sync with Rye.
Note that because submitting a single cart can involve multiple different merchants, submitting a cart is an asynchronous operation. While a Checkout
object will be immediately returned, it may not mean the underlying orders have successfully been placed. You should always inspect the orders
field on a Checkout
to determine the status of each child order.