tanqoryExtRefundTransactionMark
- Mutation
- Orders and payments
Records what the merchant found in the provider's dashboard for a pending refund the provider never settles by itself (OrderTransaction.tanqoryExtRefundFinishesInProviderDashboard): REFUNDED settles it as a successful refund, NOT_REFUNDED as a failed one, and the order's timeline names the staff member's action. Staff only. The same outcome again changes nothing. NOT_FOUND, NOT_PENDING, NOT_FINISHED_IN_PROVIDER_DASHBOARD, NOT_ALLOWED.
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
id | ID! | Required | |
outcome | TanqoryExtRefundMarkOutcome! | Required |
Returns
TanqoryExtRefundTransactionMarkPayload
| Field | Type | Description |
|---|---|---|
transaction | OrderTransaction | The refund as it is now. |
userErrors | [TanqoryExtRefundMarkUserError!]! |
Example request
A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.
Set STORE_ID and TANQORY_ACCESS_TOKEN in your environment first (Make your first API call).
curl -X POST "https://api.tanqory.com/admin/2026-10/stores/$STORE_ID/graphql" \
-H "Authorization: Bearer $TANQORY_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data '{"query":"mutation TanqoryExtRefundTransactionMark($id: ID!, $outcome: TanqoryExtRefundMarkOutcome!) {\n tanqoryExtRefundTransactionMark(id: $id, outcome: $outcome) {\n transaction { id }\n userErrors {\n code\n field\n message\n }\n }\n}","variables":{"id":"gid://tanqory/Type/id","outcome":"NOT_REFUNDED"}}'// Node.js 18 or later (fetch is built in). Save as request.mjs and run: node request.mjs
const query = `mutation TanqoryExtRefundTransactionMark(\$id: ID!, \$outcome: TanqoryExtRefundMarkOutcome!) {
tanqoryExtRefundTransactionMark(id: \$id, outcome: \$outcome) {
transaction { id }
userErrors {
code
field
message
}
}
}`;
const variables = {
"id": "gid://tanqory/Type/id",
"outcome": "NOT_REFUNDED"
};
const res = await fetch(`https://api.tanqory.com/admin/2026-10/stores/${process.env.STORE_ID}/graphql`, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.TANQORY_ACCESS_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({ query, variables }),
});
console.log(res.status, JSON.stringify(await res.json(), null, 2));# Python 3, standard library only. Save as request.py and run: python3 request.py
import json, os, urllib.request
query = """mutation TanqoryExtRefundTransactionMark($id: ID!, $outcome: TanqoryExtRefundMarkOutcome!) {
tanqoryExtRefundTransactionMark(id: $id, outcome: $outcome) {
transaction { id }
userErrors {
code
field
message
}
}
}"""
variables = json.loads("""{
"id": "gid://tanqory/Type/id",
"outcome": "NOT_REFUNDED"
}""")
req = urllib.request.Request(
"https://api.tanqory.com/admin/2026-10/stores/" + os.environ["STORE_ID"] + "/graphql",
data=json.dumps({"query": query, "variables": variables}).encode(),
headers={
"Authorization": "Bearer " + os.environ["TANQORY_ACCESS_TOKEN"],
"Content-Type": "application/json",
},
)
with urllib.request.urlopen(req) as res:
print(res.status, json.dumps(json.load(res), indent=2))