tanqoryExtAppChargeDecide
- Mutation
- Apps and platform
Approves (accept: true) or declines a pending charge from its confirmation URL. One decision per charge: a second call answers the first decision again (replayed: true). Errors: NOT_FOUND, EXPIRED, ALREADY_DECIDED, NOT_ACTIVE.
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
accept | Boolean! | Required | |
id | ID! | Required | |
kind | TanqoryExtAppChargeKind! | Required | |
signature | String! | Required |
Returns
TanqoryExtAppChargeDecidePayload!
| Field | Type | Description |
|---|---|---|
redirectUrl | URL | Where to send the merchant: the app's return URL with charge_id after an approval; null after a decline (the dashboard shows the app's page). For a theme purchase, the Theme Store's return URL after either (charge_id after an approval). |
replayed | Boolean! | True when this answers a decision made before (a second click): nothing changed. |
status | String | The charge's status after the decision. |
userErrors | [TanqoryExtAppChargeUserError!]! |
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 TanqoryExtAppChargeDecide($accept: Boolean!, $id: ID!, $kind: TanqoryExtAppChargeKind!, $signature: String!) {\n tanqoryExtAppChargeDecide(accept: $accept, id: $id, kind: $kind, signature: $signature) {\n redirectUrl\n replayed\n status\n userErrors {\n code\n field\n message\n }\n }\n}","variables":{"accept":false,"id":"gid://tanqory/Type/id","kind":"CAPPED_AMOUNT","signature":""}}'// Node.js 18 or later (fetch is built in). Save as request.mjs and run: node request.mjs
const query = `mutation TanqoryExtAppChargeDecide(\$accept: Boolean!, \$id: ID!, \$kind: TanqoryExtAppChargeKind!, \$signature: String!) {
tanqoryExtAppChargeDecide(accept: \$accept, id: \$id, kind: \$kind, signature: \$signature) {
redirectUrl
replayed
status
userErrors {
code
field
message
}
}
}`;
const variables = {
"accept": false,
"id": "gid://tanqory/Type/id",
"kind": "CAPPED_AMOUNT",
"signature": ""
};
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 TanqoryExtAppChargeDecide($accept: Boolean!, $id: ID!, $kind: TanqoryExtAppChargeKind!, $signature: String!) {
tanqoryExtAppChargeDecide(accept: $accept, id: $id, kind: $kind, signature: $signature) {
redirectUrl
replayed
status
userErrors {
code
field
message
}
}
}"""
variables = json.loads("""{
"accept": false,
"id": "gid://tanqory/Type/id",
"kind": "CAPPED_AMOUNT",
"signature": ""
}""")
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))