Skip to main content

checkoutUpdate Mutation

Description

Updates checkout information including billing, shipping, and buyer details.

mutation checkoutUpdate(
$id: String!
$billing: CheckoutBillingInput
$shipping: CheckoutShippingInput
$buyer: CheckoutBuyerInput
$createAccount: Boolean
$useSingleAddress: Boolean
) {
checkoutUpdate(
id: $id
billing: $billing
shipping: $shipping
buyer: $buyer
createAccount: $createAccount
useSingleAddress: $useSingleAddress
) {
_id
id
configRef
origin
created
shipping {
status
date
method
freeShippingThreshold
tracking
shopCollection
weight
}
billing {
status
paymentDate
refundDate
}
orderId
note {
date
content
}
items {
_id
id
quantity
added
total
unavailable
}
buyer {
_id
email
firstName
id
lastName
name
telephone
organisation
taxNumber
isGuest
}
seller {
_id
id
firstName
lastName
name
email
telephone
taxNumber
}
updated
expires
status
message
totals {
grand
leftToPay
discount
itemsQuantity
itemQuantity
subtotal
subtotalBeforeTaxes
shipping
tax
}
urls {
checkout
storefront
}
useSingleAddress
}
}

Variables

{
"id": "LhD-0Dnxn",
"billing": {
"address": {
"_id": "e45163f42d5507934e70ba76",
"description": "A description",
"firstName": "John",
"lastName": "Doe",
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"streetNumber": "streetNumber",
"city": "Montreal",
"state": "Quebec",
"stateCode": "stateCode",
"postCode": "postCode",
"country": "Canada",
"alpha2": "alpha2",
"type": "type"
},
"voucher": {
"id": "dgU-pSZoq",
"value": "value",
"redeemType": "redeemType"
}
},
"shipping": {
"method": "method",
"address": {
"_id": "dfa53abb64b2023b66eb026f",
"description": "A description",
"firstName": "John",
"lastName": "Doe",
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"streetNumber": "streetNumber",
"city": "Montreal",
"state": "Quebec",
"stateCode": "stateCode",
"postCode": "postCode",
"country": "Canada",
"alpha2": "alpha2",
"type": "type"
},
"tracking": "tracking",
"confirmationEmail": {
"recipient": "recipient"
},
"shopCollection": true
},
"buyer": {
"_id": "3f32e12a8054283bda3df7d0",
"email": "email@example.com",
"firstName": "John",
"id": 30.7,
"lastName": "Doe",
"name": "A name",
"telephone": "telephone",
"organisation": "organisation",
"taxNumber": "taxNumber",
"isGuest": true
},
"createAccount": true,
"useSingleAddress": true
}

Response

{
"checkoutUpdate": {
"_id": "1e8d7aef4858bc843db11cb5",
"id": "NVI-SiQV5",
"configRef": "d0e55bfc5df6ce52745369bf",
"origin": "example",
"created": 1769834047475,
"shipping": {
"status": "example",
"date": 1746692608307,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1717948317168,
"refundDate": 1761004116425
},
"orderId": "example",
"note": {
"date": 1759720720678,
"content": "example"
},
"items": [
{
"_id": "120959930869d453cce61709",
"id": "uGZ-qtAsY",
"quantity": 1.23,
"added": 1727694531884,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "d6476c2942edb89f309b564c",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "083943e31b11b65e29ae627a",
"id": "hx5-ZvQ6y",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1716157071391,
"expires": 1737438663430,
"status": "example",
"message": "example",
"totals": {
"grand": 1.23,
"leftToPay": 1.23,
"discount": 0.1,
"itemsQuantity": 1.23,
"itemQuantity": 42,
"subtotal": 1.23,
"subtotalBeforeTaxes": 1.23,
"shipping": 1.23,
"tax": 1.23
},
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true
}
}

Arguments

NameTypeDescription
idString!Checkout identifier string.
billingCheckoutBillingInputBilling address and voucher information.
shippingCheckoutShippingInputShipping address and method information.
buyerCheckoutBuyerInputBuyer information.
createAccountBooleanWhether to create a user account for the buyer.
useSingleAddressBooleanWhether to use the same address for billing and shipping.

Returns

Checkout