Skip to main content

checkoutRemovePaymentMethod Mutation

Description​

Removes a payment method from the checkout.

mutation checkoutRemovePaymentMethod(
$checkoutRef: ID!
$paymentMethodRef: ID!
$version: Int!
) {
checkoutRemovePaymentMethod(
checkoutRef: $checkoutRef
paymentMethodRef: $paymentMethodRef
version: $version
) {
_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​

{
"checkoutRef": "9a23d09e8278633e083ba299",
"paymentMethodRef": "1fd6a29716d0222c9e65e9d7",
"version": 42
}

Response​

{
"checkoutRemovePaymentMethod": {
"_id": "7af361ff612ed1a5d92d8671",
"id": "Bdx-n0ClU",
"version": 42,
"origin": "example",
"created": 1777336434341,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1746310070642,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1745605445291,
"refundDate": 1733045611235
},
"orderId": "example",
"note": {
"date": 1774706200133,
"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": "d99a31a16197eded9724ca5f",
"quantity": 1,
"unavailable": true,
"added": 1768330661981
}
],
"buyer": {
"_id": "192a4029f629e3499a826337",
"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": "29050d4d078b1589a40120d9"
},
"updated": 1733712711959,
"expires": 1773935465364,
"status": "open",
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true,
"taxProfile": {
"isNationalShipping": true
},
"locationRef": "d9fee5af3f4547a5f9cc922b"
}
}

Arguments​

NameTypeDescription
checkoutRefID!Reference ID of the checkout to update.
paymentMethodRefID!Reference ID of the payment method to remove.
versionInt!Current version number of the checkout for optimistic locking. Prevents conflicts when multiple users edit simultaneously.

Returns​

Checkout!