checkoutByCartID
checkoutByCartID.”
Checkout.status
will always be PENDING
. After cart submission Checkout.status
will change according to the current checkout state.Sometimes, when using the checkoutByCartID
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 casse in the 3D-S Challenge guide.
Arguments
The ID of the Cart
Set to true
by default.
If set to true
, the buyerIdentity
field will be fetched in the response.
Set to true
by default.
If set to true
, the cartLines
field will be fetched in the response.
Set to true
by default.
If set to true
, the offers
field will be fetched in the response.
Set to true
by default.
If set to true
, the shippingMethods
field will be fetched in the response.
Returns
Any requested field from the Checkout
object.
Usage
import { RyeClient, Marketplace } from "@rye-api/rye-sdk";
const ryeClient = new RyeClient("<AUTH_HEADER>", "<SHOPPER_IP>");
const result = await ryeClient.checkoutByCartId({
id: "<CART_ID>",
fetchBuyerIdentity: false, // Set to true to fetch buyer identity
fetchOffer: false, // Set to true to fetch offers for each store
fetchCartLines: false, // Set to true to fetch cart lines
fetchShippingMethods: false, // Set to true to fetch shipping methods
});
Was this page helpful?