dispute
Returns dispute details based on ID.
Anchor to Possible returnsPossible returns
- Anchor to ShopifyPaymentsDisputeShopify•
Payments Dispute A dispute occurs when a buyer questions the legitimacy of a charge with their financial institution.
- amount•Moneynon-null
V2! The total amount disputed by the cardholder.
- evidence
Due •By Date The deadline for evidence submission.
- evidence
Sent •On Date The date when evidence was sent. Returns null if evidence hasn't yet been sent.
- finalized
On •Date The date when this dispute was resolved. Returns null if the dispute isn't yet resolved.
- id•ID!non-null
A globally-unique ID.
- initiated
At •Datenon-nullTime! The date when this dispute was initiated.
- legacy
Resource •Id Unsignednon-nullInt64! The ID of the corresponding resource in the REST Admin API.
- order•Order
The order that contains the charge that's under dispute.
- reason
Details •Shopifynon-nullPayments Dispute Reason Details! The reason of the dispute.
- status•Disputenon-null
Status! The current state of the dispute.
- type•Disputenon-null
Type! Indicates if this dispute is still in the inquiry phase or has turned into a chargeback.
- amount•
Return a single dispute
query ShopifyPaymentsDisputesShow($id: ID!) {
dispute(id: $id) {
amount {
amount
currencyCode
}
evidenceDueBy
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "query ShopifyPaymentsDisputesShow($id: ID!) { dispute(id: $id) { amount { amount currencyCode } evidenceDueBy evidenceSentOn finalizedOn id initiatedAt reasonDetails { reason networkReasonCode } status type } }",
"variables": {
"id": "gid://shopify/ShopifyPaymentsDispute/598735659"
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query ShopifyPaymentsDisputesShow($id: ID!) {
dispute(id: $id) {
amount {
amount
currencyCode
}
evidenceDueBy
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}`,
{
variables: {
"id": "gid://shopify/ShopifyPaymentsDispute/598735659"
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `query ShopifyPaymentsDisputesShow($id: ID!) {
dispute(id: $id) {
amount {
amount
currencyCode
}
evidenceDueBy
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}`,
"variables": {
"id": "gid://shopify/ShopifyPaymentsDispute/598735659"
},
},
});
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
query ShopifyPaymentsDisputesShow($id: ID!) {
dispute(id: $id) {
amount {
amount
currencyCode
}
evidenceDueBy
evidenceSentOn
finalizedOn
id
initiatedAt
reasonDetails {
reason
networkReasonCode
}
status
type
}
}
QUERY
variables = {
"id": "gid://shopify/ShopifyPaymentsDispute/598735659"
}
response = client.query(query: query, variables: variables)