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": "HSY-vEdR2",
"billing": {
"address": {
"_id": "d9524cf338548dd22648c97c",
"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": "vSI-L7QY5",
"value": "value",
"redeemType": "redeemType"
}
},
"shipping": {
"method": "method",
"address": {
"_id": "4f55eedca2c91274f394d2be",
"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": "2270f23b8933b24401c2a2b1",
"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": "168a98cc2f3e83fd4b9b25c5",
"id": "uEI-GlFEC",
"configRef": "bf7f4a6447da2e3486b27343",
"origin": "example",
"created": 1754754722542,
"shipping": {
"status": "example",
"date": 1746989110027,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1757131683036,
"refundDate": 1722000851969
},
"orderId": "example",
"note": {
"date": 1718283900350,
"content": "example"
},
"items": [
{
"_id": "2c88ba5ad50386dbb7bc64e4",
"id": "Pkk-7VrBV",
"quantity": 1.23,
"added": 1756573518396,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "44c071bedd8abe0f98a6e1f1",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "e2b9fe1bff705e773a3030a6",
"id": "jc5-OeSoj",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1760817203538,
"expires": 1741476199800,
"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