Deferred purchase

Topic summary

Error while testing billing for deferred purchases using Shopify’s GraphQL mutation orderCreateMandatePayment. The call includes id (gid://shopify/Order/4944625139950), an idempotencyKey, and mandateId set to “1”.

Response returns: “Invalid global id ‘1’” with extensions code “argumentLiteralsIncompatible” and typeName “CoercionError”. The error path points to the mandateId argument.

Key technical point: Shopify GraphQL fields that require a global ID (GID) expect a specific string format (e.g., gid://shopify/…), not a plain integer. The failure indicates type coercion for mandateId due to an invalid ID format.

Status: No resolution yet; the user is requesting assistance. Action needed: identify the correct mandateId in GID format and how to obtain it for deferred purchase billing.

Note: The provided mutation and error output (code snippet) are central to understanding the issue.

Summarized with AI on February 8. AI used: gpt-5.

We are trying to test billing on deferred purchases. However, the following request:
mutation {
orderCreateMandatePayment(
id: “gid://shopify/Order/4944625139950” idempotencyKey:“idempotencyKey_40599y1l846sjii”
mandateId: “1”
) {
paymentReferenceId
userErrors { field
message
}
}
}
is throwing the following error:
{
“errors”: [
{
“message”: “Invalid global id ‘1’”,
“locations”: [
{
“line”: 3,
“column”: 7
}
],
“path”: [
“mutation”,
“orderCreateMandatePayment”,
“mandateId”
],
“extensions”: {
“code”: “argumentLiteralsIncompatible”,
“typeName”: “CoercionError”
}
}
]
}

Any help will be appreciated.