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": "vYw-nDfE1",
"billing": {
"address": {
"_id": "e71ef0af73c1295bdca09ecc",
"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": "8fL-nTiON",
"value": "value",
"redeemType": "redeemType"
}
},
"shipping": {
"method": "method",
"address": {
"_id": "d3a52385604c4b009946dad6",
"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": "c96fcf7c1efac8a89915b166",
"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": "928fc3157b04c565db5cea97",
"id": "Z2Q-AwVkH",
"configRef": "1f51f42b47dc123c7b962167",
"origin": "example",
"created": 1762731726332,
"shipping": {
"status": "example",
"date": 1744996683002,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1736031271299,
"refundDate": 1744677807314
},
"orderId": "example",
"note": {
"date": 1713104126845,
"content": "example"
},
"items": [
{
"_id": "8e5088cec84e4a495c35f2a1",
"id": "K7B-g4zuT",
"quantity": 1.23,
"added": 1715628318940,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "50dce3da8db3b90adac61de7",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "575093c8f0974c7c1c95a705",
"id": "CCY-ZUHKY",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1761112287081,
"expires": 1765974615074,
"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
| Name | Type | Description |
|---|---|---|
id | String! | Checkout identifier string. |
billing | CheckoutBillingInput | Billing address and voucher information. |
shipping | CheckoutShippingInput | Shipping address and method information. |
buyer | CheckoutBuyerInput | Buyer information. |
createAccount | Boolean | Whether to create a user account for the buyer. |
useSingleAddress | Boolean | Whether to use the same address for billing and shipping. |