Skip to main content

logout Mutation

Description

Logs out the current user session.

mutation logout($checkoutId: String) {
logout(checkoutId: $checkoutId) {
ok
checkout {
_id
id
configRef
origin
created
orderId
updated
expires
status
message
useSingleAddress
}
}
}

Variables

{
"checkoutId": "checkoutId"
}

Response

{
"logout": {
"ok": true,
"checkout": {
"_id": "7ed59627d0ec95962a9231b2",
"id": "8X0-NOSfZ",
"configRef": "2146fded4674bbb0dfbe4775",
"origin": "example",
"created": 1761312577862,
"orderId": "example",
"updated": 1761939285087,
"expires": 1757314727299,
"status": "example",
"message": "example",
"useSingleAddress": true
}
}
}

Arguments

NameTypeDescription
checkoutIdStringOptional checkout identifier to preserve.

Returns

LogoutResponse