submitCart
Submits an existing cart for checkout.
Requirements
To use this query, please ensure that the Rye-Shopper-IP
is set in your HTTP headers. For more information about the Rye-Shopper-IP
header, view this section.
Arguments
The 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
Any requested field from the SubmitCartResult
object.
Example - request
Example - response
Errors
If the cart is not found then a corresponding error is returned
If the cart is expired (older than 10 days) then a corresponding error is returned
Expected cart behavior
-
If the cart has already been submitted then
ALREADY_SUBMITTED
error is returned -
If
BuyerIdentity
has not been provided withcreateCart
orupdateCartBuyerIdentity
thenBUYER_IDENTITY_MISSING
error is returned. -
If
BuyerIdentity
contains invalid fields then a corresponding error is returned, e.g.BUYER_IDENTITY_INVALID_PHONE
. -
If
BillingAddress
contains invalid fields then a corresponding error is returned, e.g.BILLING_ADDRESS_INVALID_PHONE
. -
If Rye API is unable to create a Spreedly environment (used for payment transactions) then
CREATE_SPREEDLY_ENVIRONMENT_FAILED
error is returned. -
If the cart submission failed due to an unknown reason then
SUBMIT_CART_FAILED
error is returned.
checkoutByCartID
or orderByID
mutationsIf the cart has been successfully submitted, an attempt to submit the cart again will lead to an error.
If the cart has multiple stores it is possible that checkout succeeds only for some of them. In this case, the cart can be submitted again. It has no effect on already submitted stores in the cart.
Was this page helpful?