Skip to main content

checkoutCreate Mutation

Description​

Creates a new empty checkout.

mutation checkoutCreate($locationId: String) {
checkoutCreate(locationId: $locationId) {
_id
id
version
origin
created
shipping {
status
fulfilled
date
method
freeShippingThreshold
tracking
shopCollection
weight
packingSlip
}
billing {
status
fulfilled
paymentDate
refundDate
}
orderId
note {
date
content
}
totals {
subtotal
subtotalBeforeTaxes
tax
grand
leftToPay
itemQuantity
discount
shipping
creditNote
balance
}
items {
_id
quantity
unavailable
added
}
buyer {
_id
firstName
lastName
email
name
path
telephone
organisation
taxNumber
}
seller {
type
name
email
ref
}
updated
expires
status
urls {
checkout
storefront
}
useSingleAddress
taxProfile {
isNationalShipping
}
locationRef
}
}

Variables​

{
"locationId": "locationId"
}

Response​

{
"checkoutCreate": {
"_id": "ad6f6e4743c03afa8e9100c2",
"id": "rjZ-GvdfR",
"version": 42,
"origin": "example",
"created": 1750811959087,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1777583921508,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1768459608804,
"refundDate": 1753749727536
},
"orderId": "example",
"note": {
"date": 1754316680229,
"content": "example"
},
"totals": {
"subtotal": 1.23,
"subtotalBeforeTaxes": 1.23,
"tax": 1.23,
"grand": 1.23,
"leftToPay": 1.23,
"itemQuantity": 1.23,
"discount": 0.1,
"shipping": 1.23,
"creditNote": 1.23,
"balance": 1.23
},
"items": [
{
"_id": "0fb0ecbf9ac6d3e77db0197a",
"quantity": 1,
"unavailable": true,
"added": 1794916288197
}
],
"buyer": {
"_id": "cd392f971477e1c1e316754e",
"firstName": "example",
"lastName": "example",
"email": "email@example.com",
"name": "example",
"path": "/release/1763553751/release-artist-release-name",
"telephone": "example",
"organisation": "example",
"taxNumber": "example"
},
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "18e4ec39359f7548fb08a97d"
},
"updated": 1762056640480,
"expires": 1781527075030,
"status": "open",
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true,
"taxProfile": {
"isNationalShipping": true
},
"locationRef": "bdb1e8d93d56e20cf5c93b41"
}
}

Arguments​

NameTypeDescription
locationIdStringStripe ID of the location to associate with the checkout.

Returns​

Checkout!