Skip to main content

orderRemoveRefundMethod Mutation

Description

Removes a refund method from an order. You can specify either the refund method reference ID or the refund method origin. If both are provided, the reference ID takes precedence.

mutation orderRemoveRefundMethod(
$orderRef: ID!
$orderPaymentMethodRef: ID
$orderPaymentMethodOrigin: String
) {
orderRemoveRefundMethod(
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": "eff22e779d108c08fdde5418",
"orderPaymentMethodRef": "b77fa17bac7224b98480bf00",
"orderPaymentMethodOrigin": "orderPaymentMethodOrigin"
}

Response

{
"orderRemoveRefundMethod": {
"_id": "37ae8a4a9744878f2016bb60",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1765783186329,
"modified": 1704974503906,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1731763037439,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1763895794321,
"refundDate": 1733980092498
},
"orderId": "example",
"notes": [
{
"date": 1758392799040,
"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": "6c213d8c332818c8c8829cfa",
"quantity": 1,
"unavailable": true,
"added": 1730776211958
}
],
"messages": [
{
"_id": "06b67f4d274a3349828d0de9",
"created": 1724608595953,
"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": "75a8cfd345798e4fdaf7734f",
"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": 1711907797718,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "5d3d8277ad22ad47e5cf86da"
},
"updated": 1758852851978,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "897c351c3c0899c443a0a6e2",
"id": "example",
"created": 1765984821600,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
}

Arguments

NameTypeDescription
orderRefID!Reference ID of the order to remove a refund method from.
orderPaymentMethodRefIDReference ID of the specific refund method to remove. If provided, this takes precedence over orderPaymentMethodOrigin.
orderPaymentMethodOriginStringOrigin of the refund method to remove (e.g., "cash", "card", "stripe"). Used if orderPaymentMethodRef is not provided.

Returns

Order!