orderBillingUpdate Mutation
Description
Updates the billing information for an order, including billing address and invoice ID.
mutation orderBillingUpdate(
$orderRef: ID!
$billingAddress: AddressInput
$buyerRef: ID
$invoiceId: String
) {
orderBillingUpdate(
orderRef: $orderRef
billingAddress: $billingAddress
buyerRef: $buyerRef
invoiceId: $invoiceId
) {
_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
archived
isSystem
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": "d19cd65b551b5465de696347",
"billingAddress": {
"description": "A description",
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"streetNumber": 42,
"city": "Montreal",
"state": "Quebec",
"postCode": "postCode",
"alpha2": "alpha2",
"country": "Canada",
"stateCode": "stateCode",
"type": "type",
"geoLoc": {
"type": "type",
"coordinates": [
30.7
]
}
},
"buyerRef": "34e2dca8d0276ff85bed5a3b",
"invoiceId": "invoiceId"
}
Response
{
"orderBillingUpdate": {
"_id": "8cf556f9a3cf9492fd95a67f",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1749418952980,
"modified": 1781146505807,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1785920126216,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1743074309097,
"refundDate": 1749537438585
},
"orderId": "example",
"notes": [
{
"date": 1764140070559,
"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": "2a189e230b4960007e34834b",
"quantity": 1,
"unavailable": true,
"added": 1775839208416
}
],
"messages": [
{
"_id": "8e2631ca781e4bc110a2cd1a",
"created": 1733852439275,
"subject": "example",
"message": "example",
"fromBuyer": true,
"flagged": true,
"archived": true,
"isSystem": 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": "9ca6ec70f306659f075cc589",
"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": 1785852702218,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "f96e08d81576cf90f878fa96"
},
"updated": 1766915672180,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "bad12bb21285005c5caa07f9",
"id": "example",
"created": 1775254809390,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
orderRef | ID! | Reference ID of the order to update. |
billingAddress | AddressInput | Billing address for the order. If not provided, the billing address remains unchanged. |
buyerRef | ID | Reference ID of the buyer to assign to the order. Pass null to unassign the current buyer. |
invoiceId | String | Custom invoice ID to set on the order's billing. |