orderRemovePaymentMethod Mutation
Description
Removes a payment method from an order. You can specify either the payment method reference ID or the payment method origin. If both are provided, the reference ID takes precedence.
mutation orderRemovePaymentMethod(
$orderRef: ID!
$orderPaymentMethodRef: ID
$orderPaymentMethodOrigin: String
) {
orderRemovePaymentMethod(
orderRef: $orderRef
orderPaymentMethodRef: $orderPaymentMethodRef
orderPaymentMethodOrigin: $orderPaymentMethodOrigin
) {
_id
id
incId
origin
created
modified
shipping {
status
fulfilled
date
method
freeShippingThreshold
tracking
shopCollection
weight
packingSlip
}
billing {
status
fulfilled
paymentDate
refundDate
}
orderId
notes {
date
content
}
instructions
totals {
subtotal
subtotalBeforeTaxes
tax
grand
leftToPay
itemQuantity
discount
shipping
creditNote
balance
}
items {
_id
quantity
unavailable
added
}
messages {
_id
created
subject
message
fromBuyer
flagged
content
read
orderId
orderIncId
uri
via
}
buyer {
_id
firstName
lastName
email
name
path
telephone
organisation
taxNumber
}
logs {
action
description
date
ip
}
seller {
type
name
email
ref
}
updated
status
discogsStatus
buyerWasContacted
unreadMessagesCount
mergeableOrders {
_id
id
created
total
description
}
path
}
}
Variables
{
"orderRef": "f43cffbf8c9c5bb8f3d85d8e",
"orderPaymentMethodRef": "0696749e9b106cd174e81ade",
"orderPaymentMethodOrigin": "orderPaymentMethodOrigin"
}
Response
{
"orderRemovePaymentMethod": {
"_id": "b01de5b07d8f18b9138bffaa",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1720033546299,
"modified": 1729124084870,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1738034450530,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1725363770180,
"refundDate": 1711607177659
},
"orderId": "example",
"notes": [
{
"date": 1706384073510,
"content": "example"
}
],
"instructions": "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": "a78b5eeb1dfe189873c9cb38",
"quantity": 1,
"unavailable": true,
"added": 1731427657142
}
],
"messages": [
{
"_id": "d014e62f626fb8ae89db6bb2",
"created": 1751668095556,
"subject": "example",
"message": "example",
"fromBuyer": true,
"flagged": true,
"content": "example",
"read": true,
"orderId": "example",
"orderIncId": 42,
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"via": "example"
}
],
"buyer": {
"_id": "37ddf0191bb405bb5e7b5e2d",
"firstName": "example",
"lastName": "example",
"email": "email@example.com",
"name": "example",
"path": "/release/1763553751/release-artist-release-name",
"telephone": "example",
"organisation": "example",
"taxNumber": "example"
},
"logs": [
{
"action": "example",
"description": "example",
"date": 1739612382715,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "9e56ad678faad9cb2937640c"
},
"updated": 1751997016590,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "6771972cefa83951249190f8",
"id": "example",
"created": 1729399953129,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
orderRef | ID! | Reference ID of the order to remove a payment method from. |
orderPaymentMethodRef | ID | Reference ID of the specific payment method to remove. If provided, this takes precedence over orderPaymentMethodOrigin. |
orderPaymentMethodOrigin | String | Origin of the payment method to remove (e.g., "cash", "card", "stripe"). Used if orderPaymentMethodRef is not provided. |