Delete a dispute evidence file
Description
Remove the uncategorized evidence file from the dispute evidence by passing the file's ID with `destroy: true` in `uncategorizedFile`. Use this mutation when a merchant no longer wants a file included in the evidence for a dispute.
Query
mutation ShopifyPaymentsDisputeFileUploadDestroy($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId, destroy: true}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}
Variables
{
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
}
cURL
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2027-01/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation ShopifyPaymentsDisputeFileUploadDestroy($id: ID!, $fileId: ID!) { disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId, destroy: true}}) { disputeEvidence { disputeFileUploads { id } dispute { amount { amount currencyCode } evidenceSentOn finalizedOn id initiatedAt reasonDetails { reason networkReasonCode } status type } } userErrors { field message } } }",
"variables": {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
}
}'
React Router
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation ShopifyPaymentsDisputeFileUploadDestroy($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId, destroy: true}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}`,
{
variables: {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
},
},
);
const json = await response.json();
return json.data;
}
Ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
mutation ShopifyPaymentsDisputeFileUploadDestroy($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId, destroy: true}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}
QUERY
variables = {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
}
response = client.query(query: query, variables: variables)
Node.js
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation ShopifyPaymentsDisputeFileUploadDestroy($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId, destroy: true}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}`,
"variables": {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
},
},
});
Shopify CLI
shopify app execute \
--query \
'mutation ShopifyPaymentsDisputeFileUploadDestroy($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId, destroy: true}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}' \
--variables \
'{
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
}'
Direct API Access
const response = await fetch('shopify:admin/api/2027-01/graphql.json', {
method: 'POST',
body: JSON.stringify({
query: `
mutation ShopifyPaymentsDisputeFileUploadDestroy($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId, destroy: true}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}
`,
variables: {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
},
}),
});
const { data } = await response.json();
console.log(data);
Response
{
"disputeEvidenceUpdate": {
"disputeEvidence": {
"disputeFileUploads": [],
"dispute": {
"amount": {
"amount": "10.6",
"currencyCode": "USD"
},
"evidenceSentOn": null,
"finalizedOn": null,
"id": "gid://shopify/ShopifyPaymentsDispute/598735659",
"initiatedAt": "2026-08-05T00:00:00Z",
"reasonDetails": {
"reason": "FRAUDULENT",
"networkReasonCode": "4827"
},
"status": "NEEDS_RESPONSE",
"type": "CHARGEBACK"
}
},
"userErrors": []
}
}
Updates dispute evidence
Description
Update the evidence for a chargeback that the cardholder filed as fraudulent with the customer's details, the shipping address that the order was delivered to, and the merchant's written rebuttal and store policies. Use this mutation when a merchant builds their response to a chargeback.
Query
mutation ShopifyPaymentsDisputeEvidenceUpdate($id: ID!, $input: ShopifyPaymentsDisputeEvidenceUpdateInput!) {
disputeEvidenceUpdate(id: $id, input: $input) {
disputeEvidence {
uncategorizedText
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}
Variables
{
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"input": {
"customerFirstName": "Avery",
"customerLastName": "Chen",
"customerEmailAddress": "avery.chen@example.com",
"shippingAddress": {
"address1": "455 Harbor View Road",
"address2": "Apartment 3B",
"city": "Sacramento",
"zip": "95814",
"countryCode": "US",
"provinceCode": "CA"
},
"uncategorizedText": "The order shipped to the cardholder's billing address, and the carrier recorded a signature on delivery on July 31, 2026. The customer has used the same account and payment method for three earlier orders that weren't disputed.",
"accessActivityLog": "2026-07-28 14:02 UTC: The customer signed in from IP address 203.0.113.24 and placed the order. 2026-08-01 09:15 UTC: The customer signed in from the same IP address and viewed the order status page.",
"cancellationPolicyDisclosure": "Customers can cancel an order free of charge until it ships. The cancellation policy is shown at checkout and linked in the order confirmation email.",
"cancellationRebuttal": "The customer didn't ask to cancel the order before it shipped, and hasn't contacted the store since it was delivered.",
"refundPolicyDisclosure": "Unused items can be returned within 30 days of delivery for a full refund. The refund policy is shown at checkout and on every product page.",
"refundRefusalExplanation": "The customer hasn't requested a return or a refund, and the delivered item hasn't been sent back."
}
}
cURL
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2027-01/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation ShopifyPaymentsDisputeEvidenceUpdate($id: ID!, $input: ShopifyPaymentsDisputeEvidenceUpdateInput!) { disputeEvidenceUpdate(id: $id, input: $input) { disputeEvidence { uncategorizedText dispute { amount { amount currencyCode } evidenceSentOn finalizedOn id initiatedAt reasonDetails { reason networkReasonCode } status type } } userErrors { field message } } }",
"variables": {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"input": {
"customerFirstName": "Avery",
"customerLastName": "Chen",
"customerEmailAddress": "avery.chen@example.com",
"shippingAddress": {
"address1": "455 Harbor View Road",
"address2": "Apartment 3B",
"city": "Sacramento",
"zip": "95814",
"countryCode": "US",
"provinceCode": "CA"
},
"uncategorizedText": "The order shipped to the cardholder'\''s billing address, and the carrier recorded a signature on delivery on July 31, 2026. The customer has used the same account and payment method for three earlier orders that weren'\''t disputed.",
"accessActivityLog": "2026-07-28 14:02 UTC: The customer signed in from IP address 203.0.113.24 and placed the order. 2026-08-01 09:15 UTC: The customer signed in from the same IP address and viewed the order status page.",
"cancellationPolicyDisclosure": "Customers can cancel an order free of charge until it ships. The cancellation policy is shown at checkout and linked in the order confirmation email.",
"cancellationRebuttal": "The customer didn'\''t ask to cancel the order before it shipped, and hasn'\''t contacted the store since it was delivered.",
"refundPolicyDisclosure": "Unused items can be returned within 30 days of delivery for a full refund. The refund policy is shown at checkout and on every product page.",
"refundRefusalExplanation": "The customer hasn'\''t requested a return or a refund, and the delivered item hasn'\''t been sent back."
}
}
}'
React Router
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation ShopifyPaymentsDisputeEvidenceUpdate($id: ID!, $input: ShopifyPaymentsDisputeEvidenceUpdateInput!) {
disputeEvidenceUpdate(id: $id, input: $input) {
disputeEvidence {
uncategorizedText
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}`,
{
variables: {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"input": {
"customerFirstName": "Avery",
"customerLastName": "Chen",
"customerEmailAddress": "avery.chen@example.com",
"shippingAddress": {
"address1": "455 Harbor View Road",
"address2": "Apartment 3B",
"city": "Sacramento",
"zip": "95814",
"countryCode": "US",
"provinceCode": "CA"
},
"uncategorizedText": "The order shipped to the cardholder's billing address, and the carrier recorded a signature on delivery on July 31, 2026. The customer has used the same account and payment method for three earlier orders that weren't disputed.",
"accessActivityLog": "2026-07-28 14:02 UTC: The customer signed in from IP address 203.0.113.24 and placed the order. 2026-08-01 09:15 UTC: The customer signed in from the same IP address and viewed the order status page.",
"cancellationPolicyDisclosure": "Customers can cancel an order free of charge until it ships. The cancellation policy is shown at checkout and linked in the order confirmation email.",
"cancellationRebuttal": "The customer didn't ask to cancel the order before it shipped, and hasn't contacted the store since it was delivered.",
"refundPolicyDisclosure": "Unused items can be returned within 30 days of delivery for a full refund. The refund policy is shown at checkout and on every product page.",
"refundRefusalExplanation": "The customer hasn't requested a return or a refund, and the delivered item hasn't been sent back."
}
},
},
);
const json = await response.json();
return json.data;
}
Ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
mutation ShopifyPaymentsDisputeEvidenceUpdate($id: ID!, $input: ShopifyPaymentsDisputeEvidenceUpdateInput!) {
disputeEvidenceUpdate(id: $id, input: $input) {
disputeEvidence {
uncategorizedText
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}
QUERY
variables = {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"input": {
"customerFirstName": "Avery",
"customerLastName": "Chen",
"customerEmailAddress": "avery.chen@example.com",
"shippingAddress": {
"address1": "455 Harbor View Road",
"address2": "Apartment 3B",
"city": "Sacramento",
"zip": "95814",
"countryCode": "US",
"provinceCode": "CA"
},
"uncategorizedText": "The order shipped to the cardholder's billing address, and the carrier recorded a signature on delivery on July 31, 2026. The customer has used the same account and payment method for three earlier orders that weren't disputed.",
"accessActivityLog": "2026-07-28 14:02 UTC: The customer signed in from IP address 203.0.113.24 and placed the order. 2026-08-01 09:15 UTC: The customer signed in from the same IP address and viewed the order status page.",
"cancellationPolicyDisclosure": "Customers can cancel an order free of charge until it ships. The cancellation policy is shown at checkout and linked in the order confirmation email.",
"cancellationRebuttal": "The customer didn't ask to cancel the order before it shipped, and hasn't contacted the store since it was delivered.",
"refundPolicyDisclosure": "Unused items can be returned within 30 days of delivery for a full refund. The refund policy is shown at checkout and on every product page.",
"refundRefusalExplanation": "The customer hasn't requested a return or a refund, and the delivered item hasn't been sent back."
}
}
response = client.query(query: query, variables: variables)
Node.js
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation ShopifyPaymentsDisputeEvidenceUpdate($id: ID!, $input: ShopifyPaymentsDisputeEvidenceUpdateInput!) {
disputeEvidenceUpdate(id: $id, input: $input) {
disputeEvidence {
uncategorizedText
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}`,
"variables": {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"input": {
"customerFirstName": "Avery",
"customerLastName": "Chen",
"customerEmailAddress": "avery.chen@example.com",
"shippingAddress": {
"address1": "455 Harbor View Road",
"address2": "Apartment 3B",
"city": "Sacramento",
"zip": "95814",
"countryCode": "US",
"provinceCode": "CA"
},
"uncategorizedText": "The order shipped to the cardholder's billing address, and the carrier recorded a signature on delivery on July 31, 2026. The customer has used the same account and payment method for three earlier orders that weren't disputed.",
"accessActivityLog": "2026-07-28 14:02 UTC: The customer signed in from IP address 203.0.113.24 and placed the order. 2026-08-01 09:15 UTC: The customer signed in from the same IP address and viewed the order status page.",
"cancellationPolicyDisclosure": "Customers can cancel an order free of charge until it ships. The cancellation policy is shown at checkout and linked in the order confirmation email.",
"cancellationRebuttal": "The customer didn't ask to cancel the order before it shipped, and hasn't contacted the store since it was delivered.",
"refundPolicyDisclosure": "Unused items can be returned within 30 days of delivery for a full refund. The refund policy is shown at checkout and on every product page.",
"refundRefusalExplanation": "The customer hasn't requested a return or a refund, and the delivered item hasn't been sent back."
}
},
},
});
Shopify CLI
shopify app execute \
--query \
'mutation ShopifyPaymentsDisputeEvidenceUpdate($id: ID!, $input: ShopifyPaymentsDisputeEvidenceUpdateInput!) {
disputeEvidenceUpdate(id: $id, input: $input) {
disputeEvidence {
uncategorizedText
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}' \
--variables \
'{
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"input": {
"customerFirstName": "Avery",
"customerLastName": "Chen",
"customerEmailAddress": "avery.chen@example.com",
"shippingAddress": {
"address1": "455 Harbor View Road",
"address2": "Apartment 3B",
"city": "Sacramento",
"zip": "95814",
"countryCode": "US",
"provinceCode": "CA"
},
"uncategorizedText": "The order shipped to the cardholder's billing address, and the carrier recorded a signature on delivery on July 31, 2026. The customer has used the same account and payment method for three earlier orders that weren't disputed.",
"accessActivityLog": "2026-07-28 14:02 UTC: The customer signed in from IP address 203.0.113.24 and placed the order. 2026-08-01 09:15 UTC: The customer signed in from the same IP address and viewed the order status page.",
"cancellationPolicyDisclosure": "Customers can cancel an order free of charge until it ships. The cancellation policy is shown at checkout and linked in the order confirmation email.",
"cancellationRebuttal": "The customer didn't ask to cancel the order before it shipped, and hasn't contacted the store since it was delivered.",
"refundPolicyDisclosure": "Unused items can be returned within 30 days of delivery for a full refund. The refund policy is shown at checkout and on every product page.",
"refundRefusalExplanation": "The customer hasn't requested a return or a refund, and the delivered item hasn't been sent back."
}
}'
Direct API Access
const response = await fetch('shopify:admin/api/2027-01/graphql.json', {
method: 'POST',
body: JSON.stringify({
query: `
mutation ShopifyPaymentsDisputeEvidenceUpdate($id: ID!, $input: ShopifyPaymentsDisputeEvidenceUpdateInput!) {
disputeEvidenceUpdate(id: $id, input: $input) {
disputeEvidence {
uncategorizedText
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}
`,
variables: {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"input": {
"customerFirstName": "Avery",
"customerLastName": "Chen",
"customerEmailAddress": "avery.chen@example.com",
"shippingAddress": {
"address1": "455 Harbor View Road",
"address2": "Apartment 3B",
"city": "Sacramento",
"zip": "95814",
"countryCode": "US",
"provinceCode": "CA"
},
"uncategorizedText": "The order shipped to the cardholder's billing address, and the carrier recorded a signature on delivery on July 31, 2026. The customer has used the same account and payment method for three earlier orders that weren't disputed.",
"accessActivityLog": "2026-07-28 14:02 UTC: The customer signed in from IP address 203.0.113.24 and placed the order. 2026-08-01 09:15 UTC: The customer signed in from the same IP address and viewed the order status page.",
"cancellationPolicyDisclosure": "Customers can cancel an order free of charge until it ships. The cancellation policy is shown at checkout and linked in the order confirmation email.",
"cancellationRebuttal": "The customer didn't ask to cancel the order before it shipped, and hasn't contacted the store since it was delivered.",
"refundPolicyDisclosure": "Unused items can be returned within 30 days of delivery for a full refund. The refund policy is shown at checkout and on every product page.",
"refundRefusalExplanation": "The customer hasn't requested a return or a refund, and the delivered item hasn't been sent back."
}
},
}),
});
const { data } = await response.json();
console.log(data);
Response
{
"disputeEvidenceUpdate": {
"disputeEvidence": {
"uncategorizedText": "The order shipped to the cardholder's billing address, and the carrier recorded a signature on delivery on July 31, 2026. The customer has used the same account and payment method for three earlier orders that weren't disputed.",
"dispute": {
"amount": {
"amount": "10.6",
"currencyCode": "USD"
},
"evidenceSentOn": null,
"finalizedOn": null,
"id": "gid://shopify/ShopifyPaymentsDispute/598735659",
"initiatedAt": "2026-08-05T00:00:00Z",
"reasonDetails": {
"reason": "FRAUDULENT",
"networkReasonCode": "4827"
},
"status": "NEEDS_RESPONSE",
"type": "CHARGEBACK"
}
},
"userErrors": []
}
}
Upload a file to a dispute
Description
Set a file that's already uploaded to the dispute evidence as its uncategorized evidence file, by passing the file's ID in `uncategorizedFile`. Use this mutation when an app links supporting documentation, such as a signed delivery receipt, to the evidence for a dispute.
Query
mutation ShopifyPaymentsDisputeFileUpload($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}
Variables
{
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
}
cURL
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2027-01/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation ShopifyPaymentsDisputeFileUpload($id: ID!, $fileId: ID!) { disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId}}) { disputeEvidence { disputeFileUploads { id } dispute { amount { amount currencyCode } evidenceSentOn finalizedOn id initiatedAt reasonDetails { reason networkReasonCode } status type } } userErrors { field message } } }",
"variables": {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
}
}'
React Router
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation ShopifyPaymentsDisputeFileUpload($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}`,
{
variables: {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
},
},
);
const json = await response.json();
return json.data;
}
Ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
mutation ShopifyPaymentsDisputeFileUpload($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}
QUERY
variables = {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
}
response = client.query(query: query, variables: variables)
Node.js
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation ShopifyPaymentsDisputeFileUpload($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}`,
"variables": {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
},
},
});
Shopify CLI
shopify app execute \
--query \
'mutation ShopifyPaymentsDisputeFileUpload($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}' \
--variables \
'{
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
}'
Direct API Access
const response = await fetch('shopify:admin/api/2027-01/graphql.json', {
method: 'POST',
body: JSON.stringify({
query: `
mutation ShopifyPaymentsDisputeFileUpload($id: ID!, $fileId: ID!) {
disputeEvidenceUpdate(id: $id, input: {uncategorizedFile: {id: $fileId}}) {
disputeEvidence {
disputeFileUploads {
id
}
dispute {
amount {
amount
currencyCode
}
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
userErrors {
field
message
}
}
}
`,
variables: {
"id": "gid://shopify/ShopifyPaymentsDisputeEvidence/819974671",
"fileId": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
},
}),
});
const { data } = await response.json();
console.log(data);
Response
{
"disputeEvidenceUpdate": {
"disputeEvidence": {
"disputeFileUploads": [
{
"id": "gid://shopify/ShopifyPaymentsDisputeFileUpload/567271523"
}
],
"dispute": {
"amount": {
"amount": "10.6",
"currencyCode": "USD"
},
"evidenceSentOn": null,
"finalizedOn": null,
"id": "gid://shopify/ShopifyPaymentsDispute/598735659",
"initiatedAt": "2026-08-05T00:00:00Z",
"reasonDetails": {
"reason": "FRAUDULENT",
"networkReasonCode": "4827"
},
"status": "NEEDS_RESPONSE",
"type": "CHARGEBACK"
}
},
"userErrors": []
}
}