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": "1795735ed019b599c82a8c81",
"id": "Pmf-be0mx",
"version": 42,
"origin": "example",
"created": 1776825559351,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1791429851574,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1780908873807,
"refundDate": 1748436756675
},
"orderId": "example",
"note": {
"date": 1736300685454,
"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": "70911d4c1b1b7a797e069efc",
"quantity": 1,
"unavailable": true,
"added": 1767386930339
}
],
"buyer": {
"_id": "2aed95fc2cb0fad3a5940892",
"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": "1737763e1d950422a39e785c"
},
"updated": 1766742655442,
"expires": 1760615740688,
"status": "open",
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true,
"taxProfile": {
"isNationalShipping": true
},
"locationRef": "d2a8b2fb055ce8a676a35324"
}
}

Arguments​

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

Returns​

Checkout!