Mutations
submitCart
Submits an existing cart for checkout.
Arguments
input
CartSubmitInput!
requiredThe input
object contains the unique identifier (ID
) for the cart, a tokenized credit card value, and the billing address information of the buyer. See CartSubmitInput
Returns
SubmitCartResult.*
SubmitCartResult
Any requested field from the SubmitCartResult
object.
Usage
import { RyeClient, Marketplace } from "@rye-api/rye-sdk";
const ryeClient = new RyeClient("<AUTH_HEADER>", "<SHOPPER_IP>");
const result = await ryeClient.submitCart({
input: {
id: "<CART_ID>",
token: "<PAYMENT_TOKEN>",
billingAddress: {
firstName: "<FIRST_NAME>",
lastName: "<LAST_NAME>",
email: "<EMAIL>",
phone: "<PHONE>",
address1: "<ADDRESS_1>",
address2: "<ADDRESS_2>",
city: "<CITY>",
provinceCode: "<PROVINCE_CODE>",
countryCode: "<COUNTRY_CODE>",
postalCode: "<POSTAL_CODE>",
},
},
});
Was this page helpful?