TanqoryDocs

appSubscriptionCreate

  • Mutation
  • Content and shop

Creates a recurring and/or usage-based subscription from the calling app, with an optional trial. The merchant approves it at the returned confirmationUrl; problems come back in userErrors.

Arguments

ArgumentTypeRequiredDefault
lineItems[AppSubscriptionLineItemInput!]!Required
nameString!Required
replacementBehaviorAppSubscriptionReplacementBehaviorOptionalSTANDARD
returnUrlURL!Required
testBooleanOptionalfalse
trialDaysIntOptional

Returns

AppSubscriptionCreatePayload What appSubscriptionCreate returns: the new appSubscription, the confirmationUrl for the merchant, and any userErrors.

FieldTypeDescription
appSubscriptionAppSubscription
confirmationUrlURL
userErrors[UserError!]!

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
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 AppSubscriptionCreate($lineItems: [AppSubscriptionLineItemInput!]!, $name: String!, $returnUrl: URL!) {\n  appSubscriptionCreate(lineItems: $lineItems, name: $name, returnUrl: $returnUrl) {\n    appSubscription { id }\n    confirmationUrl\n    userErrors {\n      field\n      message\n    }\n  }\n}","variables":{"lineItems":[],"name":"","returnUrl":""}}'

Built from commit c0b3fb3fdef7 · API version 2026-10