When called for a not submitted cart, Order.status will always be PENDING and Order.events array will be empty. After cart submission Order.status will change according to the current checkout state and the Order.events array will be populated.

Sometimes, when using the orderById query, the returned status may be ACTION_REQUIRED. In this case, you should check the requiredActions field for each order with this status and perform the necessary actions. Currently, there is only one required action: CompletePaymentChallenge, also known as 3D-S Challenge. You can learn more about this use case in the 3D-S Challenge guide.


Arguments

id
ID!
required

The ID of the Order

Returns

Order.*
Order

Any requested field from the Order object.

Usage

import { RyeClient, Marketplace } from "@rye-api/rye-sdk";

const ryeClient = new RyeClient("<AUTH_HEADER>", "<SHOPPER_IP>");

const result = await ryeClient.orderById({
  id: "<ORDER_ID>",
});